Request Methods

The PerspioTalk API strives to follow REST best practices while still being pragmatic. Below is a list of the HTTP Methods supported by the API and when to use them.

MethodDescription
GETRetrieves a single resource if an ID is provided or a list of resources.
POSTCreates a new resource.
PATCHPATCH is used to provide partial updates to an existing resource. When patching a resource, partial JSON should be provided in the body of the request.
PUTPUT is used for replacing a current resource; this operation is not supported on all endpoints. In most cases, you will want to use PATCH as it is more common to provide partial updates to an existing resource.
DELETEDeletes resource.

📘

PATCH vs PUT

Most of our APIs use the PATCH method to update objects. In order to use this method, you only need to provide the fields you wish to update. For example, to update the description of an asset, you would only include the description property in the request body.

A few of our APIs use the PUT method to update objects. The PUT method replaces the object you are trying to update with the data you provide. This means you must provide a full representation of the object you wish to update. The suggested approach for using the PUT method is to first GET the object you want to update (to retrieve a full representation of it), then modify the fields you wish to update. The object will continue to have the same ID.