Upload Item to Repository
Uploads an item to the Perfecto repository.
URL |
Copy
|
---|---|
Method |
|
Header parameters
Name |
Description |
---|---|
|
Data parameters (body)
The request should have a content type of multipart/form-data
. The first part key is inputStream
, with a content type of application/octet-stream
. The second part key is requestPart
with a content type of application/json
.
Parameter | Description |
---|---|
inputStream
|
The repository item itself |
requestPart
|
Contains the metadata of the repository item to be uploaded.
|
inputStream InputStream (FormDataParam)
requestPart (FormDataParam)
{
"artifactLocator":""
"artifactType": "",
"artifactName": "",
"mimeType": "" "override": "",
}
cURL
curl "https://CLOUD_NAME.app.perfectomobile.com/repository/api/v1/artifacts" -H "Perfecto-Authorization: YOUR_PERFECTO_TOKEN" -H "Content-Type: multipart/form-data" -F "requestPart={\"artifactLocator\":\"PRIVATE:app.apk\",\"artifactType\":\"ANDROID\",\"override\":true}" -F "inputStream=@/path/to/app.apk"
-
Specifying the artifactType metadata is mandatory when uploading files bigger than 143 MB.
-
artifactType metadata is case sensitive and should only be passed only in uppercase letters.
Success response
Code: 200
Error response
Error code | Reason |
---|---|
400 BAD REQUEST
|
The request included the wrong body content |
401 UNAUTHORIZED
|
Wrong security token |
409 CONFLICT
|
Override of an existing asset with the same locator fails because override is set to false |
500 INTERNAL_SERVER_ERROR
|
Internal error |