Access Control#

Cloud instance groups and grants

List cloud groups#

GET/organizations/{org_id}/cloud/groups

Parameters#

NameTypeLocationRequiredDescription
org_idstringpathYesOrganization ID

Code Examples#

curl -X GET "https://platform.antfly.io/api/v1/organizations/550e8400-e29b-41d4-a716-446655440000/cloud/groups" \
-H "Authorization: Bearer YOUR_TOKEN"

Responses#

{
  "data": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "organization_id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "string",
      "slug": "string",
      "external_id": "string",
      "description": "string",
      "created_by": "550e8400-e29b-41d4-a716-446655440000",
      "created_at": "2025-10-02T15:30:00Z",
      "updated_at": "2025-10-02T15:30:00Z",
      "metadata": {}
    }
  ],
  "meta": {}
}

Create cloud group#

POST/organizations/{org_id}/cloud/groups

Parameters#

NameTypeLocationRequiredDescription
org_idstringpathYesOrganization ID

Request Body#

{
  "name": "string",
  "slug": "string",
  "description": "string",
  "metadata": {}
}

Code Examples#

curl -X POST "https://platform.antfly.io/api/v1/organizations/550e8400-e29b-41d4-a716-446655440000/cloud/groups" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"slug": "string",
"description": "string",
"metadata": {}
}'

Responses#

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "organization_id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "string",
  "slug": "string",
  "external_id": "string",
  "description": "string",
  "created_by": "550e8400-e29b-41d4-a716-446655440000",
  "created_at": "2025-10-02T15:30:00Z",
  "updated_at": "2025-10-02T15:30:00Z",
  "metadata": {}
}

Update cloud group#

PATCH/organizations/{org_id}/cloud/groups/{group_id}

Parameters#

NameTypeLocationRequiredDescription
org_idstringpathYesOrganization ID
group_idstringpathYesCloud group ID

Request Body#

{
  "name": "string",
  "description": "string",
  "metadata": {}
}

Code Examples#

curl -X PATCH "https://platform.antfly.io/api/v1/organizations/550e8400-e29b-41d4-a716-446655440000/cloud/groups/550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"description": "string",
"metadata": {}
}'

Responses#

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "organization_id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "string",
  "slug": "string",
  "external_id": "string",
  "description": "string",
  "created_by": "550e8400-e29b-41d4-a716-446655440000",
  "created_at": "2025-10-02T15:30:00Z",
  "updated_at": "2025-10-02T15:30:00Z",
  "metadata": {}
}

Get cloud user attributes#

GET/organizations/{org_id}/cloud/users/{user_id}/attributes

Parameters#

NameTypeLocationRequiredDescription
org_idstringpathYesOrganization ID
user_idstringpathYes

Code Examples#

curl -X GET "https://platform.antfly.io/api/v1/organizations/550e8400-e29b-41d4-a716-446655440000/cloud/users/550e8400-e29b-41d4-a716-446655440000/attributes" \
-H "Authorization: Bearer YOUR_TOKEN"

Responses#

{
  "organization_id": "550e8400-e29b-41d4-a716-446655440000",
  "user_id": "550e8400-e29b-41d4-a716-446655440000",
  "synced_attributes": {},
  "manual_attributes": {},
  "effective_attributes": {},
  "source": "string",
  "updated_at": "2025-10-02T15:30:00Z"
}

Update cloud user manual attributes#

PUT/organizations/{org_id}/cloud/users/{user_id}/attributes

Parameters#

NameTypeLocationRequiredDescription
org_idstringpathYesOrganization ID
user_idstringpathYes

Request Body#

{
  "manual_attributes": {}
}

Code Examples#

curl -X PUT "https://platform.antfly.io/api/v1/organizations/550e8400-e29b-41d4-a716-446655440000/cloud/users/550e8400-e29b-41d4-a716-446655440000/attributes" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"manual_attributes": {}
}'

Responses#

{
  "organization_id": "550e8400-e29b-41d4-a716-446655440000",
  "user_id": "550e8400-e29b-41d4-a716-446655440000",
  "synced_attributes": {},
  "manual_attributes": {},
  "effective_attributes": {},
  "source": "string",
  "updated_at": "2025-10-02T15:30:00Z"
}

Sync SCIM cloud groups#

PUT/organizations/{org_id}/cloud/scim/groups

Upsert SCIM-managed groups and replace their membership snapshots for an organization.

Parameters#

NameTypeLocationRequiredDescription
org_idstringpathYesOrganization ID

Request Body#

{
  "groups": [
    {
      "external_id": "string",
      "display_name": "string",
      "slug": "string",
      "description": "string",
      "members": [
        {
          "user_id": "550e8400-e29b-41d4-a716-446655440000",
          "attributes": {}
        }
      ]
    }
  ]
}

Code Examples#

curl -X PUT "https://platform.antfly.io/api/v1/organizations/550e8400-e29b-41d4-a716-446655440000/cloud/scim/groups" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"groups": [
  {
    "external_id": "string",
    "display_name": "string",
    "slug": "string",
    "description": "string",
    "members": [
      {
        "user_id": "550e8400-e29b-41d4-a716-446655440000",
        "attributes": {}
      }
    ]
  }
]
}'

Responses#

{
  "groups_synced": 0,
  "memberships_synced": 0,
  "attributes_synced": 0
}

List cloud group members#

GET/organizations/{org_id}/cloud/groups/{group_id}/members

Parameters#

NameTypeLocationRequiredDescription
org_idstringpathYesOrganization ID
group_idstringpathYesCloud group ID

