Exists()
Description
Check the existence of a given artifact
Package Details
Interface
IArtifactManager
Syntax
Task<bool> Exists(int serviceRequestId, ArtifactType artifactType);
Task<bool> Exists(int artifactId);
Returns
Task<bool>
API Endpoint
GET
api/v1/artifacts
Parameters
Parameter | Description | Parameter Type |
---|---|---|
serviceRequestId | Service request id | Query string |
artifactType | An artifact type.
| Query string |
Returns
Returns HTTP 200 OK if artifact exists, otherwise it HttpStatusCode.NotFound.
API Enpoint
GET
api/v1/artifacts/{artifactId}
Parameter | Description | Parameter Type |
---|---|---|
artifactId | An artifact id | Path |
Returns
Returns HTTP 200 OK if artifact exists, otherwise it HttpStatusCode.NotFound.
Example
// option 1
const int artifactRequestId = 100;
var exist = await ArtifactManager.Exists(artifactRequestId, ArtifactType.JsonMetadata);
// option 2
const int artifactRequestId = 100;
var exist = await ArtifactManager.Exists(artifactRequestId);