Density Public API (beta)

Download OpenAPI specification:Download

This service provides a layer of abstraction on top of the Density data API's.

It is intended for use by the general public.

v3

Occupancy

Calculates the occupancy for a set of spaces or for all spaces in a portfolio.

SecurityapiKey or application
Request
Request Body schema: application/json
required

request body input

end_date
required
string

end of the query date range

space_ids
Array of strings

specific spaces to query

start_date
required
string

start of the query date range

time_resolution
string
Default: "total"

time resolution for the query results

Enum: "total" "hour" "day" "week" "month" "year" "weekday" "hour_of_day" "minute"
Responses
200

success

400

request data was missing or invalid

401

unable to authorize the given bearer token

403

access to this api is not allowed

404

resource not found

500

unexpected error

post/v3/analytics/occupancy
Request samples
application/json
{
  • "end_date": "string",
  • "space_ids": [
    ],
  • "start_date": "string",
  • "time_resolution": "total"
}
Response samples
application/json
{
  • "property1": {
    },
  • "property2": {
    }
}

Current Occupancy

Returns the most current occupancy for a set of spaces or for all spaces in a portfolio. Only entry spaces are supported.

SecurityapiKey or application
Request
Request Body schema: application/json
required

request body input

space_ids
Array of strings
Responses
200

success

401

unable to authorize the given bearer token

403

access to this api is not allowed

500

unexpected error

post/v3/analytics/occupancy/current
Request samples
application/json
{
  • "space_ids": [
    ]
}
Response samples
application/json
{
  • "property1": true,
  • "property2": true
}

Presence

Returns the current occupied status for a set of spaces or for all spaces in a portfolio.

SecurityapiKey or application
Request
Request Body schema: application/json
required

request body input

space_ids
Array of strings
Responses
200

success

401

unable to authorize the given bearer token

403

access to this api is not allowed

500

unexpected error

post/v3/analytics/presence
Request samples
application/json
{
  • "space_ids": [
    ]
}
Response samples
application/json
{
  • "property1": true,
  • "property2": true
}

Short-Term Analytics

Determines short-term Presence for a set of spaces or for all spaces in an organization. Only OA spaces and floors are supported.

SecurityapiKey or application
Request
Request Body schema: application/json
required

request body input

minutes_lookback
integer <uint32>
Default: 0

the length of time in minutes for which historical presence information will be fetched. 0 value will return the current minute. 5 will return the current minute, plus 5 mins before. Max value is 240 minutes.

space_ids
Array of strings

specific spaces to query. Only areas and floors will be processed.

Responses
200

success

400

request data was missing or invalid

401

unable to authorize the given bearer token

403

access to this api is not allowed

404

resource not found

500

unexpected error

post/v3/analytics/short-term
Request samples
application/json
{
  • "minutes_lookback": 60,
  • "space_ids": [
    ]
}
Response samples
application/json
{
  • "data": [
    ]
}

StatusDeprecated

Returns the current occupied status for a set of spaces or for all spaces in a portfolio.

SecurityapiKey or application
Request
Request Body schema: application/json
required

request body input

space_ids
Array of strings
Responses
200

success

401

unable to authorize the given bearer token

403

access to this api is not allowed

500

unexpected error

post/v3/analytics/status
Request samples
application/json
{
  • "space_ids": [
    ]
}
Response samples
application/json
{
  • "property1": true,
  • "property2": true
}

Time Used

Calculates the time used for a set of spaces or for all spaces in a portfolio.

SecurityapiKey or application
Request
Request Body schema: application/json
required

request body input

end_date
required
string

end of the query date range

space_ids
Array of strings

specific spaces to query

start_date
required
string

start of the query date range

time_resolution
string
Default: "total"

time resolution for the query results

Enum: "total" "hour" "day" "week" "month" "year" "weekday" "hour_of_day" "minute"
Responses
200

success

400

request data was missing or invalid

401

unable to authorize the given bearer token

403

access to this api is not allowed

404

resource not found

500

unexpected error

post/v3/analytics/time-used
Request samples
application/json
{
  • "end_date": "string",
  • "space_ids": [
    ],
  • "start_date": "string",
  • "time_resolution": "total"
}
Response samples
application/json
{
  • "property1": {
    },
  • "property2": {
    }
}

Utilization

Calculates the utilization for a set of spaces or for all spaces in a portfolio.

SecurityapiKey or application
Request
Request Body schema: application/json
required

request body input

end_date
required
string

end of the query date range

space_ids
Array of strings

specific spaces to query

start_date
required
string

start of the query date range

time_resolution
string
Default: "total"

time resolution for the query results

Enum: "total" "hour" "day" "week" "month" "year" "weekday" "hour_of_day" "minute"
Responses
200

success

400

request data was missing or invalid

401

unable to authorize the given bearer token

403

access to this api is not allowed

404

resource not found

500

unexpected error

post/v3/analytics/utilization
Request samples
application/json
{
  • "end_date": "string",
  • "space_ids": [
    ],
  • "start_date": "string",
  • "time_resolution": "total"
}
Response samples
application/json
{
  • "property1": {
    },
  • "property2": {
    }
}

Create Presence WebSocket

Returns a WebSocket endpoint to receive presence messages for spaces on a floor.

SecurityapiKey or application
Request
path Parameters
floor_id
required
string

space id for a floor.

Responses
200

success

400

BadRequestError is an error returned when the request is malformed or invalid.

401

UnauthorizedError is an error returned when the request is unauthorized.

403

ForbiddenError is an error returned when the request is forbidden.

404

NotFoundError is an error returned when the requested resource is not found.

500

InternalServerError is an error returned when the server encounters an error.

post/v3/analytics/ws/floor/{floor_id}/presence
Request samples
Response samples
application/json
{
  • "ws_url": "string"
}

Hello World

Validate your access to the Density public API.

Responses
200

success

401

unable to authorize the given bearer token

403

access to this api is not allowed

get/v3/hello-world
Request samples
Response samples
text/plain
Do… or do not. There is no try. - Yoda

Density Access Token

OAuth token flow for machine-to-machine users. Generate an access token using client credentials.

Request
Request Body schema: application/json
required

request body input

client_id
required
string
client_secret
required
string
grant_type
required
string
Value: "client_credentials"
Responses
200

success

400

bad request

401

unable to authorize client

500

unexpected error

post/v3/oauth/token
Request samples
application/json
{
  • "client_id": "string",
  • "client_secret": "string",
  • "grant_type": "client_credentials"
}
Response samples
application/json
{
  • "access_token": "string",
  • "expires_in": "string",
  • "token_type": "string"
}

Spaces

Get all spaces for an organization.

SecurityapiKey or application
Responses
200

success

401

unable to authorize the given bearer token

403

access to this api is not allowed

500

unexpected error

get/v3/spaces
Request samples
Response samples
application/json
[
  • {
    }
]

API Version

API version.

Responses
200

success

401

unable to authorize the given bearer token

403

access to this api is not allowed

get/version
Request samples
Response samples
text/plain
1.0.2