Manage a Host

Data API reference guide

This page details the /data v1 API, which allows users to register a host to Immuta with a single set of credentials rather than configuring an integration and creating data sources separately. For a how-to on registering a host, see the Register a host reference guide.

GET /data/connection/{connectionKey}

Search for a host using a connection key.

Required Immuta permission: CREATE_DATA_SOURCE, APPLICATION_ADMIN, or Infrastructure Admin or Data Owner within the hierarchy

curl -X 'GET' \
  'https://your-immuta-url.com/data/connection/yourConnectionKey' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer your-bearer-token'

Path parameters

Response schema

Example response

{
  "connectionKey": "yourConnectionKey",
  "connection": {
    "port": 443,
    "role": "IMMUTA_SNOWFLAKE_ROLE",
    "hostname": "example.us-east-1.snowflakecomputing.com",
    "username": "IMMUTA_DB_SYSTEM_ACCOUNT",
    "warehouse": "your-warehouse",
    "technology": "Snowflake",
    "authenticationType": "userPassword"
  },
  "createdAt": "2023-12-22T18:28:46.328Z",
  "createdBy": 2,
  "updatedAt": "2023-12-22T18:28:46.328Z",
  "updatedBy": 2,
  "creator": {
    "id": 2,
    "name": "Taylor Smith",
    "email": "taylor@immuta.com"
  },
  "updater": {
    "id": 2,
    "name": "Taylor Smith",
    "email": "taylor@immuta.com"
  },
  "nativeIntegrationId": 1
}

GET /data/object/{objectPath}

Search for a specific data object using the object path.

Required Immuta permission: CREATE_DATA_SOURCE, APPLICATION_ADMIN, or INFRASTRUCTURE_ADMIN or DATA_OWNER within the hierarchy

curl -X 'GET' \
  'https://your-immuta-url.com/data/object/yourConnectionKey' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer your-bearer-token'

Path parameters

Response schema

Example response

{
    "objectPath": ["yourConnectionKey"],
    "technology": "Snowflake",
    "state": "active",
    "settings": {
        "activateNewChildren": {
            "value": true,
            "hasDescendantsWithOverrides": false
        },
        "dataOwners": {
            "value": [
                {
                    "id": 2,
                    "type": "user"
                },
            ],
            "hasDescendantsWithOverrides": false
        },
        "infrastructureAdmins": {
            "value": [
                {
                    "id": 3,
                    "type": "group"
                }
            ],
            "hasDescendantsWithOverrides": false
        },
        "isActive": {
            "value": true,
            "hasDescendantsWithOverrides": false
        }
    },
    "overrides": [],
    "lastCrawled": 2023-08-21T10:39:00.250Z,
    "createdAt": 2023-08-21T10:39:00.250Z,
    "remoteId": null
}

POST /data/object/search/{objectPath}

Search for the children of the object defined in the objectPath. Or search all top-level data objects (hosts) if the objectPath is omitted.

Required Immuta permission: CREATE_DATA_SOURCE, APPLICATION_ADMIN, or INFRASTRUCTURE_ADMIN or DATA_OWNER within the hierarchy

curl -X 'POST' \
  'https://your-immuta-url.com/data/object/search/yourConnectionKey' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer your-bearer-token'

Path parameters

Query parameters

Response schema

Example response

{
    "count": 1,
    "hits": [
        {
            "objectPath": ["yourConnectionKey"],
            "technology": "Snowflake",
            "state": "active",
            "settings": {
                "activateNewChildren": {
                    "value": true,
                    "hasDescendantsWithOverrides": false
                },
                "dataOwners": {
                    "value": [
                        {
                            "id": 2,
                            "type": "user"
                        },
                    ],
                    "hasDescendantsWithOverrides": false
                },
                "infrastructureAdmins": {
                    "value": [
                        {
                            "id": 3,
                            "type": "group"
                        }
                    ],
                    "hasDescendantsWithOverrides": false
                },
                "isActive": {
                    "value": true,
                    "hasDescendantsWithOverrides": false
                }
            },
            "overrides": [],
            "lastCrawled": 2023-08-21T10:39:00.250Z,
            "createdAt": 2023-08-21T10:39:00.250Z,
            "remoteId": null
        }
    ]
}

PUT /data/connection/{connectionKey}

Update the connection information for the specified host. Partial updates are not supported.

