Request Methods

Which HTTP method to use, and how PUT and PATCH updates work.

PerspioTalk uses the standard HTTP methods. Request and response bodies are JSON unless an endpoint says otherwise.

MethodUsed to
GETRead one resource by ID, or list resources
POSTCreate a resource, run an action such as Archive Asset or Copy Workflow, or start a job
PUTReplace a resource. Send the complete object
PATCHChange specific fields with a JSON Patch document
DELETEDelete a resource

Updating a resource

Endpoints update resources in different ways, so check the method on the endpoint page:

  • PUT replaces the whole resource. Most update endpoints work this way.
  • PATCH changes only the fields you name.
  • POST is used by a few endpoints, such as Update Asset and Update Workflow.

PUT: send the complete object

A PUT replaces the stored resource with the body you send, so any field you leave out is cleared. The safe pattern is:

  1. GET the resource.
  2. Change the fields you need in that response.
  3. PUT the whole object back. The ID stays the same.

PATCH: send a JSON Patch document

PATCH endpoints take a JSON Patch document: an array of operations, each naming a field by its path. This body for Update Device sets two fields and leaves everything else unchanged:

[
  { "op": "replace", "path": "/runHoursOffset", "value": 100 },
  { "op": "replace", "path": "/odometerOffset", "value": -100 }
]
PropertyMeaning
opThe operation. replace changes a value; add and remove change lists, such as group memberships
pathThe field to change, as a JSON Pointer starting with /
valueThe new value. Not needed for remove

Each PATCH endpoint's page shows the body it expects. The one exception to JSON Patch is Update Current User Access, which takes the changed fields as plain JSON.