Manage access levels with the Salto Space API

The Space API, part of Salto IDM Connect, is a REST API that communicates with your Salto Space installation over the SHIP protocol. This guide explains how to manage the full lifecycle of an access level through the API:

  • Create an access level.
  • Get one access level or list all access levels.
  • Update an access level.
  • Delete an access level.

You can use any HTTP client, such as Postman, or your own application. Each step shows the API request and the result in Salto Space.

Before you start, follow the guide to connect Salto Space to the Space API. That guide explains how Salto connects the Space API to your Salto Space installation and issues the API credentials you need. Then request an access token for the requests shown here.

An access level groups together the doors that a user can open. In Salto Space, access levels appear in the User access levels list, under Cardholders. After you create an access level, you can assign it to users so they inherit the doors it grants.

Step 1: Create an access level

  1. Use the POST /api/v1/accesslevels endpoint to create an access level. The following payload shows the minimal fields:

    json
    {
      "extGroupId": "UNIQUE_ACCESS_LEVEL_ID",
      "name": "ACCESS_LEVEL_NAME",
      "description": "DESCRIPTION",
      "doors": []
    }
    • extGroupId is the unique identifier of the access level in Salto Space. You can provide any string, and you use this value to get, update, or delete the access level later.
    • name and description set the name and description shown in Salto Space.
    • doors is the list of doors the access level grants. Each entry has a single extDoorId field. Leave the list empty to create the access level without doors, and add them later.

    A successful response returns the extGroupId of the new access level.

  2. After a successful response, confirm that the access level was created in Salto Space. You can filter the Ext ID column of the User access levels list by the extGroupId you used.

    New access level shown in the User access levels list in Salto Space.

This example uses only the minimal fields. See the Space API reference for the full description of the access level entity and the doors you can assign to it.

Step 2: Get an access level

To get access levels:

  • To get a single access level, use the GET /api/v1/accesslevels/ID endpoint, where ID is the extGroupId of the access level.
  • To list all access levels, use the GET /api/v1/accesslevels endpoint.
  • To page and filter the results, use the GET /api/v1/accesslevels/filtered endpoint with the maxCount and startingFromExtGroupId query parameters:
    • maxCount sets the page size.
    • startingFromExtGroupId is a cursor: the results begin at the access level that follows the one you provide. Use the last extGroupId of a page as the startingFromExtGroupId of the next request to page through the full list.

Step 3: Update an access level

  1. Use the PUT /api/v1/accesslevels/ID endpoint, where ID is the extGroupId of the access level. Send the complete access level, not only the fields you want to change. The following payload updates the description:

    json
    {
      "extGroupId": "UNIQUE_ACCESS_LEVEL_ID",
      "name": "ACCESS_LEVEL_NAME",
      "description": "NEW_DESCRIPTION",
      "doors": []
    }
  2. After a successful response, confirm the change on the access level's page in Salto Space. Double-click the access level in the User access levels list to open its detail page.

    Updated description shown on the access level page in Salto Space.

Step 4: Delete an access level

  1. Use the DELETE /api/v1/accesslevels/ID endpoint, where ID is the extGroupId of the access level.

  2. After the access level is deleted, the record is removed from Salto Space. It no longer appears in the User access levels list.

    User access levels list in Salto Space showing no results for the deleted access level.

Every operation returns an HTTP 200 status code. To confirm whether a request succeeded, check the Success field in the response rather than the status code alone.

API definition and documentation

See the Space API reference for a full description of the endpoints and entities available through the API.

The Space API uses a limited set of the functionality available in the full SHIP protocol. Contact support-id@saltosystems.com if you need functionality in the API that is not yet available.

Salto Systems, S. L. uses third-party data storage and retrieval devices in order to allow secure browsing and gain a better understanding of how users interact with the website in order to improve our services. You can accept all cookies by clicking the "Accept cookies" button or reject their use by clicking the "Reject cookies" button. For more information, visit our Cookies Policy