Get roles for an Elasticsearch project

GET /api/v1/serverless/projects/elasticsearch/{id}/roles

Retrieve the custom roles defined for an Elasticsearch project.

Path parameters

  • id string Required

    The ID of the project

    Format should match the following pattern: ^[a-z0-9]{32}$.

Responses

  • 200 application/json

    The requested roles

    Hide headers attribute Show headers attribute
    Hide response attribute Show response attribute object
    • * object Additional properties
      Hide * attribute Show * attribute object
      • roles array[object]
        Hide roles attributes Show roles attributes object

        Roles of a serverless project.

        • name string Required

          A role name for a particular project

        • description string Required

          A role description for a particular role

  • 404 application/json

    Not Found

    Hide response attribute Show response attribute object

    A non-empty list of errors.

    • errors array[object] Required
      Hide errors attributes Show errors attributes object

      An error response returned by the API.

      • message string Required

        A human-readable message of the error.

      • code string Required

        An identifier for this type of error.

GET /api/v1/serverless/projects/elasticsearch/{id}/roles
curl \
 -X GET https://api.elastic-cloud.com/api/v1/serverless/projects/elasticsearch/{id}/roles
Response examples (200)
# Headers
ETag: string

# Payload
{
  "additionalProperty1": {
    "roles": [
      {
        "name": "string",
        "description": "string"
      }
    ]
  },
  "additionalProperty2": {
    "roles": [
      {
        "name": "string",
        "description": "string"
      }
    ]
  }
}
Response examples (404)
{
  "errors": [
    {
      "message": "Explicative error message",
      "code": "code.error"
    }
  ]
}