POST V1 ems/attachments
Uploads a file attachment against an EMS entity.
Request Information
Example Request
To upload an attachment against Experiment with ID 1234, make the following API call:
POST /ems/attachments
and put the following content in the request body:
EntityType=Experiment&EntityId=1234
The following entity types are supported:
- Experiment
- Plate
- Well
- Study
- Project
This endpoint does not require the api-username
or
api-usertoken
headers to be present. If these headers are present, they will be ignored.
Request Detail
This request should be made with the Content-Type header set to 'multipart/form-data'. The attachment file must be posted with an element name of "attachment".
Response Information
HTTP Status Codes
Status Code | Meaning |
---|---|
201 (Created) | The attachment has been successfully created. |
400 (Bad Request) | The posted data did not contain a single attachment file OR the the entity type supplied does not support attachments. |
403 (Forbbiden) | An invalid file type was attempted to be uploaded |
404 (Not Found) | The entity described by the entity type and id does not exist. |
415 (Unsupported Media Type) | If the posted mime type is not multipart/form-data. |