List role assignments

GET /Organizations/{OrganizationSid}/RoleAssignments

List role assignments for the given organization

Path parameters

  • OrganizationSid string(OrganizationSid) Required

    Format should match the following pattern: OR[0-9a-f]{32}.

Query parameters

  • PageSize integer(int32)

    Minimum value is 1, maximum value is 100. Default value is 100.

  • PageToken string

    Minimum length is 1, maximum length is 4096.

  • Identity string(Sid)

    Format should match the following pattern: ^[A-Z]{2}[0-9a-fA-F]{32}$.

  • Scope string(Sid)

    Format should match the following pattern: ^[A-Z]{2}[0-9a-fA-F]{32}$.

Responses

  • 200 application/json

    Returned list of role assignments

    Hide headers attributes Show headers attributes
    • Access-Control-Allow-Origin string

      Specify the origin(s) allowed to access the resource

    • Access-Control-Allow-Methods string

      Specify the HTTP methods allowed when accessing the resource

    • Access-Control-Allow-Headers string

      Specify the headers allowed when accessing the resource

    • Access-Control-Allow-Credentials boolean

      Indicates whether the browser should include credentials

    • Access-Control-Expose-Headers string

      Headers exposed to the client

    Hide response attributes Show response attributes object
    • content array[object]

      Page content

      Hide content attributes Show content attributes object
      • sid string(IamRoleAssignmentSid)

        Twilio Role Assignment Sid representing this role assignment

        Format should match the following pattern: IY[0-9a-f]{32}.

      • role_sid string(IamRoleSid)

        Twilio Role Sid representing assigned role

        Format should match the following pattern: IX[0-9a-f]{32}.

      • scope string(Sid)

        Twilio Sid representing identity of this assignment

        Format should match the following pattern: ^[A-Z]{2}[0-9a-fA-F]{32}$.

      • identity string(Sid)

        Twilio Sid representing scope of this assignment

        Format should match the following pattern: ^[A-Z]{2}[0-9a-fA-F]{32}$.

    • meta object
      Hide meta attributes Show meta attributes object
      • first_page_url string(uri)
      • key string
      • next_page_url string(uri) | null
      • page integer
      • page_size integer
      • previous_page_url string(uri) | null
      • url string(uri)
  • 400 application/json

    Bad request

    Hide headers attributes Show headers attributes
    • Access-Control-Allow-Origin string

      Specify the origin(s) allowed to access the resource

    • Access-Control-Allow-Methods string

      Specify the HTTP methods allowed when accessing the resource

    • Access-Control-Allow-Headers string

      Specify the headers allowed when accessing the resource

    • Access-Control-Allow-Credentials boolean

      Indicates whether the browser should include credentials

    • Access-Control-Expose-Headers string

      Headers exposed to the client

    Hide response attributes Show response attributes object
    • code integer(int32)

      Twilio-specific error code

    • message string

      Error message

    • moreInfo string

      Link to Error Code References

    • status integer(int32)

      HTTP response status code

  • 403 application/json

    Unauthorized

    Hide headers attributes Show headers attributes
    • Access-Control-Allow-Origin string

      Specify the origin(s) allowed to access the resource

    • Access-Control-Allow-Methods string

      Specify the HTTP methods allowed when accessing the resource

    • Access-Control-Allow-Headers string

      Specify the headers allowed when accessing the resource

    • Access-Control-Allow-Credentials boolean

      Indicates whether the browser should include credentials

    • Access-Control-Expose-Headers string

      Headers exposed to the client

    Hide response attributes Show response attributes object
    • code integer(int32)

      Twilio-specific error code

    • message string

      Error message

    • moreInfo string

      Link to Error Code References

    • status integer(int32)

      HTTP response status code

GET /Organizations/{OrganizationSid}/RoleAssignments
curl \
 --request GET 'https://preview-iam.twilio.com/Organizations/OR33f4f3aa6fffe840d000f8ef22e883db/RoleAssignments' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
# Headers
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: POST, OPTIONS
Access-Control-Allow-Headers: Content-Type, Authorization
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: X-Custom-Header1, X-Custom-Header2

# Payload
{
  "content": [
    {
      "sid": "IYc4ddb9d0befdb122b0eff334e3084544",
      "role_sid": "IXc4ddb9d0befdb122b0eff334e3084544",
      "scope": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "identity": "USc4ddb9d0befdb122b0eff334e3084544"
    }
  ],
  "meta": {
    "first_page_url": "https://example.com",
    "key": "string",
    "next_page_url": "https://example.com",
    "page": 42,
    "page_size": 42,
    "previous_page_url": "https://example.com",
    "url": "https://example.com"
  }
}
Response examples (400)
# Headers
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: POST, OPTIONS
Access-Control-Allow-Headers: Content-Type, Authorization
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: X-Custom-Header1, X-Custom-Header2

# Payload
{
  "code": 42,
  "message": "string",
  "moreInfo": "string",
  "status": 42
}
Response examples (403)
# Headers
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: POST, OPTIONS
Access-Control-Allow-Headers: Content-Type, Authorization
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: X-Custom-Header1, X-Custom-Header2

# Payload
{
  "code": 42,
  "message": "string",
  "moreInfo": "string",
  "status": 42
}