API Verbs and Response Format
The Deepser REST API uses standard HTTP verbs to manage resources and returns data in JSON format. This section covers the supported verbs, authorization rules, and the standard response structure.
HTTP Verbs
Deepser supports four HTTP verbs for resource management:
| Verb | Action |
|---|---|
| POST | Create new entity data |
| GET | Retrieve existing data |
| PUT | Update existing data |
| DELETE | Remove data |
API Actions
Based on the entity, the role, and the permissions of the authenticated user, different actions are available:
- Create -- create a single resource (HTTP POST)
- Retrieve -- get a single resource (HTTP GET)
- Update -- update a single resource (HTTP PUT)
- Delete -- delete a single resource (HTTP DELETE)
- Multiple Retrieve -- get multiple resources (HTTP GET)
- Multiple Create -- create multiple resources (HTTP POST)
- Multiple Update -- update multiple resources (HTTP PUT)
warning
Multiple Delete is not allowed for security reasons.
Response Format
The API returns JSON objects. A typical collection response includes a totalRecords count and an items array:
{
"totalRecords":2,
"items":[
{
"entity_id":"1",
"parent_id":"0",
"sort_order":null,
"name":"ACME International",
"description":"ACME International – Main Company of the group",
"phone":"0288396",
"fax":"998266",
"address":"Madison Square Garden",
"city":"NY",
"state":"NY",
"country":"USA",
"zip_code":"00195",
"notes":null,
"logo":"company/image/a/c/acme_usa.png",
"primary_contact":"4\\euclid",
"mailbox_id":"0",
"status":"1",
"formtemplate_id":"56",
"updated_at":"2018-07-12 08:43:13",
"created_at":"2018-06-19 13:30:41"
},
{
"entity_id":"2",
"parent_id":"1",
"sort_order":null,
"name":"ACME France",
"description":"ACME France",
"phone":null,
"fax":null,
"address":"Roux de Strasse",
"city":"Paris",
"state":"Paris",
"country":"France",
"zip_code":"75000",
"notes":null,
"logo":"company/image/a/c/acme_fr_1.png",
"primary_contact":"4\\euclid",
"mailbox_id":"0",
"status":"1",
"formtemplate_id":"56",
"updated_at":"2018-07-12 08:43:56",
"created_at":"2018-06-19 13:33:57"
}
]
}