Core - Attachments

This modules manages the attachment files (documents, images, picture, etc.)

The base url for the APIs in this page is at:

/api/admin

A JSON file with OpenAPI data about all core-related admin APIs can be downloaded here.

Get attachment file

Gets a specific attachment file as a download:

GET /v1/attachments/{id}

Gets a specific attachment file as download

Parameters
  • id (string) – The guid of the attachment to download

Status Codes
DELETE /v1/attachments/{id}

Marks a specified attachment as deleted and removes related data

Parameters
  • id (string) – The guid of the attachment to delete

Status Codes

If the id provided corresponds to an existing record, the response will return an attachment file, as an HTTP download.

Errors will return a 404 Not found response.

Update attachment file

Updates the information for an attachment file record:

POST /v1/attachments

Persists data about an attachment

Status Codes

With a request body like this:

{
  Attachment: "base64-encoded content of the file",    // String
  AttachmentName: "Name of the attachment",            // String
  AttachmentMimeType: "application/pdf",               // String
  AttachmentType: 1                                    // Int
}

Value types can be one of the AttachmentType enumeration.

If the request is successful, it will store the data and return a positive response and the Guid, otherwise a error message.

Possible errors are described by these messages:

err_NoAttachment

Any of the required fields is empty or null

Any other error will return a generic Json error response.

Delete attachment

Marks a specified attachment as deleted and removes related data:

GET /v1/attachments/{id}

Gets a specific attachment file as download

Parameters
  • id (string) – The guid of the attachment to download

Status Codes
DELETE /v1/attachments/{id}

Marks a specified attachment as deleted and removes related data

Parameters
  • id (string) – The guid of the attachment to delete

Status Codes

Possible errors are:

err_ElementNotFound

No attachment was found for the specified ID or the attachment was already deleted