Create a JSON Request
If some of your requests return outputs in a pending or errored state, you can easily export them again. Simply use the IDs returned by the system and add an output ID filter to the original filter. This will ensure that only the desired outputs are exported.
To create a request, set up the API APP, and review the information about creating a JSON request here.
Here’s what your request should look like:
POST https://hub.celtra.io/api/export
Authorization: Basic <your API App ID> <your API App Secret>
Content-Type: application/json; charset=utf-8
{
"filters": {
"designFile": {
"id": ["mockedDesignFileId"]
}
}
}
Replace "mockedDesignFileId"
with a valid ID of a project you have access to.
The response will look as follows:
[
{
"id": "mockedOutputId",
"name": "Demo Project",
"status": "error",
"previewUrl": "https://demo-account.celtra.io/projects/mockedDesignFileId/overview",
"account": {
"id": "mockedAccountId",
"name": "Celtra Autotest Creative Assets Folder"
},
"folder": {
"id": "mockedFolderId",
"name": "Demo Project"
},
"designFile": {
"id": "mockedDesignFileId",
"name": "Demo Project",
"lastModificationTimestamp": "2023-01-01 01:01:01",
"contentBlobHash": "mockedContentBlobHash"
},
"customLayoutDimensions": {},
"contentDimensions": {},
"mediaLineItemAttributes": {},
"customLayoutDimensionsByName": {},
"contentDimensionsByName": {},
"mediaLineItemAttributesByName": {},
"activation": {},
"mediaLineItem": null,
"assets": {
"image": {
"type": "Image",
"width": 1080,
"height": 1080,
"status": "error",
"errorMessage": "Creative content is empty"
}
}
},
{
"id": "mockedOutputId2",
"name": "Demo Project (1)",
"status": "finished",
"previewUrl": "https://demo-account.celtra.io/projects/mockedDesignFileId/overview",
"account": {
"id": "mockedAccountId",
"name": "Celtra Autotest Creative Assets Folder"
},
"folder": {
"id": "mockedFolderId",
"name": "Demo Project"
},
"designFile": {
"id": "mockedDesignFileId",
"name": "Demo Project",
"lastModificationTimestamp": "2023-01-01 01:01:01",
"contentBlobHash": "mockedContentBlobHash"
},
"customLayoutDimensions": {},
"contentDimensions": {},
"mediaLineItemAttributes": {},
"customLayoutDimensionsByName": {},
"contentDimensionsByName": {},
"mediaLineItemAttributesByName": {},
"activation": {},
"mediaLineItem": null,
"assets": {
"image": {
"type": "Image",
"width": 1080,
"height": 1920
"status": "finished",
"blobHash": "mockedAssetBlobHash",
"extension": "png",
"url": "mockedUrlThatExpires"
}
}
},
...
]
Note that in the response above, the output with ID mockedOutputId
is in an error state. To re-export this particular output after fixing the issue, add a new filter.
Create the following request:
POST https://hub.celtra.io/api/export
Authorization: Basic
Content-Type: application/json; charset=utf-8
{
"filters": {
"designFile": {
"id": ["mockedDesignFileId"]
},
"output": {
"id": ["mockedOutputId"]
}
}
}
And the response will only include one output:
[
{
"id": "mockedOutputId",
"name": "Demo Project",
"status": "error",
"previewUrl": "https://demo-account.celtra.io/projects/mockedDesignFileId/overview",
"account": {
"id": "mockedAccountId",
"name": "Celtra Autotest Creative Assets Folder"
},
"folder": {
"id": "mockedFolderId",
"name": "Demo Project"
},
"designFile": {
"id": "mockedDesignFileId",
"name": "Demo Project",
"lastModificationTimestamp": "2023-01-01 01:01:01",
"contentBlobHash": "mockedContentBlobHash"
},
"customLayoutDimensions": {},
"contentDimensions": {},
"mediaLineItemAttributes": {},
"customLayoutDimensionsByName": {},
"contentDimensionsByName": {},
"mediaLineItemAttributesByName": {},
"activation": {},
"mediaLineItem": null,
"assets": {
"image": {
"type": "Image",
"width": 1080,
"height": 1080,
"status": "finished",
"blobHash": "mockedAssetBlobHash",
"extension": "png",
"url": "mockedUrlThatExpires"
}
}
}
]