Import Images
Required scope:
public-api:write
Description
The image import creates image entries in the Media Library and upload the image asset to the configured blob storage. The image import in Livingdocs is asynchronous. You post a batch of images that you want to import and get back a jobId that you can use to retrieve the import job state.
You can patch existing media library entries with the patch endpoint.
Use Cases
- Initial import from a legacy system - When doing an initial import one usually first imports all images and then imports documents referencing the images.
Endpoint
POST /api/v1/import/images
Parameters
Name | Type | Required | Notes |
---|---|---|---|
systemName | string | x | Identifier for the system you are importing from, e.g. an archive |
webhook | uri | Endpoint at the importing system that gets notified by POST when import job is done. Notification contains the id of the import job, the state and an overview. | |
context | object | An object that is passed as context in the body of the request to the webhook. Limited to 8192 Bytes. | |
images | array | x | An array of images to import. Each entry is an object with the following keys, all of which are required:
|
Example Request
{
"systemName": "identifier-for-your-system",
"webhook": "https://my-domain.com/webhooks/image-import",
"context": {
"myIdentifier": "some-identifier-sent-to-the-webhook"
},
"images": [
{
"url": "https://placekitten.com/800/600",
"id": "123abc",
"fileName": "cat",
"metadata": {
"caption": "foo"
}
}
]
}
Response
Check Import Status for Images
Required scope:
public-api:write
Description
API endpoints for importing and checking status of image imports.Endpoint
GET /api/v1/import/images/status
Parameters
Name | Type | Required | Notes |
---|---|---|---|
id | string | x | The id that Livingdocs provided you for your prior call to ‘/import/images’ |