Delete()

Description

Deletes an artifact.

Package Details

Interface

IArtifactManager

Syntax

Task Delete(int serviceRequestId, ArtifactType artifactType, int userId);
Task Delete(int artifactId, int userId);

Returns

Task

API Endpoint

DELETE

/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

userId

Current user id

Query string

Return

HTTP 200 OK if successful, 401 if unauthorized, 400 otherwise.

API Endpoint

DELETE

/api/v1/artifacts/{id}

Parameters

Parameter

Description

Parameter Type

Parameter

Description

Parameter Type

Id

Artifact id

Path

userId

Current user id

Query string

Return

HTTP 200 OK if successful, 401 if unauthorized, 400 otherwise.

Example

//option 1 const int id = 100; const int userId = 100; await ArtifactManager.Delete(id, userId); //option 2 const int serviceRequestId = 100; const ArtifactType artifactType = ArtifactType.JsonDocument; const int userId = 100; await ArtifactManager.Delete(serviceRequestId, artifactType, userId);