list-roles
restish dci list-roles
Returns a list of roles.
Responsesβ
200 (application/json)β
OK - List of roles returned.
{
"type": "object",
"properties": {
"roles": {
"type": "array",
"items": {
"type": "object",
"description": "Definition and permissions assigned to a role.",
"properties": {
"id": {
"type": "string",
"description": "The unique ID of the role."
},
"name": {
"type": "string",
"description": "The name of the role."
},
"type": {
"type": "string",
"description": "The type of the role (preset or custom)."
},
"customer": {
"type": "string",
"description": "The customer ID if this is a custom role."
},
"permissions": {
"type": "array",
"description": "List of permission IDs assigned to the role.",
"items": {
"type": "string"
}
}
}
}
}
}
}
400 (application/json)β
Bad Request - The server cannot process the request, often due to a malformed request.
{
"type": "object",
"description": "Standard error response structure.",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}
401 (application/json)β
Unauthorized - Invalid API key.
{
"type": "object",
"description": "Standard error response structure.",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}
403 (application/json)β
Forbidden - The client is not authorized to perform the request.
{
"type": "object",
"description": "Standard error response structure.",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}
500 (application/json)β
Internal Server Error - Something went wrong with the DoiT API server.
{
"type": "object",
"description": "Standard error response structure.",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}
Aliases: list-roles, listroles