Manage Domains

Domains API reference guide

The collections object represents a domain you've created that contains data sources and assigned permissions. Currently, the only collection type available is a domain, so collections and domains are referred to interchangeably throughout this page.

Domain object attributes

Endpoints and methods

POST /collection

Create a new domain. You must have the global GOVERNANCE permission to create a domain. You can add data sources to the domain after creating the domain.

curl -X 'POST' \
    'https://your.immuta.url.com/collection' \
    -H 'accept: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer 09a0ffd7512f4aeeb66c09f3111c436c' \
    -d '{
    "id": "c7458ee9-03e5-4b6f-8395-ad4e49235428",
    "name": "Research",
    "description": "This domain is for research team data.",
    "type": "domain"
    }'

Body parameters

Response

Returns a domains object.

{
  "id": "c7458ee9-03e5-4b6f-8395-ad4e49235428",
  "type": "domain",
  "name": "Research",
  "description": "This domain is for research team data.",
  "createdAt": "2023-05-10T14:55:29.289Z",
  "updatedAt": "2023-05-10T14:55:29.289Z",
  "createdBy": 2,
  "profile": {
    "name": "Example User"
  }
}

GET /collection

Retrieve domains created in Immuta. These results can be filtered by permission or by name.

curl -X 'GET' \
    'https://your.immuta.url.com/collection?type=domain&offset=0&size=10' \
    -H 'accept: application/json' \
    -H 'Authorization: Bearer 9b06b571ab2c45f7ba315a3d80b6b6ec'

Query parameters

The following table describes optional query parameters for retrieving domains.

Response

Returns a data property that contains an array of up to size domain objects. If no domains exist, the array will be empty.

{
  "data": [{
    "id": "c7458ee9-03e5-4b6f-8395-ad4e49235428",
    "type": "domain",
    "name": "Marketing domain",
    "description": "This is a collection of marketing data.",
    "createdAt": "2023-05-10T14:55:29.289Z",
    "updatedAt": "2023-05-10T14:55:29.289Z",
    "createdBy": 2,
    "profile": {
      "name": "Example User"
      }
    },
    {
    "id": "2",
    "type": "domain",
    "name": "Test 2",
    "description": "Another test",
    "createdAt": "2023-05-10T15:06:15.047Z",
    "updatedAt": "2023-05-10T15:06:15.047Z",
    "createdBy": 2,
    "profile": {
      "name": "Example User"
      }
    }],
  "total": 2
}

GET /collection/{collectionId}

Retrieve a domain with the given collectionId to view the data sources, description, and assigned permissions associated with the domain.

curl -X 'GET' \
    'https://your.immuta.url.com/collection/c7458ee9-03e5-4b6f-8395-ad4e49235428' \
    -H 'accept: application/json' \
    -H 'Authorization: Bearer 9b06b571ab2c45f7ba315a3d80b6b6ec'

Path parameter

Response

Returns a domains object.

{
  "id": "c7458ee9-03e5-4b6f-8395-ad4e49235428",
  "type": "domain",
  "name": "Research",
  "description": "This domain is for research team data.",
  "createdAt": "2023-05-10T14:55:29.289Z",
  "updatedAt": "2023-05-10T14:55:29.289Z",
  "createdBy": 2,
  "profile": {
    "name": "Example User"
  }
}

GET /collection/{collectionType}/{collectionName}

Retrieve a domain with the given collectionName to view the data sources, description, and assigned permissions associated with the domain.

curl -X 'GET' \
    'https://your.immuta.url.com/collection/domain/Research' \
    -H 'accept: application/json' \
    -H 'Authorization: Bearer 9b06b571ab2c45f7ba315a3d80b6b6ec'

Path parameter

Response

Returns a domains object.

{
  "id": "c7458ee9-03e5-4b6f-8395-ad4e49235428",
  "type": "domain",
  "name": "Research",
  "description": "This domain is for research team data.",
  "createdAt": "2023-05-10T14:55:29.289Z",
  "updatedAt": "2023-05-10T14:55:29.289Z",
  "createdBy": 2,
  "profile": {
    "name": "Example User"
  }
}

PUT /collection/{collectionId}

Change the domain name or description. You must have the global GOVERNANCE permission to update the domain.

curl -X 'PUT' \
    'https://your.immuta.url.com/collection/c7458ee9-03e5-4b6f-8395-ad4e49235428' \
    -H 'accept: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer 71bd4a7088554159a7ad1ade9242568f' \
    -d '{
    "name": "HR Research",
    "description": "This domain is specifically for human resources data and research."
    }'

