🖍️
Dataloy VMS API Documentation
API Release 8.5
API Release 8.5
  • Dataloy VMS API
  • Dataloy Rest API
    • What is it?
    • Authentication / Authorization
    • Getting Started
    • Data Model
    • Filtering
    • Sorting
    • Pagination
    • Adjust Number of Fields to be Returned from a Request
    • Webhooks
      • Webhook example
      • Expressions Made Easy
      • Webhooks - New functionalities
    • Master data Objects
    • Attachments
    • Audit Log
  • User Guides
    • Accounting Integration API
      • Invoicing
      • Payments/Receipts
      • Voyages
      • Business Partners
      • Exchange Rates
      • Bunker Transactions
      • Actuals
      • Autopost Invoices
      • Accruals
    • Schedule API
    • Bunker Order Integration API
    • Service Order Integration API
    • Vessel Report
      • Release 8.5
      • Release 8.0
      • Release 7.3 - 7.12
      • Release 7.0 - 7.2
      • Release 6.29 - 6.46
      • Legacy version (6.26 - 6.28)
      • Vessel report master data
    • Bunker Consumption API
    • Left join in API queries
    • Enterprise functionalities
      • Versioning
      • Endpoint access control
      • Data access control via target object
      • Data access control via target object and security role
      • Data access control at object level
      • Fields access control
      • Alert Scripts
      • Websockets
      • Bulk Deletion
      • Copy objects
      • OR and AND operators in API queries
      • Sub queries
      • XML Transformation
      • Expressions
      • Bulk Update
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. Dataloy Rest API

Attachments

PreviousMaster data ObjectsNextAudit Log

Was this helpful?

Since API 3.3 Remark has a new attribute attachments that contains a list of Attachment objects. The Attachment resource has an attribute called file where can be stored the content of the file encoded in Base64.

The attribute fileName is mandatory, the attribute "filesize" is not mandatory but the client should pass it.

The two resources can be manipulated exactly as all other resources.

When a new Remark is posted with attachments in the JSON the source field must be before the attachments field.

When getting an attachment, data can be encoded in base64, but also unencoded. Attachments added from the API will be encoded and attachment added from the Java VMS client may be unencoded.

Some examples

Create a new remark with a file attached:

POST: BODY:

{
  "remarkTitle": "test 1",
  "source": 19637583,
  "attachments": [
    {
      
      "file":"small file 1",
      "fileName":"test1.txt"
    }
  ]
}

Attach an Attachment to an existing Remark

{
  "attachments": [
    {
      "file":"small file 2",
      "fileName":"test2.txt"
    }
  ]
}

PUT: BODY:

http://{URL}/ws/rest/Remark
http://{URL}/ws/rest/Remark/244324058