Generic Entity API

  • The Pakk API can be thought of as following a 'generic' architecture. There is a set of 4 endpoints for most entities: get a list, get a single record, create a new record, update an existing record

  • A few entities do not allow writes, so have only 2 endpoints

  • Entity names can be obtained easily by observing URL structure in the admin panel

  • For requesting a list, you must send a filter - the shape of the filter request is the same regardless of which entity you are requesting

  • Lists can return a maximum of 1000 records

  • The fields available on both requests and responses are essentially the full set of fields exposed by that entity. You can get full details of each field, along with more in-depth help by turning on Show API Field Paths in your account and clicking on each field name on each entity screen to view its 'in-field help'

  • Alternatively observe the requests made by the admin panel to understand what fields are available and/or required

POST {root}/get/{entityname}

  • Retrieves a list of entities

  • Takes a 'filter' object as an argument. The easiest way to build filter requests is to use the GUI tools in the admin panel to build up the filter you require and then copy-paste the JSON body request.

  • Returns the complete JSON content for each entity found that matches the filter, as an array

GET {root}/{entityname}/{id}

  • Retrieves a single entity by ID

  • Returns the complete JSON content for the entity

POST {root}/{entityname}

  • Creates a new entity record

  • Refer to new record creation in the admin panel to understand which fields are required when creating a new record

PATCH {root}/{entityname}/{id}

  • Update a single entity by ID

  • Only the fields sent in the request will be updated - all others will be left untouched. Note that for fields that are lists or maps (dictionaries), you need to send the whole field when editing or updating the list/map, otherwise existing members will be lost (doesn't apply to writing to the Key-Value store)

Last updated