Import Media Resource
API Description
Use the import service to provide a URL pointing to an image file that you want downloaded to an Apple CDN. Image file formats should be restricted to JPEG or PNG.
This asynchronous process will generate a unique Apple-generated ID. Use Get Metadata API to check the status of your request. Once processing is completed, you may then use applicable services to add or update a resource with the provided (image) ID.
note
Asynchronous process must be completed before an image can be associated with other resources
Request
URI Parameters
| Name | Input |
|---|---|
orgId |
Path Template
POST {url}/api/{version}/orgs/{orgId}/images/import
Path Example
POST {url}/api/v1/orgs/9467895078742654934/images/import
Request Headers
| Name | Input |
|---|---|
Authorization | |
Content-Type |
Example Request Headers
Authorization: Bearer <access_token>
Content-Type: application/json
Request Body
| Name | Type | Input |
|---|---|---|
imageDetails | object | |
url | uri |
Example Request Body (raw JSON)
{
"imageDetails": {
"url": "http://goodpartner.com/images/redbaycoffeeSF/assets/brand-photos/GREEN_BAY_COFFEE_BARISTA.jpeg"
}
}
Response
202 Accepted or Error
Response Headers
| Name |
|---|
apple-request-id |
content-type |
location |
Example Response Headers
HTTP/1.1 202 Accepted
apple-request-id: 30ed4897-872d-46ca-aec9-44a2e6c0c829
content-type: application/json
location: /api/v1/orgs/9467895078742654934/images/9467895078742654959/metadata
Response Body
| Name | Output |
|---|---|
$.orgId | |
$.id | |
$.createdDate | |
$.updatedDate | |
$.state |
Example Response Body (raw JSON)
{
"orgId": "9467895078742654934",
"id": "a01cbd85-85c5-4c35-9014-9a5af3c1052a",
"createdDate": "2022-03-25T21:23:11.000Z",
"updatedDate": "2022-03-25T21:23:11.000Z",
"state": "SUBMITTED"
}