service_accounts

Search service accounts with paging

Required permissions (See note in the introduction for an explanation): action: serviceaccounts:read scope: serviceaccounts:*

get/serviceaccounts/search

Request

  • Base URL
    /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /api/serviceaccounts/search
  • Auth
    • HTTP basic
    • or API key in header Authorization

Query parameters

Disabledboolean
expiredTokensboolean
querystring

It will return results where the query value is contained in one of the name. Query values with spaces need to be URL encoded.

perpageinteger

The default value is 1000.

pageinteger

The default value is 1.

Response

(empty)

pageinteger
perPageinteger
totalCountinteger

It can be used for pagination of the user list E.g. if totalCount is equal to 100 users and the perpage parameter is set to 10 then there are 10 pages of users.

Example response

{
  "serviceAccounts": [
    {
      "accessControl": {
        "serviceaccounts:delete": true,
        "serviceaccounts:read": true,
        "serviceaccounts:write": true
      },
      "avatarUrl": "/avatar/85ec38023d90823d3e5b43ef35646af9",
      "login": "sa-grafana",
      "name": "grafana",
      "orgId": 1,
      "role": "Viewer"
    }
  ]
}

Changes

No recorded changes to this operation across all 2 revisions of this API.