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 |
---|---|---|
serviceRequestId | Service request id | Query string |
artifactType | An artifact type.
| 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 |
---|---|---|
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);