Code Examples#

curl -X GET "https://platform.antfly.io/api/v1/organizations/550e8400-e29b-41d4-a716-446655440000/cloud/groups/550e8400-e29b-41d4-a716-446655440000/members" \
-H "Authorization: Bearer YOUR_TOKEN"

Responses#

{
  "data": [
    {
      "group_id": "550e8400-e29b-41d4-a716-446655440000",
      "user_id": "550e8400-e29b-41d4-a716-446655440000",
      "added_by": "550e8400-e29b-41d4-a716-446655440000",
      "added_at": "2025-10-02T15:30:00Z"
    }
  ],
  "meta": {}
}

Add cloud group member#

POST/organizations/{org_id}/cloud/groups/{group_id}/members

Parameters#

NameTypeLocationRequiredDescription
org_idstringpathYesOrganization ID
group_idstringpathYesCloud group ID

Request Body#

{
  "user_id": "550e8400-e29b-41d4-a716-446655440000"
}

Code Examples#

curl -X POST "https://platform.antfly.io/api/v1/organizations/550e8400-e29b-41d4-a716-446655440000/cloud/groups/550e8400-e29b-41d4-a716-446655440000/members" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"user_id": "550e8400-e29b-41d4-a716-446655440000"
}'

Responses#

{
  "group_id": "550e8400-e29b-41d4-a716-446655440000",
  "user_id": "550e8400-e29b-41d4-a716-446655440000",
  "added_by": "550e8400-e29b-41d4-a716-446655440000",
  "added_at": "2025-10-02T15:30:00Z"
}

Remove cloud group member#

DELETE/organizations/{org_id}/cloud/groups/{group_id}/members/{user_id}

Parameters#

NameTypeLocationRequiredDescription
org_idstringpathYesOrganization ID
group_idstringpathYesCloud group ID
user_idstringpathYes

Code Examples#

curl -X DELETE "https://platform.antfly.io/api/v1/organizations/550e8400-e29b-41d4-a716-446655440000/cloud/groups/550e8400-e29b-41d4-a716-446655440000/members/550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer YOUR_TOKEN"

Responses#

No response body

List cloud grants#

GET/organizations/{org_id}/cloud/instances/{instance_id}/grants

Parameters#

NameTypeLocationRequiredDescription
org_idstringpathYesOrganization ID
instance_idstringpathYesCloud instance ID

Code Examples#

curl -X GET "https://platform.antfly.io/api/v1/organizations/550e8400-e29b-41d4-a716-446655440000/cloud/instances/550e8400-e29b-41d4-a716-446655440000/grants" \
-H "Authorization: Bearer YOUR_TOKEN"

Responses#

{
  "data": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "organization_id": "550e8400-e29b-41d4-a716-446655440000",
      "cloud_instance_id": "550e8400-e29b-41d4-a716-446655440000",
      "subject_type": "user",
      "subject_id": "550e8400-e29b-41d4-a716-446655440000",
      "table_name": "string",
      "actions": [
        "string"
      ],
      "row_filter": {},
      "row_filter_template": {},
      "metadata": {},
      "created_by": "550e8400-e29b-41d4-a716-446655440000",
      "created_at": "2025-10-02T15:30:00Z",
      "updated_at": "2025-10-02T15:30:00Z"
    }
  ],
  "meta": {}
}

Upsert cloud grant#

PUT/organizations/{org_id}/cloud/instances/{instance_id}/grants

Parameters#

NameTypeLocationRequiredDescription
org_idstringpathYesOrganization ID
instance_idstringpathYesCloud instance ID

Request Body#

{
  "subject_type": "user",
  "subject_id": "550e8400-e29b-41d4-a716-446655440000",
  "table_name": "*",
  "actions": [
    "string"
  ],
  "row_filter": {},
  "row_filter_template": {},
  "metadata": {}
}

Code Examples#

curl -X PUT "https://platform.antfly.io/api/v1/organizations/550e8400-e29b-41d4-a716-446655440000/cloud/instances/550e8400-e29b-41d4-a716-446655440000/grants" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"subject_type": "user",
"subject_id": "550e8400-e29b-41d4-a716-446655440000",
"table_name": "*",
"actions": [
  "string"
],
"row_filter": {},
"row_filter_template": {},
"metadata": {}
}'

Responses#

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "organization_id": "550e8400-e29b-41d4-a716-446655440000",
  "cloud_instance_id": "550e8400-e29b-41d4-a716-446655440000",
  "subject_type": "user",
  "subject_id": "550e8400-e29b-41d4-a716-446655440000",
  "table_name": "string",
  "actions": [
    "string"
  ],
  "row_filter": {},
  "row_filter_template": {},
  "metadata": {},
  "created_by": "550e8400-e29b-41d4-a716-446655440000",
  "created_at": "2025-10-02T15:30:00Z",
  "updated_at": "2025-10-02T15:30:00Z"
}

Delete cloud grant#

DELETE/organizations/{org_id}/cloud/instances/{instance_id}/grants/{grant_id}

Parameters#

NameTypeLocationRequiredDescription
org_idstringpathYesOrganization ID
instance_idstringpathYesCloud instance ID
grant_idstringpathYes

Code Examples#

curl -X DELETE "https://platform.antfly.io/api/v1/organizations/550e8400-e29b-41d4-a716-446655440000/cloud/instances/550e8400-e29b-41d4-a716-446655440000/grants/550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer YOUR_TOKEN"

Responses#

No response body