Check if artifact exists in MFT repository

get

/mftapp/rest/v1/artifacts/repository

Checks if an artifact exists in the MFT repository.

With 12.2.1.4 patch 31314464 (at minimum) applied, the request supports optional boolean parameter onlyTip. The default value is false, which checks if the artifact exists in any MDS label. When set to true, checks if the artifact exists in only the current label. Sign in to My Oracle Support and search for the patch number to locate and download the patch.

Request

Query Parameters
  • Name of the artifact to be verified.
  • Type of the artifact to be verified, only supports TRANSFER artifactType.
  • (With 12.2.1.4 patch 31314464 applied) When set to true, checks if the artifact exists in only the current label. Default value is false, which checks if the artifact exists in any MDS label.
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