Upload Item to Repository
Uploads an item to the Perfecto repository.
Perfecto supports or recognizes files with the following extensions: .3gp, .7z, .aab, .amr, .apk, .apks, .bat, .bmp, .cer, .cmd, .cpl, .crt, .csv, .data, .dart, .db, .der, .dll, .doc, .docm, .docx, .feature, .fms, .gif, .gz, .har, .heic, .heif, .hta, .html, .img, .ipa, .ipak, .jar, .java, .jpeg, .jpg, .jmx, .js, .json, .key, .local, .log, .logs, .m4a, .m4v, .mcr, .mibsettings, .mkv, .mobileconfig, .mobileprovision, .mov, .mp3, .mp4, .msi, .nib, .numbers, .opus, .pages, .pcap, .pdf, .pem, .pif, .pkg, .plist, .pl, .png, .pom, .ppt, .pptm, .pptx, .properties, .py, .rar, .rtf, .scr, .sh, .sim, .svg, .tar, .tcl, .text, .tif, .tiff, .tmp, .ts, .tsx, .tsu, .txt, .wav, .webm, .webp, .xls, .xlsm, .xlt, .xml, .xapk, .yaml, .zip, .tmo
If you need to upload a file type not listed, contact Perfecto Support.
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 |