Skip to 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": {}
}

Schemas

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

Name Type Scheme Description
ApiKeyAuth apiKey API key used on every request. Create keys in the Surfmeter Dashboard under Keys → Surfmeter API Keys.