Check if artifact exists in MFT repository
get
/mftapp/rest/v1/artifacts/repository
Checks if an artifact exists in the MFT repository.
The request supports optional boolean parameter
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, it checks if the artifact exists in only the current label.Request
Query Parameters
-
artifactName(required): string
Name of the artifact to be verified.
-
artifactType(required): string
Type of the artifact to be verified, only supports TRANSFER artifactType.
-
onlyTip: boolean
When set to
true, checks if the artifact exists in only the current label. Default value isfalse, which checks if the artifact exists in any MDS label.
Response
Supported Media Types
- application/json
200 Response
500 Response
Root Schema : schema
Type:
Show Source
object-
errorCode:
string
The error code that Oracle Managed File Transfer returns.
-
errorKey:
string
The error key that Oracle Managed File Transfer returns.
-
errorMessage:
string
A message describing the error that Oracle Managed File Transfer returns.
Example Response (application/json)
{
"errorCode":"MFT-7415",
"errorKey":"MFT_UNSUPPORTED_ARTIFACT_TYPE",
"errorMessage":"Unsupported artifact type found. Artifact type: {SOURCE}."
}
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."
}