Skip to content

Capabilities

Reference for the capabilities endpoints of the Surfmeter API.

Surfmeter API – Capabilities 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

Capabilities


GET /capabilities

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

{
    "capabilities": [
        {
            "id": 0,
            "name": "string",
            "comment": "string",
            "allowed_measurement_types": [
                "string"
            ],
            "allowed_measurement_subjects": [
                "string"
            ],
            "forbidden_measurement_types": [
                "string"
            ],
            "forbidden_measurement_subjects": [
                "string"
            ],
            "registration_keys_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
{
    "type": "object",
    "properties": {
        "capabilities": {
            "type": "array",
            "items": {
                "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"
                        }
                    },
                    "registration_keys_count": {
                        "type": "integer"
                    }
                },
                "required": [
                    "id",
                    "name",
                    "registration_keys_count"
                ]
            }
        }
    },
    "required": [
        "capabilities"
    ]
}

POST /capabilities

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",
    "comment": "string",
    "allowed_measurement_types": [
        "string"
    ],
    "allowed_measurement_subjects": [
        "string"
    ],
    "forbidden_measurement_types": [
        "string"
    ],
    "forbidden_measurement_subjects": [
        "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
{
    "type": "object",
    "properties": {
        "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": [
        "name"
    ]
}

Response 201 Created

{
    "capability": {
        "id": 0,
        "name": "string",
        "comment": "string",
        "allowed_measurement_types": [
            "string"
        ],
        "allowed_measurement_subjects": [
            "string"
        ],
        "forbidden_measurement_types": [
            "string"
        ],
        "forbidden_measurement_subjects": [
            "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
{
    "type": "object",
    "properties": {
        "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"
            ]
        }
    },
    "required": [
        "capability"
    ]
}

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

{
    "capability": {
        "id": 0,
        "name": "string",
        "comment": "string",
        "allowed_measurement_types": [
            "string"
        ],
        "allowed_measurement_subjects": [
            "string"
        ],
        "forbidden_measurement_types": [
            "string"
        ],
        "forbidden_measurement_subjects": [
            "string"
        ],
        "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,
                "clients_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
{
    "type": "object",
    "properties": {
        "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"
                    }
                },
                "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"
                            },
                            "clients_count": {
                                "type": "integer"
                            }
                        },
                        "required": [
                            "id",
                            "registration_key"
                        ]
                    }
                }
            },
            "required": [
                "id",
                "name"
            ]
        }
    },
    "required": [
        "capability"
    ]
}

PUT /capabilities/{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",
    "comment": "string",
    "allowed_measurement_types": [
        "string"
    ],
    "allowed_measurement_subjects": [
        "string"
    ],
    "forbidden_measurement_types": [
        "string"
    ],
    "forbidden_measurement_subjects": [
        "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
{
    "type": "object",
    "properties": {
        "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": []
}

Response 200 OK

{
    "capability": {
        "id": 0,
        "name": "string",
        "comment": "string",
        "allowed_measurement_types": [
            "string"
        ],
        "allowed_measurement_subjects": [
            "string"
        ],
        "forbidden_measurement_types": [
            "string"
        ],
        "forbidden_measurement_subjects": [
            "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
{
    "type": "object",
    "properties": {
        "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"
            ]
        }
    },
    "required": [
        "capability"
    ]
}

DELETE /capabilities/{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
{
    "type": "object",
    "properties": {},
    "required": []
}

Schemas

CapabilityCreateData

Name Type
allowed_measurement_subjects Array<string>
allowed_measurement_types Array<string>
comment string| null
forbidden_measurement_subjects Array<string>
forbidden_measurement_types Array<string>
name string

CapabilityCreateResponse

Name Type
capability Properties: id, name, comment, allowed_measurement_types, allowed_measurement_subjects, forbidden_measurement_types, forbidden_measurement_subjects

CapabilityDestroyResponse

CapabilityIndexResponse

Name Type
capabilities Array<Properties: id, name, comment, allowed_measurement_types, allowed_measurement_subjects, forbidden_measurement_types, forbidden_measurement_subjects, registration_keys_count>

CapabilityShowResponse

Name Type
capability Properties: id, name, comment, allowed_measurement_types, allowed_measurement_subjects, forbidden_measurement_types, forbidden_measurement_subjects, registration_keys

CapabilityUpdateData

Name Type
allowed_measurement_subjects Array<string>
allowed_measurement_types Array<string>
comment string| null
forbidden_measurement_subjects Array<string>
forbidden_measurement_types Array<string>
name string

CapabilityUpdateResponse

Name Type
capability Properties: id, name, comment, allowed_measurement_types, allowed_measurement_subjects, forbidden_measurement_types, forbidden_measurement_subjects

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.