Get Custom Property by ID

Last modified on August 24, 2020

To get information about a single custom property, send a GET request to /properties/{id} where {id} is the property ID.

Request URL



The request must include the Authorization header containing a user’s access token:

Authorization: Bearer ACCESS_TOKEN

See Authentication for more information.

Query parameters


Optional. A comma-separated list of property data fields to include in the response. The available field names are: id, name, values.

Response body

If successful, the operation returns HTTP status 200 and a JSON object containing the property name, ID, values, and value IDs:

  "__permissions": {
    "acl": 7
  "id": 120,
  "name": "Environment",
  "values": [
      "id": 58,
      "name": "Development"
      "id": 60,
      "name": "Production"
      "id": 62,
      "name": "Staging"

Error responses have a non-200 status code and include the errors list:

  "errors": [
      "code": 404,
      "message": "Record not found"

Try it out

Click here to test this operation in AlertSite’s interactive API console.

Code examples

Get the property with ID 120:


curl -H "Authorization: Bearer ACCESS_TOKEN"


# Python 3.5+
import requests  # Requests library
import json

baseUrl = ''
username = ''  # Replace with your AlertSite login email
password = 'pa55w0rd'          # Replace with your AlertSite password
property_id = 120

# Log in
 payload = {'username': username, 'password': password}
r = + '/access-tokens', data=json.dumps(payload), headers={'Content-Type': 'application/json'})
token = r.json()['access_token']

# Get the property name and values
r = requests.get(baseUrl + '/properties/{}'.format(property_id), headers={'Authorization': 'Bearer ' + token})
if r.ok:
    values = [value['name'] for value in result['values']]
    values_as_string = ', '.join(map(str, values))
    print('Name: {}\nValues: {}'.format(result['name'], values_as_string))
    print('Could not get property #{}. The following error(s) occurred:'.format(property_id), *r.json()['errors'], sep='\n')

See Also

Custom Properties Operations

Highlight search results