Required Immuta permission: INFRASTRUCTURE_ADMIN on the host

What can be updated?

Using this endpoint, you can only update connection information. To update other integration details, use the PUT/integrations/{id} endpoint.

curl -X 'PUT' \
    'https://<your-immuta-url>/data/connection/yourConnectionKey' \
    -H 'accept: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: <your-bearer-token>' \
    -d '{
     connection: {
       technology: "Snowflake",
       hostname: "<your-Snowflake-hostname-url>",
       port: <your-Snowflake-port>,
       warehouse: "<your-Snowflake-warehouse>",
       role: "<your-Snowflake-role>",
       authenticationType: "userPassword",
       username: "<your-Snowflake-username>",
       password: "<your-Snowflake-password>"
     }
    }'

Path parameters

Body parameters

The connection parameters differ based on your backing technology. See the Host registration payload reference guide for details about the payloads.

Response schema

Example response

{
  objectPath: ['yourConnectionKey'],
  bulkId: "a-new-uuid"
}

POST /data/crawl/{objectPath}

Trigger an ad hoc crawl starting at the specified object. Note: A crawl cannot happen at the table level.

Required Immuta permission: INFRASTRUCTURE_ADMIN or DATA_OWNER on the object

curl -X 'POST' \
    'https://<your-immuta-url>/data/crawl/yourConnectionKey/yourDatabase/yourSchema' \
    -H 'accept: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: <your-bearer-token>' \
    -d '{
     forceRecursive: false
     }'

Path parameters

Query parameters

Response schema

Example response

{
  objectPath: ['yourConnectionKey', 'yourDatabase', 'yourSchema'],
  bulkId: 'the-job's-unique-identifier'
}

PUT /data/settings/{objectPath}

Update the settings through overrides for the specified data object. All changes will trickle down to child objects as new overrides; however, existing overrides on child objects will still be respected. Data owners and infrastructure admins cannot be removed, only added. To remove data owners and infrastructure admins, edit the settings at the host level.

Required Immuta permission: INFRASTRUCTURE_ADMIN on the object

curl -X 'PUT' \
    'https://<your-immuta-url>/data/settings/yourConnectionKey/yourDatabase' \
    -H 'accept: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: <your-bearer-token>' \
    -d '{
        overrides: {
            isActive: true
            activateNewChildren: true,
            infrastructureAdmins: [
              { id: 2, type: "user" },
            ],
            dataOwners: [
              { id: 3, type: "group" },
            ]
          }
        }

Path parameters

Body parameters

Response schema

Example response

{
    "objectPath": ["yourConnectionKey/yourDatabase"],
    "technology": "Snowflake",
    "state": "active",
    "settings": {
        "activateNewChildren": {
            "value": true,
            "hasDescendantsWithOverrides": true
        },
        "dataOwners": {
            "value": [
                {
                    "id": 2,
                    "type": "user"
                },
            ],
            "hasDescendantsWithOverrides": true
        },
        "infrastructureAdmins": {
            "value": [,
                {
                    "id": 3,
                    "type": "group"
                }
            ],
            "hasDescendantsWithOverrides": true
        },
        "isActive": {
            "value": true,
            "hasDescendantsWithOverrides": true
        }
    },
    "overrides": [
        "isActive",
        "activateNewChildren",
        "infrastructureAdmins",
        "dataOwners"
    ],
    "dataSourceId": null,
    "lastCrawled": 2023-08-21T10:39:00.250Z,
    "createdAt": 2023-08-21T10:39:00.250Z,
    "remoteId": null,
    "bulkId": "the-job's-unique-identifier"
}

DELETE /data/object/{objectPath}

Delete the given object and all its child objects. For example, if you delete a database, all its schemas and tables will also be deleted.

Required Immuta permission: INFRASTRUCTURE_ADMIN or DATA_OWNER on the object

See the Disconnect a Host guide to delete a host and all its data objects.

curl -X 'DELETE' \
    'https://<your-immuta-url>/data/object/yourConnectionKey/yourDatabase/yourSchema' \
    -H 'accept: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: <your-bearer-token>' \

Path parameters

Response schema

Example response

{
  objectPath: ['yourConnectionKey', 'yourDatabase', 'yourSchema'],
  childCount: 5
}

Last updated

Self-managed versions

2024.32024.22024.12023.4

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

#141: DSIA API Updates

Change request updated