Parameters

Path parameter

Body parameters

Response

Returns a domains object with the new name or description.

{
  "id": "c7458ee9-03e5-4b6f-8395-ad4e49235428",
  "type": "domain",
  "name": "HR Research",
  "description": "This domain is specifically for human resources data and research.",
  "createdAt": "2023-05-11T14:50:40.855Z",
  "updatedAt": "2023-05-11T14:53:21.235Z",
  "createdBy": 2,
  "profile": {
    "name": "Example User"
  }
}

DELETE /collection/{collectionId}

Delete a domain. The domain must have zero data sources for a user with the global GOVERNANCE permission to delete the domain.

curl -X 'DELETE' \
    'https://your.immuta.url.com/collection/c7458ee9-03e5-4b6f-8395-ad4e49235428' \
    -H 'accept: application/json' \
    -H 'Authorization: Bearer 71bd4a7088554159a7ad1ade9242568f'

Parameters

Path parameter

Query parameter

Response

Returns a 204 code when the domain is successfully deleted. Additional responses are provided below:

  • 400: An invalid ID was provided.

  • 404: The domain was not found.

POST /collection/{collectionId}/datasources

Add existing data sources to a domain. You must have the GOVERNANCE permission.

curl -X 'POST' \
    'https://your.immuta.url.com/collection/c7458ee9-03e5-4b6f-8395-ad4e49235428/datasources' \
    -H 'accept: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer 71bd4a7088554159a7ad1ade9242568f' \
    -d '[
    {
      "dataSourceId": 36
    }
    ]'

Parameters

Path parameter

Body parameter

Response

Returns a unique identifier of the background job that adds the data sources to the domain.

{
  "jobId": "e48e15a0-ef5c-11ed-892c-a75afcd86969"
}

GET /collection/{collectionId}/datasources

Retrieve the data sources within a domain.

curl -X 'GET' \
    'https://your.immuta.url.com/collection/c7458ee9-03e5-4b6f-8395-ad4e49235428/datasources?offset=0&size=10' \
    -H 'accept: application/json' \
    -H 'Authorization: Bearer 71bd4a7088554159a7ad1ade9242568f'

Parameters

Path parameter

Query parameters

Response

Returns a data property that contains an array of up to size data sources. Each entry in the array is a separate data source. If there are no data sources in the domain, the array will be empty.

{
  "data": [{
    "dataSourceId": 36,
    "createdAt": "2023-05-10T18:02:57.068Z",
    "name": "HR Data",
    "type": "queryable",
    "platform": "PostgreSQL",
    "connectionString": "immuta@your.database.host.com:5432/public",
    "schema": "public",
    "table": "research_data",
    "tags": []
    }],
  "total": 1
}

DELETE /collection/{collectionId}/datasources/{dataSourceId}

Remove data sources from a domain. To remove data sources from a domain, you must have the global CREATE_DATA_SOURCE permission.

curl -X 'DELETE' \
    'https://your.immuta.url.com/collection/c7458ee9-03e5-4b6f-8395-ad4e49235428/datasources/36' \
    -H 'accept: application/json' \
    -H 'Authorization: Bearer 71bd4a7088554159a7ad1ade9242568f'

Path parameters

Response

Returns a 204 code when the data source is successfully removed from the domain. Additional responses are included below:

  • 403: Requesting user does not have permission to remove the data source.

  • 404: The specified collection or data source was not found.

POST /collection/{collectionId}/permissions

Assign domain permissions to a specific user. You must have the global USER_ADMIN permission to assign domain permissions to users.

curl -X 'POST' \
    'https://your.immuta.url.com/collection/c7458ee9-03e5-4b6f-8395-ad4e49235428/permissions' \
    -H 'accept: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer 71bd4a7088554159a7ad1ade9242568f' \
    -d '[
    {
      "profileId": 2,
      "permission": "Manage Policies"
    },
    {
      "profileId": 3,
      "permission": "Manage Policies"
    }
    ]'

Domains permissions object attributes

Parameters

Path parameter

Body parameters

Response

Returns an array of domain permission objects that represent a permission in a domain assigned to a specific user. If the permission had already been assigned to the user for that domain, the response will include an error for the permissions that were not assigned to that user because the permission already existed.

