Registration Keys¶
Reference for the registration_keys endpoints of the Surfmeter API.
Surfmeter API – Registration Keys v1¶
The Surfmeter API lets you manage clients, users, capabilities, measurements, and organization-wide settings programmatically.
Servers¶
| Description | URL |
|---|---|
| https://surfmeter-server.{host}/client_admin_api/v1 | https://surfmeter-server.{host}/client_admin_api/v1 |
Registration Keys¶
GET /registration_keys¶
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
ApiKeyAuth |
header | string | N/A | No | API key used on every request. Create keys in the Surfmeter Dashboard under Keys → Surfmeter API Keys. |
Response 200 OK
{
"registration_keys": [
{
"id": 0,
"registration_key": "string",
"comment": "string",
"valid_from": "string",
"valid_until": "string",
"num_registrations_left": 0,
"usage_limit_days": 0,
"testing": true,
"capability": {
"id": 0,
"name": "string",
"comment": "string",
"allowed_measurement_types": [
"string"
],
"allowed_measurement_subjects": [
"string"
],
"forbidden_measurement_types": [
"string"
],
"forbidden_measurement_subjects": [
"string"
]
},
"clients_count": 0
}
]
}
Schema of the response body
{
"type": "object",
"properties": {
"registration_keys": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"registration_key": {
"type": "string"
},
"comment": {
"type": "string",
"nullable": true
},
"valid_from": {
"type": "string"
},
"valid_until": {
"type": "string"
},
"num_registrations_left": {
"type": "integer"
},
"usage_limit_days": {
"type": "integer",
"nullable": true
},
"testing": {
"type": "boolean"
},
"capability": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"comment": {
"type": "string",
"nullable": true
},
"allowed_measurement_types": {
"type": "array",
"items": {
"type": "string"
}
},
"allowed_measurement_subjects": {
"type": "array",
"items": {
"type": "string"
}
},
"forbidden_measurement_types": {
"type": "array",
"items": {
"type": "string"
}
},
"forbidden_measurement_subjects": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"id",
"name",
"allowed_measurement_types",
"allowed_measurement_subjects",
"forbidden_measurement_types",
"forbidden_measurement_subjects"
],
"nullable": true
},
"clients_count": {
"type": "integer"
}
},
"required": [
"id",
"registration_key",
"valid_from",
"valid_until",
"num_registrations_left",
"testing",
"clients_count"
]
}
}
},
"required": [
"registration_keys"
]
}
POST /registration_keys¶
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
ApiKeyAuth |
header | string | N/A | No | API key used on every request. Create keys in the Surfmeter Dashboard under Keys → Surfmeter API Keys. |
Request body
{
"comment": "string",
"valid_until": "string",
"num_registrations_left": 0,
"capability_id": 0,
"usage_limit_days": 0,
"testing": true
}
Schema of the request body
{
"type": "object",
"properties": {
"comment": {
"type": "string",
"nullable": true
},
"valid_until": {
"type": "string",
"nullable": true
},
"num_registrations_left": {
"type": "integer",
"nullable": true
},
"capability_id": {
"type": "integer",
"nullable": true
},
"usage_limit_days": {
"type": "integer",
"nullable": true
},
"testing": {
"type": "boolean",
"nullable": true
}
},
"required": []
}
Response 201 Created
{
"registration_key": {
"id": 0,
"registration_key": "string",
"comment": "string",
"valid_from": "string",
"valid_until": "string",
"num_registrations_left": 0,
"usage_limit_days": 0,
"testing": true,
"capability": {
"id": 0,
"name": "string",
"comment": "string",
"allowed_measurement_types": [
"string"
],
"allowed_measurement_subjects": [
"string"
],
"forbidden_measurement_types": [
"string"
],
"forbidden_measurement_subjects": [
"string"
]
}
}
}
Schema of the response body
{
"type": "object",
"properties": {
"registration_key": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"registration_key": {
"type": "string"
},
"comment": {
"type": "string",
"nullable": true
},
"valid_from": {
"type": "string"
},
"valid_until": {
"type": "string"
},
"num_registrations_left": {
"type": "integer"
},
"usage_limit_days": {
"type": "integer",
"nullable": true
},
"testing": {
"type": "boolean"
},
"capability": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"comment": {
"type": "string",
"nullable": true
},
"allowed_measurement_types": {
"type": "array",
"items": {
"type": "string"
}
},
"allowed_measurement_subjects": {
"type": "array",
"items": {
"type": "string"
}
},
"forbidden_measurement_types": {
"type": "array",
"items": {
"type": "string"
}
},
"forbidden_measurement_subjects": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"id",
"name",
"allowed_measurement_types",
"allowed_measurement_subjects",
"forbidden_measurement_types",
"forbidden_measurement_subjects"
],
"nullable": true
}
},
"required": [
"id",
"registration_key",
"valid_from",
"valid_until",
"num_registrations_left",
"testing"
]
}
},
"required": [
"registration_key"
]
}
GET /registration_keys/{id}¶
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
ApiKeyAuth |
header | string | N/A | No | API key used on every request. Create keys in the Surfmeter Dashboard under Keys → Surfmeter API Keys. |
id |
path | string | No |
Response 200 OK
{
"registration_key": {
"id": 0,
"registration_key": "string",
"comment": "string",
"valid_from": "string",
"valid_until": "string",
"num_registrations_left": 0,
"usage_limit_days": 0,
"testing": true,
"capability": {
"id": 0,
"name": "string",
"comment": "string",
"allowed_measurement_types": [
"string"
],
"allowed_measurement_subjects": [
"string"
],
"forbidden_measurement_types": [
"string"
],
"forbidden_measurement_subjects": [
"string"
]
},
"clients": [
{
"id": 0,
"uuid": "string",
"label": "string"
}
]
}
}
Schema of the response body
{
"type": "object",
"properties": {
"registration_key": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"registration_key": {
"type": "string"
},
"comment": {
"type": "string",
"nullable": true
},
"valid_from": {
"type": "string"
},
"valid_until": {
"type": "string"
},
"num_registrations_left": {
"type": "integer"
},
"usage_limit_days": {
"type": "integer",
"nullable": true
},
"testing": {
"type": "boolean"
},
"capability": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"comment": {
"type": "string",
"nullable": true
},
"allowed_measurement_types": {
"type": "array",
"items": {
"type": "string"
}
},
"allowed_measurement_subjects": {
"type": "array",
"items": {
"type": "string"
}
},
"forbidden_measurement_types": {
"type": "array",
"items": {
"type": "string"
}
},
"forbidden_measurement_subjects": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"id",
"name",
"allowed_measurement_types",
"allowed_measurement_subjects",
"forbidden_measurement_types",
"forbidden_measurement_subjects"
],
"nullable": true
},
"clients": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"uuid": {
"type": "string"
},
"label": {
"type": "string",
"nullable": true
}
}
}
}
},
"required": [
"id",
"registration_key",
"valid_from",
"valid_until",
"num_registrations_left",
"testing",
"clients"
]
}
},
"required": [
"registration_key"
]
}
PUT /registration_keys/{id}¶
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
ApiKeyAuth |
header | string | N/A | No | API key used on every request. Create keys in the Surfmeter Dashboard under Keys → Surfmeter API Keys. |
id |
path | string | No |
Request body
{
"comment": "string",
"valid_until": "string",
"num_registrations_left": 0,
"capability_id": 0,
"usage_limit_days": 0,
"testing": true
}
Schema of the request body
{
"type": "object",
"properties": {
"comment": {
"type": "string",
"nullable": true
},
"valid_until": {
"type": "string",
"nullable": true
},
"num_registrations_left": {
"type": "integer",
"nullable": true
},
"capability_id": {
"type": "integer",
"nullable": true
},
"usage_limit_days": {
"type": "integer",
"nullable": true
},
"testing": {
"type": "boolean",
"nullable": true
}
},
"required": []
}
Response 200 OK
{
"registration_key": {
"id": 0,
"registration_key": "string",
"comment": "string",
"valid_from": "string",
"valid_until": "string",
"num_registrations_left": 0,
"usage_limit_days": 0,
"testing": true,
"capability": {
"id": 0,
"name": "string",
"comment": "string",
"allowed_measurement_types": [
"string"
],
"allowed_measurement_subjects": [
"string"
],
"forbidden_measurement_types": [
"string"
],
"forbidden_measurement_subjects": [
"string"
]
}
}
}
Schema of the response body
{
"type": "object",
"properties": {
"registration_key": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"registration_key": {
"type": "string"
},
"comment": {
"type": "string",
"nullable": true
},
"valid_from": {
"type": "string"
},
"valid_until": {
"type": "string"
},
"num_registrations_left": {
"type": "integer"
},
"usage_limit_days": {
"type": "integer",
"nullable": true
},
"testing": {
"type": "boolean"
},
"capability": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"comment": {
"type": "string",
"nullable": true
},
"allowed_measurement_types": {
"type": "array",
"items": {
"type": "string"
}
},
"allowed_measurement_subjects": {
"type": "array",
"items": {
"type": "string"
}
},
"forbidden_measurement_types": {
"type": "array",
"items": {
"type": "string"
}
},
"forbidden_measurement_subjects": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"id",
"name",
"allowed_measurement_types",
"allowed_measurement_subjects",
"forbidden_measurement_types",
"forbidden_measurement_subjects"
],
"nullable": true
}
},
"required": [
"id",
"registration_key",
"valid_from",
"valid_until",
"num_registrations_left",
"testing"
]
}
},
"required": [
"registration_key"
]
}
DELETE /registration_keys/{id}¶
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
ApiKeyAuth |
header | string | N/A | No | API key used on every request. Create keys in the Surfmeter Dashboard under Keys → Surfmeter API Keys. |
id |
path | string | No |
Response 200 OK
Schemas¶
RegistrationKeyCreateData¶
| Name | Type |
|---|---|
capability_id |
integer| null |
comment |
string| null |
num_registrations_left |
integer| null |
testing |
boolean| null |
usage_limit_days |
integer| null |
valid_until |
string| null |
RegistrationKeyCreateResponse¶
| Name | Type |
|---|---|
registration_key |
Properties: id, registration_key, comment, valid_from, valid_until, num_registrations_left, usage_limit_days, testing, capability |
RegistrationKeyDestroyResponse¶
RegistrationKeyIndexResponse¶
| Name | Type |
|---|---|
registration_keys |
Array<Properties: id, registration_key, comment, valid_from, valid_until, num_registrations_left, usage_limit_days, testing, capability, clients_count> |
RegistrationKeyShowResponse¶
| Name | Type |
|---|---|
registration_key |
Properties: id, registration_key, comment, valid_from, valid_until, num_registrations_left, usage_limit_days, testing, capability, clients |
RegistrationKeyUpdateData¶
| Name | Type |
|---|---|
capability_id |
integer| null |
comment |
string| null |
num_registrations_left |
integer| null |
testing |
boolean| null |
usage_limit_days |
integer| null |
valid_until |
string| null |
RegistrationKeyUpdateResponse¶
| Name | Type |
|---|---|
registration_key |
Properties: id, registration_key, comment, valid_from, valid_until, num_registrations_left, usage_limit_days, testing, capability |
Security schemes¶
| Name | Type | Scheme | Description |
|---|---|---|---|
| ApiKeyAuth | apiKey | API key used on every request. Create keys in the Surfmeter Dashboard under Keys → Surfmeter API Keys. |