Check if artifact exists in MFT Repository

get

/mftapp/rest/v1/artifacts/repository

Check if artifact exists in MFT repository.

Request

Query Parameters
Back to Top

Response

Supported Media Types

200 Response

Body ()
Root Schema : schema
Type: object
Show Source

500 Response

Body ()
Root Schema : schema
Type: object
Show Source
Example Response (application/json)
{
    "errorCode":"MFT-7415",
    "errorKey":"MFT_UNSUPPORTED_ARTIFACT_TYPE",
    "errorMessage":"Unsupported artifact type found. Artifact type: {SOURCE}."
}
Back to Top

Examples

Example of Response Body

The following example shows how to check if an artifact exists in the repository by submitting a GET request on the REST resource using cURL.
curl -v  GET -u username:welcome1' -H "Content-Type: multipart/form-data" http://host:port/mftapp/rest/v1/artifacts/repository?artifactName=test2&artifactType=SOURCE' 

The following example shows the contents of the response body for a successful response:

{
	"artifactExists": true
}

The following example shows the contents of the response body if there is an error:

{
    "errorCode": "MFT-7415",
    "errorKey": "MFT_UNSUPPORTED_ARTIFACT_TYPE",
    "errorMessage": "Unsupported artifact type found. Artifact type: null."
}  
Back to Top