Upload Item to Repository
Uploads an item to the Perfecto repository.
URL |
Copy
|
Method |
|
Header parameters
Name |
Description |
---|---|
|
Query parameters
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 |
---|---|
|
The repository item itself |
|
Contains the metadata of the repository item to be uploaded.
|
|
Adds one or more tags to a file uploaded to the repository. The tags are defined as a list. For example: |
cURL
curl --location "https://CLOUD_NAME.app.perfectomobile.com/repository/api/v1/artifacts" --header "Perfecto-Authorization: YOUR_PERFECTO_TOKEN" --form "inputStream=@\"C:\\tmp\\Test_APK_Version.apk\"" --form "requestPart=\"{\\\"artifactLocator\\\":\\\"PRIVATE:Test_APK_Version2.apk\\\", \\\"tags\\\":[\\\"test\\\"], \\\"mimeType\\\":\\\"multipart/form-data\\\", \\\"override\\\": true, \\\"artifactType\\\": \\\"ANDROID\\\"}\""
curl --location 'https://CLOUD_NAME.app.perfectomobile.com/repository/api/v1/artifacts' \
--header 'Perfecto-Authorization: YOUR_PERFECTO_TOKEN' \
--form 'inputStream=@"/Users/rnagpure/Downloads/PerfectoLOGO.png"' \
--form 'requestPart="{\"artifactLocator\":\"PUBLIC:test_PerfectoLOGO.png\", \"tags\":[\"test\"], \"mimeType\":\"multipart/form-data\", \"override\": true, \"artifactType\": \"IMAGE\"}"'
artifactType
metadata is mandatory when uploading files bigger than 143 MB.
artifactType
metadata is case sensitive and should only be passed in uppercase letters.
Success response
Code: 200
Error response
Error code | Reason |
---|---|
|
The request included the wrong body content |
|
Wrong security token |
|
Override of an existing asset with the same locator fails because |
|
Internal error |