App Installation Locations

You can control the order of apps in specific locations.

For more information on locations, see Setting the app location in the Apps developer docs.

JSON Format

Location installations are represented as JSON objects with the following properties:

Name Type Comment
id integer Internal location installation id
location_name string Location name. Example: nav_bar
installations array An array of app installation ids
created_at date When this record was created
updated_at date When this record was last updated
Example
{
  "id": 1234,
  "location_name": "nav_bar",
  "installations": [
    8765,
    5678
  ],
  "created_at": "2014-03-31T03:10:52Z",
  "updated_at": "2014-07-29T06:22:02Z"
}

List Location Installations

GET /api/v2/apps/location_installations.json

Allowed For
  • Admins
Using curl
curl https://{subdomain}.zendesk.com/api/v2/apps/location_installations.json \
  -u {email_address}:{password}
Example Response
Status: 200 OK

{
  "location_installations": [
    {
      "location_name": "nav_bar",
      "installations": [
        82,
        56
      ]
    },
    {
      "location_name": "ticket_sidebar",
      "installations": [
        111,
        82,
        87,
        56,
        46,
        96,
        77
      ]
    },
    {
      "location_name": "new_ticket_sidebar",
      "installations": [
        111,
        82,
        56
      ]
    },
    {
      "location_name": "top_bar",
      "installations": [
        106,
        91
      ]
    }
  ]
}

Reorder App Installations For Location

POST /api/v2/apps/location_installations/reorder.json

Creates or updates the relevant location installation with a specified installation order.

When implementing this API in response to a user reordering installations, ensure you throttle your API calls to a reasonable limit.

Allowed For
  • Admins
Using curl
curl https://{subdomain}.zendesk.com/api/v2/apps/location_installations/reorder.json \
  -d '{"installations": [82, 56], "location_name": "nav_bar"}' \
  -H "Content-Type: application/json" -X POST \
  -u {email_address}:{password}
Example Response
Status: 201 Created
Location: /api/v2/apps/location_installations/2

{
  "location_installation": {
    "location_name": "nav_bar",
    "installations": [
      82,
      56
    ]
  }
}