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

Parameter

Description

Parameter Type

serviceRequestId

Service request id

Query string

artifactType

An artifact type.

  • Image = 1,

  • Pdf = 2,

  • JsonMetadata = 3,

  • JsonDocument = 4,

  • SignedJsonDocument = 5,

  • None

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

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);