Skip to content

Service Credentials

Reference for the service_credentials endpoints of the Surfmeter API.

Surfmeter API – Service Credentials 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

Service Credentials


GET /service_credentials

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

{
    "service_credentials": [
        {
            "id": 0,
            "name": "string",
            "service": "string",
            "username": "string",
            "created_at": "string",
            "updated_at": "string",
            "password_set": true
        }
    ]
}
⚠️ 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": {
        "service_credentials": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "name": {
                        "type": "string"
                    },
                    "service": {
                        "type": "string"
                    },
                    "username": {
                        "type": "string",
                        "nullable": true
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "updated_at": {
                        "type": "string"
                    },
                    "password_set": {
                        "type": "boolean"
                    }
                },
                "required": [
                    "id",
                    "name",
                    "service",
                    "created_at",
                    "updated_at",
                    "password_set"
                ]
            }
        }
    },
    "required": [
        "service_credentials"
    ]
}

POST /service_credentials

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",
    "service": "string",
    "username": "string",
    "password": "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 service credential create action",
    "type": "object",
    "required": [
        "name",
        "service"
    ],
    "properties": {
        "name": {
            "type": "string"
        },
        "service": {
            "type": "string"
        },
        "username": {
            "type": "string"
        },
        "password": {
            "type": "string"
        }
    }
}

Response 201 Created

{
    "service_credential": {
        "id": 0,
        "name": "string",
        "service": "string",
        "username": "string",
        "created_at": "string",
        "updated_at": "string",
        "password_set": true
    }
}
⚠️ 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": {
        "service_credential": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                },
                "service": {
                    "type": "string"
                },
                "username": {
                    "type": "string",
                    "nullable": true
                },
                "created_at": {
                    "type": "string"
                },
                "updated_at": {
                    "type": "string"
                },
                "password_set": {
                    "type": "boolean"
                }
            },
            "required": [
                "id",
                "name",
                "service",
                "created_at",
                "updated_at",
                "password_set"
            ]
        }
    },
    "required": [
        "service_credential"
    ]
}

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

{
    "service_credential": {
        "id": 0,
        "name": "string",
        "service": "string",
        "username": "string",
        "created_at": "string",
        "updated_at": "string",
        "password_set": true
    }
}
⚠️ 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": {
        "service_credential": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                },
                "service": {
                    "type": "string"
                },
                "username": {
                    "type": "string",
                    "nullable": true
                },
                "created_at": {
                    "type": "string"
                },
                "updated_at": {
                    "type": "string"
                },
                "password_set": {
                    "type": "boolean"
                }
            },
            "required": [
                "id",
                "name",
                "service",
                "created_at",
                "updated_at",
                "password_set"
            ]
        }
    },
    "required": [
        "service_credential"
    ]
}

PUT /service_credentials/{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",
    "service": "string",
    "username": "string",
    "password": "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 service credential update action. A blank or omitted `password` leaves the stored password untouched.",
    "type": "object",
    "properties": {
        "name": {
            "type": "string"
        },
        "service": {
            "type": "string"
        },
        "username": {
            "type": "string"
        },
        "password": {
            "type": "string"
        }
    }
}

Response 200 OK

{
    "service_credential": {
        "id": 0,
        "name": "string",
        "service": "string",
        "username": "string",
        "created_at": "string",
        "updated_at": "string",
        "password_set": true
    }
}
⚠️ 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": {
        "service_credential": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                },
                "service": {
                    "type": "string"
                },
                "username": {
                    "type": "string",
                    "nullable": true
                },
                "created_at": {
                    "type": "string"
                },
                "updated_at": {
                    "type": "string"
                },
                "password_set": {
                    "type": "boolean"
                }
            },
            "required": [
                "id",
                "name",
                "service",
                "created_at",
                "updated_at",
                "password_set"
            ]
        }
    },
    "required": [
        "service_credential"
    ]
}

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

ServiceCredentialCreateData

Name Type
name string
password string
service string
username string

ServiceCredentialCreateResponse

Name Type
service_credential Properties: id, name, service, username, created_at, updated_at, password_set

ServiceCredentialDestroyResponse

ServiceCredentialIndexResponse

Name Type
service_credentials Array<Properties: id, name, service, username, created_at, updated_at, password_set>

ServiceCredentialShowResponse

Name Type
service_credential Properties: id, name, service, username, created_at, updated_at, password_set

ServiceCredentialUpdateData

Name Type
name string
password string
service string
username string

ServiceCredentialUpdateResponse

Name Type
service_credential Properties: id, name, service, username, created_at, updated_at, password_set

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.