Reference-Data

Get a reference dataset

Returns a single reference dataset by name, so you can map the codes that appear in call data to human-readable labels in your own reporting and UI.

When to use. Look up the fixed lookup values used across call data, for example to turn a Q.850 cause code or a SIP response code into a readable label, to list the possible call statuses, or to map a country id to its ISO code and name. These values change rarely, so you can fetch them once and cache them.

Parameters. dataset-name (path, required) selects which dataset to return. Allowed values:

  • object-types: call object type ID to its meaning.
  • status: the possible call status values.
  • q850: Q.850 disconnect cause code to its meaning.
  • client-hangup-dispositions: the possible values identifying who ended the call.
  • sip-term-statuses: SIP termination response code to its reason phrase.
  • countries: country ISO 3166-1 alpha-2 code to an object with the country id and name. Use it to resolve the country ids returned elsewhere in the API.

Returns. A single-key object whose key is the requested dataset-name and whose value is that dataset: a map of code to label, a flat list of string values, or for countries a map of ISO code to an object with id and name. An unknown dataset name returns 404.

Example. GET /api/reference-data/q850

get/{sub_domain}/api/reference-data/{dataset_name}

Request

  • Base URL
    https://api.commpeak.com/pbx
  • URL
    https://api.commpeak.com/pbx/{sub_domain}/api/reference-data/{dataset_name}
  • Auth
    API key in header Authorization

Path parameters

dataset_name'object-types' | 'status' | 'q850' | 'client-hangup-dispositions' | 'sip-term-statuses' | 'countries' required

The name of the dataset to retrieve.

sub_domainstring required

PBX Name (subdomain)

Response

Successful Response

object-typesobject nullable

Call object type ID to its meaning.

statusstring[] nullable

Possible call status values.

q850object nullable

Q.850 disconnect cause code to its meaning.

client-hangup-dispositionsstring[] nullable

Possible values identifying who ended the call.

sip-term-statusesobject nullable

SIP termination response code to its reason phrase.

countriesobject nullable

Country ISO 3166-1 alpha-2 code to the country id and name. The id is the value used wherever the API refers to a country by id.

Example response

{
  "q850": {
    "16": "Normal Clearing",
    "17": "User Busy"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.