Access

List Resource Access Grants

List access grants for a resource

GET
https://api.textreveal.com/v3/acl/{resource_type}/{resource_id}

Request

Parameters

  • resource_type*string (enum)

    Type of the resource the access grants apply to. Only 'universe' for now.

    Values: "universe"
  • resource_id*uuid

    Unique identifier of the universe.

    Example: "75ebc096-749e-4b8f-b690-df13daf49c62"
  • sizeinteger

    Number of records per page

    Default: 10Range: [1, 1000]
  • search_afteruuid

    The last ID on the page you're currently on when you want to fetch the next page.

  • grant_typestring (enum)

    Whether the grant targets a single user or a whole organization.

    Values: "USER", "ORGANIZATION"
  • grant_iduuid

    Identifier of the user or organization the grant targets, depending on resource_type.

    Example: "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  • fields(string (enum))[]

    Fields to include in the response

    Default: ["acl_id", "resource_type", "resource_id", "grant_type", "grant_id", "access_level", "granted_by", "granted_at"]

Response

Response - 200

Access grants for the given resource

  • data*object[]

    Access grants visible to the caller.

    Array length: [0, ∞]
  • size*integer

    Number of records per page requested.

    Minimum: 1
  • has_next*boolean

    True if there are more records available.

    Example: true
  • count*integer

    Number of records returned in the current page.

    Minimum: 0
  • search_after*string | null

    Cursor for next page.

Response
{
  "data": [
    {
      "acl_id": "9c858e93-6f36-4f3e-9c34-5f6a1a3d9b21",
      "resource_type": "universe",
      "resource_id": "75ebc096-749e-4b8f-b690-df13daf49c62",
      "grant_type": "USER",
      "grant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "access_level": "OWNER",
      "granted_by": "d290f1ee-6c54-4b01-90e6-d701748f0851",
      "granted_at": "2024-01-01T00:00:00.000Z"
    }
  ],
  "size": 1,
  "has_next": true,
  "count": 1,
  "search_after": "string"
}

Error

Error - 400

Bad request

  • message*string

    Error message.

    Example: "Check the errors field for more details"
  • code*number (enum)

    Error code.

    Values: 400
  • reason*string (enum)

    Error reason.

    Values: "invalid"
  • errorsobject[]

    Possible error causes.

    Array length: [1, ∞]
Response
{
  "message": "Check the errors field for more details",
  "code": 400,
  "reason": "invalid",
  "errors": [
    {
      "message": "string",
      "field": "size",
      "reason": "invalid_type"
    }
  ]
}

Error - 401

Unauthorized

  • message*string

    Error message.

    Example: "Authorization header is expected"
  • code*number (enum)

    Error code.

    Values: 401
  • reason*string (enum)

    Error reason.

    Values: "unauthorized"
  • errors*object[]
    Array length: [1, 1]
Response
{
  "message": "Authorization header is expected",
  "code": 401,
  "reason": "unauthorized",
  "errors": [
    {
      "message": "Required",
      "field": "headers.authorization",
      "reason": "invalid_type"
    }
  ]
}

Error - 402

Payment required

  • message*string

    Error message.

    Example: "Your account does not have access to this entity. Contact SESAMm sales for more information."
  • code*number (enum)

    Error code.

    Values: 402
  • reason*string (enum)

    Error reason.

    Values: "forbidden"
Response
{
  "message": "Your account does not have access to this entity. Contact SESAMm sales for more information.",
  "code": 402,
  "reason": "forbidden"
}

Error - 403

Forbidden

  • message*string

    Error message.

    Example: "Missing required permissions to perform this action."
  • code*number (enum)

    Error code.

    Values: 403
  • reason*string (enum)

    Error reason.

    Values: "forbidden"
Response
{
  "message": "Missing required permissions to perform this action.",
  "code": 403,
  "reason": "forbidden"
}

Error - 404

Not found

  • message*string

    Error message.

    Example: "The requested universe does not exist or is not visible to your organization."
  • code*number (enum)

    Error code.

    Values: 404
  • reason*string (enum)

    Error reason.

    Values: "not_found"
Response
{
  "message": "The requested universe does not exist or is not visible to your organization.",
  "code": 404,
  "reason": "not_found"
}

Error - 405

Method not allowed

  • message*string

    Error message.

    Example: "Method Not Allowed"
  • code*number (enum)

    Error code.

    Values: 405
  • reason*string (enum)

    Error reason.

    Values: "invalid"
Response
{
  "message": "Method Not Allowed",
  "code": 405,
  "reason": "invalid"
}

Generic errors are not shown, see Errors for more details.