This page defines the API for accessing records within your Nimblex system, including management of record objects as well as relationships between records and documents attached to them.
Read Record
This function will retrieve the contents of a single record.
GET @apiroot/records/{urlencoded eformtype}/{recordid}
Example Request
NO DATA
Example Response
Success:
// Status: 200 Success
{ "data":{ "type":"record", "id":"Contract/57", "links":{ "self":"@apiroot/records/Contract/57", "attachments":"@apiroot/records/Contract/57/attachments" }, "relationships":{ "parent":{ "links":{ "self":"@apiroot/records/Contract/57/relationships/parent", "related":"@apiroot/records/Programme/2" } } }, "attributes":{ "content":[ { "LineNumber":1, "Status":"banana" }, { "LineNumber":1, "Status":"banana" } ] } } }
When record does not exist:
404 Not Found (Empty)
Create Record
Use this function to create a single record.
POST @apiroot/records/<urlencoded eformtype>
Example Request
{ "data": { "type": "record", "attributes": { "content": [{ "LineNumber": 1, // Mandatory "Status": "banana" }, { "LineNumber": 2, // Mandatory "Status": "banana" } ] } } }
Use this function to change the values within fields of a record.
PATCH @apiroot/records/{urlencoded eformtype}/{recordid}
Note that HASH value behaviour is not specified at this stage.
Example Request
Success:
204 No Content (Empty)
No such record:
404 Not Found (Empty)
Create Or Update Record
(Added in Nimblex 5.5)
Use this function to change the values within fields of a record (and create if it does not exist).
PUT @apiroot/records/{urlencoded eformtype}/{recordid}
Note that HASH value behaviour is not specified at this stage.
Example Request
Successful update:
(This was 200 Success in earlier versions)
Use this function to delete a single record.
DELETE @apiroot/records/{urlencoded eformtype}/{recordid}
Example Request
NO CONTENT
Example Response
Successfully deleted:
204 Success (Empty)
No such record:
404 Not Found (Empty)
Parent Relationship
Get Record Parent
GET @apiroot/records/{urlencoded eformtype}/{recordid}/relationships/parent
Example Request
Example Responses
Record is the child of Contract 57:
Record does not have a parent:
Record does not exist:
404 Not Found (Empty)
Update Record Parent
PATCH @apiroot/records/{urlencoded eformtype}/{recordid}/relationships/parent
Example Requests
To set new value:
To clear:
Example Responses
Success:
204 No Content (Empty)
Record does not exist, or parent does not exist:
404 Not Found (Empty)