|
Method
|
POST
|
|
URL
|
/v2/<object_full_identifier>/<record_uuid>/attachments
|
|
Parameters
|
document_id: If specified with an existing attachment's UUID, the document version is updated with the content of the file sent in the request body.
|
|
Response Content Type
|
application/json
|
POST https://localhost:8080/v2/io_showcase/42f64596-c42f-4ba2-8138-cc40188d2a88/attachments
[{
"updated_on":"1480085367917",
"size":"314",
"media_type":"application/rtf",
"version_uuid":"28d28b95-277e-4d8b-98c7-0777b4d810c5",
"name":"file1.txt",
"links":[
{ "rel":"url",
"href":"https://localhost:8080/document/e74f0eff-ed37-4d72-9410-01977c5199e5/latest?148008536791"
}
{ "rel":"thumbnail_url",
"href":"https://localhost:8080/document/3b156bad-81fd-4c86-9624-50c4f7cdb71d/latest?5.0.0.620-SNAPSHOT"
}],
"type":"file",
"uuid":"e74f0eff-ed37-4d72-9410-01977c5199e5"
},
{
"updated_on":"1480085367917",
"size":"310",
"media_type":"application/rtf",
"version_uuid":"71e5b04f-3f41-480d-8a71-74fcb28f1600",
"name":"file2.text",
"links":[
{ "rel":"url",
"href":"https://localhost:8080/document/ef39b3db-01ce-4a72-aa28-f3af91917245/latest?1480085367917"
}
{ "rel":"thumbnail_url",
"href":"https://localhost:8080/document/3b156bad-81fd-4c86-9624-50c4f7cdb71d/latest?5.0.0.620-SNAPSHOT"
}],
"type":"file",
"uuid":"ef39b3db-01ce-4a72-aa28-f3af91917245"
}, ...
]
|
HTTP Status Code
|
Error Message
|
|---|---|
|
400
|
The object identifier or record UUID were not specified or are invalid
|
|
404
|
The record specified to add attachments to was not found (or user has no permission to access it)
|
|
500
|
Internal Server error
|