SHIFT API

Applications

API routes for applications and objects.

Creating an Application

To create an application, navigate to the dev center and click on the New App button in the right hand column.

A few notes about setting up your application:

Create a new application object

Application objects on SHIFT are references to "actual" objects that exist in third-party applications. This route registers an external object on SHIFT. The team id should correspond to a team on SHIFT that has the application installed. The type parameter is a custom categorization that may be used later to filter and/or display certain objects differently on SHIFT. The URL of an application object is always relative to the base uri of the application it belongs to.

API Reference

POST
/v1/applications/<uuid:application_id>/objects

Expected JSON POST data

param name: Application object name
type name: str
param team: Team id to associate to the application object
type team: uuid
param type: Application object custom type, used to organize application objects
type type: str
param url: Application object URL relative to the application base URL
type url: str

Example 1

Create an application object

POST /v1/applications/:uuid/objects?client_id=:uuid&client_secret=:uuid

Request Body:

{
  "url": "my/object/route/123.php",
  "type": "custom-type-1",
  "name": "My Application Object",
  "team": "52ae3836-de6a-42fc-89aa-75520792b523"
}

JSON response body:

{
  "meta": {}, 
  "data": [
    {
      "id": "a34d9916-e1e1-4825-9e5d-dee280a6e54e"
    }
  ], 
  "time": 0.009896039962768555
}

Example 2

Attempting to create application object without authorization:

POST /v1/applications/:uuid/objects

Request Body:

{
  "url": "my/object/route/123.php", 
  "type": "custom-type-1", 
  "name": "My Application Object", 
  "team": "52ae3836-de6a-42fc-89aa-75520792b523"
}

JSON response body:

{
  "errors": [
    {
      "message": "Not authorized", 
      "code": 4010
    }
  ]
}
DELETE
/v1/applications/<uuid:application_id>/objects/<uuid:object_id>

Example 1

Delete an application object

DELETE /v1/applications/:uuid/objects/:uuid?client_id=:uuid&client_secret=:uuid

JSON response body:

{
  "meta": {}, 
  "data": [], 
  "time": 0.009128093719482422
}

Example 2

Attempting to delete an application object which does not exist

DELETE /v1/applications/:uuid/objects/:uuid?client_id=:uuid&client_secret=:uuid

JSON response body:

{
  "errors": [
    {
      "message": "Not found", 
      "code": 4040
    }
  ]
}

Example 3

Attempting to delete an application object without authorization

DELETE /v1/applications/:uuid/objects/:uuid

JSON response body:

{
  "errors": [
    {
      "message": "Not authorized", 
      "code": 4010
    }
  ]
}