Skip to main content

Client Groups

Reference for the client_groups endpoints of the Surfmeter API.

Surfmeter API – Client Groups 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

Client Groups​


GET /client_groups​

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

{
"client_groups": [
{
"id": 0,
"name": "string",
"description": "string",
"client_count": 0
}
]
}

⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
"description": "Response for client groups index action",
"type": "object",
"required": [
"client_groups"
],
"properties": {
"client_groups": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"name",
"client_count"
],
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"description": {
"type": "string",
"nullable": true
},
"client_count": {
"type": "integer"
}
}
}
}
}
}

POST /client_groups​

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

{
"name": "string",
"description": "string"
}

⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
"description": "Data for client group create action",
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string",
"nullable": true
}
}
}

Response 201 Created

{
"client_group": {
"id": 0,
"name": "string",
"description": "string",
"client_count": 0
}
}

⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
"description": "Response for client group create action",
"type": "object",
"required": [
"client_group"
],
"properties": {
"client_group": {
"type": "object",
"required": [
"id",
"name",
"client_count"
],
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"description": {
"type": "string",
"nullable": true
},
"client_count": {
"type": "integer"
}
}
}
}
}

GET /client_groups/{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

{
"client_group": {
"id": 0,
"name": "string",
"description": "string",
"client_count": 0,
"clients": [
{
"id": 0,
"uuid": "string",
"type": "string",
"label": "string",
"extra_label": "string",
"owner_name": "string",
"build_flavor": "string",
"project": "string",
"tags": [
"string"
],
"client_groups": [
{
"id": 0,
"name": "string",
"description": "string"
}
]
}
]
}
}

⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
"description": "Response for client group show action",
"type": "object",
"required": [
"client_group"
],
"properties": {
"client_group": {
"type": "object",
"required": [
"id",
"name",
"client_count",
"clients"
],
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"description": {
"type": "string",
"nullable": true
},
"client_count": {
"type": "integer"
},
"clients": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"uuid"
],
"properties": {
"id": {
"type": "integer"
},
"uuid": {
"type": "string"
},
"type": {
"type": "string",
"nullable": true
},
"label": {
"type": "string",
"nullable": true
},
"extra_label": {
"type": "string",
"nullable": true
},
"owner_name": {
"type": "string",
"nullable": true
},
"build_flavor": {
"type": "string",
"nullable": true
},
"project": {
"type": "string",
"nullable": true
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"nullable": true
},
"client_groups": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"name"
],
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"description": {
"type": "string",
"nullable": true
}
}
}
}
}
}
}
}
}
}
}

PUT /client_groups/{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

{
"name": "string",
"description": "string",
"client_ids": [
0
]
}

⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
"description": "Data for client group update action",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string",
"nullable": true
},
"client_ids": {
"type": "array",
"items": {
"type": "integer"
}
}
}
}

Response 200 OK

{
"client_group": {
"id": 0,
"name": "string",
"description": "string",
"client_count": 0
}
}

⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
"description": "Response for client group update action",
"type": "object",
"required": [
"client_group"
],
"properties": {
"client_group": {
"type": "object",
"required": [
"id",
"name",
"client_count"
],
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"description": {
"type": "string",
"nullable": true
},
"client_count": {
"type": "integer"
}
}
}
}
}

DELETE /client_groups/{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

Schema of the response body
{
"description": "Response for client group destroy action",
"type": "object",
"properties": {}
}

POST /client_groups/{id}/assign_configs​

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

{
"public_config_id": 0,
"automator_config_id": 0
}

⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
"description": "Data for assigning configs to every client of a client group",
"type": "object",
"properties": {
"public_config_id": {
"description": "Measurement config to assign",
"type": "integer"
},
"automator_config_id": {
"description": "Schedule config to assign",
"type": "integer"
}
}
}

Response 200 OK

{
"assigned_clients": [
{
"id": 0,
"uuid": "string",
"label": "string",
"extra_label": "string"
}
],
"skipped_clients": [
{
"id": 0,
"uuid": "string",
"label": "string",
"extra_label": "string",
"reason": "string"
}
]
}

⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
"description": "Response for assigning configs to every client of a client group",
"type": "object",
"required": [
"assigned_clients",
"skipped_clients"
],
"properties": {
"assigned_clients": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"uuid"
],
"properties": {
"id": {
"type": "integer"
},
"uuid": {
"type": "string"
},
"label": {
"type": "string",
"nullable": true
},
"extra_label": {
"type": "string",
"nullable": true
}
}
}
},
"skipped_clients": {
"description": "Clients that were not assigned, for example because they cannot pull V2 configs",
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"uuid",
"reason"
],
"properties": {
"id": {
"type": "integer"
},
"uuid": {
"type": "string"
},
"label": {
"type": "string",
"nullable": true
},
"extra_label": {
"type": "string",
"nullable": true
},
"reason": {
"type": "string"
}
}
}
}
}
}

Schemas​

ClientGroupAssignConfigsData​

Name Type
automator_config_id integer
public_config_id integer

ClientGroupAssignConfigsResponse​

Name Type
assigned_clients Array<Properties: id, uuid, label, extra_label>
skipped_clients Array<Properties: id, uuid, label, extra_label, reason>

ClientGroupCreateData​

Name Type
description string| null
name string

ClientGroupCreateResponse​

Name Type
client_group Properties: id, name, description, client_count

ClientGroupDestroyResponse​

ClientGroupIndexResponse​

Name Type
client_groups Array<Properties: id, name, description, client_count>

ClientGroupShowResponse​

Name Type
client_group Properties: id, name, description, client_count, clients

ClientGroupUpdateData​

Name Type
client_ids Array<integer>
description string| null
name string

ClientGroupUpdateResponse​

Name Type
client_group Properties: id, name, description, client_count

Security schemes​

<tr>
<td>ApiKeyAuth</td>
<td>apiKey</td>
<td></td>
<td>API key used on every request. Create keys in the Surfmeter Dashboard

under Keys → Surfmeter API Keys.

</tbody>
Name Type Scheme Description