---
agentTools:
  projectIndex: https://docs.agilite.io/llms.txt
---

# /getRole

Returns a list of responsible users as an array based on the the Role Names and Conditional Levels specified

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Agilit-e Roles",
    "version": "7"
  },
  "servers": [
    {
      "url": "https://api.agilite.io/roles"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "api-key"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/getRole": {
      "post": {
        "summary": "/getRole",
        "description": "Returns a list of responsible users as an array based on the the Role Names and Conditional Levels specified",
        "operationId": "getrole",
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/json"
            }
          },
          {
            "name": "role-names",
            "in": "header",
            "description": "The Role(s) to be queried (separate using commas)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "conditional-levels",
            "in": "header",
            "description": "Keys used to return Role profile based on Levels (separate using commas)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "log-profile-key",
            "in": "header",
            "description": "Profile Key of the Batch Logging Profile configured for logging",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "param1": {
                    "type": "string",
                    "description": "Optional parameter that can be sent to the API for Handlebars purposes, used for Role Levels"
                  },
                  "param2": {
                    "type": "string",
                    "description": "Optional parameter that can be sent to the API for Handlebars purposes, used for Role Levels"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"roleIds\": [\n        \"record-id\"\n    ],\n    \"responsibleUsers\": [\n        \"roles.resp1@acme.com\",\n        \"roles.resp2@acme.com\"\n    ]\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "roleIds": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "example": "record-id"
                      }
                    },
                    "responsibleUsers": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "example": "roles.resp1@acme.com"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"statusCode\": 400,\n    \"errorMessage\": \"An Error Occurred\",\n    \"additionalMessages\": [\"An Error Occured\"]\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "integer",
                      "example": 400,
                      "default": 0
                    },
                    "errorMessage": {
                      "type": "string",
                      "example": "An Error Occurred"
                    },
                    "additionalMessages": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "example": "An Error Occured"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "5fc0c5ba525f16005dcefb9a:5fc0c5ba525f16005dcefbd8"
}
```