{
  "success": [
    {
      "id": "c2ec9049-ac93-4700-9e21-f0ec3a0de6bb",
      "profileId": 3,
      "collectionId": "c7458ee9-03e5-4b6f-8395-ad4e49235428",
      "permission": "Manage Policies",
      "createdAt": "2023-05-10T18:37:05.847Z"
    }
  ],
  "errors": [
    {
      "profileId": 2,
      "collectionId": "c7458ee9-03e5-4b6f-8395-ad4e49235428",
      "permission": "Manage Policies",
      "message": "Permission already exists"
    }
  ]
}

GET /collection/{collectionId}/permissions/{memberType}

Retrieve a list of permissions associated with the domain.

curl -X 'GET' \
    'https://your.immuta.url.com/collection/c7458ee9-03e5-4b6f-8395-ad4e49235428/permissions/user?offset=0&size=10' \
    -H 'accept: application/json' \
    -H 'Authorization: Bearer 71bd4a7088554159a7ad1ade9242568f'

Parameters

Path parameters

Query parameters

Response

Returns a data property that contains an array of users or groups who have been assigned that permission in the domain.

{
  "data": [{
    "id": "1bf5fa36-8130-4f72-8f4f-d1f18c25c2a2",
    "name": "Example User",
    "profileId": 2,
    "collectionId": "c7458ee9-03e5-4b6f-8395-ad4e49235428",
    "permission": "Manage Policies",
    "source": [
      "User Permission(s)"
    ]
    },
    {
    "id": "6172d495-c560-4ae1-bceb-cc6ce15e55ec",
    "name": "Example User 2",
    "profileId": 3,
    "collectionId": "c7458ee9-03e5-4b6f-8395-ad4e49235428",
    "permission": "Manage Policies",
    "source": [
      "User Permission(s)"
    ]
    }],
  "total": 2
}

GET /collection/permissions/{memberType}/{memberId}

Retrieve a list of permissions for the specified user or group across all domains they are a member of.

curl -X 'GET' \
    'https://your.immuta.url.com/collection/permissions/user/2?offset=0&size=10' \
    -H 'accept: application/json' \
    -H 'Authorization: Bearer 71bd4a7088554159a7ad1ade9242568f'

Parameters

Path parameters

Query parameters

Response

Returns a data property that contains an array of permissions that have been assigned to the user or group in all the domains they are a member of.

{
  "data": [{
    "profileId": 2,
    "name": "Taylor",
    "collectionId": "c7458ee9-03e5-4b6f-8395-ad4e49235428",
    "collectionName": "Marketing domain",
    "permission": "Manage Policies",
    "source": [
      "User Permission(s)"
    ],
    "userObjectId": 2,
    "iamId": "bim"
    },
    {
    "profileId": 2,
    "name": "Taylor",
    "collectionId": "a5678ef9-53e5-4b6f-8395-aa4e49237689",
    "collectionName": "Customer support domain",
    "permission": "Manage Policies",
    "source": [
      "User Permission(s)"
    ],
    "userObjectId": 2,
    "iamId": "bim"
    }
    ]
}

DELETE /collection/{collectionId}/permissions/{permissionId}

Remove a domain permission from a specific user or group. You must have the global USER_ADMIN permission to remove domain permissions from users and groups.

curl -X 'DELETE' \
    'https://your.immuta.url.com/collection/c7458ee9-03e5-4b6f-8395-ad4e49235428/permissions/c2ec9049-ac93-4700-9e21-f0ec3a0de6bb' \
    -H 'accept: application/json' \
    -H 'Authorization: Bearer 71bd4a7088554159a7ad1ade9242568f'

Path parameters

Response

Returns a 204 code when the permission is successfully removed from the user. Additional responses are provided below:

  • 400: Invalid permission

  • 404: Collection or permission not found

DELETE /collection/{collectionId}/permissions/{memberType}/{memberId}/{permissionType}

Remove a domain permission based on the permission type. You must have the global USER_ADMIN permission to remove domain permissions from users and groups.

curl -X 'DELETE' \
    'https://your.immuta.url.com/collection/c7458ee9-03e5-4b6f-8395-ad4e49235428/permissions/user/2/Manage%20Policies' \
    -H 'accept: application/json' \
    -H 'Authorization: Bearer 71bd4a7088554159a7ad1ade9242568f'

Path parameters

Response

Returns a 204 code when the permission is successfully removed. Additional responses are provided below:

  • 400: Invalid permission

  • 404: Collection or permission not found

Last updated

Copyright © 2014-2024 Immuta Inc. All rights reserved.