# Manage a Host

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](https://documentation.immuta.com/saas/~/changes/l3NnvynMHxi6VvqRtJhK/developer-guides/api-intro/enhanced-onboarding-api/how-to-guides/connect-a-host).

<table><thead><tr><th width="114">Method</th><th width="352">Endpoint</th><th>Description</th></tr></thead><tbody><tr><td><strong>GET</strong></td><td><a href="#get-data-connection-connectionkey"><mark style="color:blue;"><code>/data/connection/{connectionKey}</code></mark></a></td><td>Search for a host using a connection key</td></tr><tr><td><strong>GET</strong></td><td><a href="#get-data-object-objectpath"><mark style="color:blue;"><code>/data/object/{objectPath}</code></mark></a></td><td>Search for a specific data object</td></tr><tr><td><strong>POST</strong></td><td><a href="#post-data-object-search-objectpath"><mark style="color:blue;"><code>/data/object/search/{objectPath}</code></mark></a></td><td>Search for the child objects of the data object defined in the objectPath or search all top-level data objects (hosts) if the objectPath is omitted</td></tr><tr><td><strong>PUT</strong></td><td><a href="#put-data-connection-connectionkey"><mark style="color:blue;"><code>/data/connection/{connectionKey}</code></mark></a></td><td>Update the connection information for the specified host</td></tr><tr><td><strong>POST</strong></td><td><a href="#post-data-crawl-objectpath"><mark style="color:blue;"><code>/data/crawl/{objectPath}</code></mark></a></td><td>Trigger an ad hoc crawl starting at the specified data object</td></tr><tr><td><strong>PUT</strong></td><td><a href="#put-data-settings-objectpath"><mark style="color:blue;"><code>/data/settings/{objectPath}</code></mark></a></td><td>Update the settings through overrides for the specified data object</td></tr><tr><td><strong>DELETE</strong></td><td><a href="#delete-data-object-objectpath"><mark style="color:blue;"><code>/data/object/{objectPath}</code></mark></a></td><td>Delete the given data object and all its child objects</td></tr></tbody></table>

## <mark style="color:green;">`GET`</mark> `/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

<table><thead><tr><th width="197">Attribute</th><th width="414">Description</th><th>Required</th></tr></thead><tbody><tr><td><strong>connectionKey</strong> <code>string</code> </td><td>The key to uniquely identify the host connection.</td><td><strong>Yes</strong></td></tr></tbody></table>

#### Response schema

<table><thead><tr><th width="197">Attribute</th><th>Description</th></tr></thead><tbody><tr><td><strong>connectionKey</strong> <code>string</code></td><td>The key to uniquely identify the host connection.</td></tr><tr><td><strong>connection</strong> <code>object</code> </td><td>Integration-specific connection information (i.e., hostname, authentication type, warehouse, etc.)</td></tr><tr><td><strong>createdAt</strong> <code>timestamp</code> </td><td>The time the host was connected to Immuta.</td></tr><tr><td><strong>createdBy</strong> <code>integer</code> </td><td>The ID of the user who connected the host.</td></tr><tr><td>creator.<strong>id</strong> <code>integer</code> </td><td>The ID of the user who connected the host.</td></tr><tr><td>creator.<strong>name</strong> <code>string</code> </td><td>The name of the user who connected the host.</td></tr><tr><td>creator.<strong>email</strong> <code>string</code>  </td><td>The email of the user who connected the host.</td></tr><tr><td><strong>updatedAt</strong> <code>timestamp</code></td><td>The time the host was updated in Immuta.</td></tr><tr><td><strong>updatedBy</strong> <code>integer</code> </td><td>The ID of the user who updated the host.</td></tr><tr><td>updater.<strong>id</strong> <code>integer</code> </td><td>The ID of the user who updated the host.</td></tr><tr><td>updater.<strong>name</strong> <code>string</code></td><td>The name of the user who updated the host.</td></tr><tr><td>updater.<strong>email</strong> <code>string</code> </td><td>The email of the user who updated the host.</td></tr><tr><td><strong>nativeIntegrationId</strong> <code>integer</code> </td><td>The ID of the native integration backing the host.</td></tr></tbody></table>

#### 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
}
```

## <mark style="color:green;">`GET`</mark> `/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

<table><thead><tr><th width="163">Attribute</th><th width="435">Description</th><th>Required</th></tr></thead><tbody><tr><td><strong>objectPath</strong> <code>string</code> </td><td>The list of names that uniquely identify the path to a data object in the remote platform's hierarchy. The first element should be the <code>connectionKey</code> and all names should be separated by forward slashes (<code>/</code>). For example, <code>yourConnectionKey/yourDatabase/yourSchema</code>.</td><td><strong>Yes</strong></td></tr></tbody></table>

#### Response schema

<table><thead><tr><th width="162">Attribute</th><th>Desciription</th></tr></thead><tbody><tr><td><strong>objectPath</strong> <code>string</code> </td><td>The list of names that uniquely identify the path to a data object in the remote platform's hierarchy. The first element should be the <code>connectionKey</code> and all names are separated by forward slashes.</td></tr><tr><td><strong>technology</strong> <code>string</code> </td><td>The technology that the object comes from: <code>Snowflake</code> or <code>Databricks</code>.</td></tr><tr><td><strong>state</strong> <code>string</code> </td><td>Whether the object is currently <code>active</code> or <code>inactive</code>.</td></tr><tr><td><strong>settings</strong> <code>array</code> </td><td>Specifications of the host's settings, including active status, new children status, infrastructure admins, and data owners.</td></tr><tr><td><strong>overrides</strong> <code>array</code> </td><td>Specifications of the data object's settings that differ from its parents' settings.</td></tr><tr><td><strong>dataSourceId</strong> <code>integer</code> </td><td>The ID of the data source if it is a table object that is active.</td></tr><tr><td><strong>createdAt</strong> <code>timestamp</code></td><td>The time the data object was created in Immuta.</td></tr><tr><td><strong>lastCrawled</strong> <code>timestamp</code> </td><td>The time the data object was last crawled during object sync.</td></tr><tr><td><strong>remoteId</strong> <code>string</code> </td><td>The ID of the remote data object.</td></tr></tbody></table>

#### 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
}
```

## <mark style="color:green;">`POST`</mark> `/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

<table><thead><tr><th width="184">Attribute</th><th width="433">Description</th><th>Required</th></tr></thead><tbody><tr><td><strong>objectPath</strong> <code>string</code> </td><td>The list of names that uniquely identify the path to a data object in the remote platform's hierarchy. The first element should be the <code>connectionKey</code> and all names should be separated by forward slashes (<code>/</code>). For example, <code>yourConnectionKey/yourDatabase/yourSchema</code>.</td><td><strong>Yes</strong></td></tr></tbody></table>

#### Query parameters

<table><thead><tr><th width="181">Attribute</th><th width="442">Description</th><th>Required</th></tr></thead><tbody><tr><td><strong>sortField</strong> <code>string</code> </td><td>The field to sort the search results.</td><td>No</td></tr><tr><td><strong>sortOrder</strong> <code>string</code> </td><td>Denotes whether to sort the results in ascending (<code>asc</code>) or descending (<code>desc</code>) order. <strong>Default is <code>asc</code>.</strong></td><td>No</td></tr><tr><td><strong>offset</strong> <code>integer</code> </td><td>Use in combination with <code>limit</code> to fetch pages.</td><td>No</td></tr><tr><td><strong>limit</strong> <code>integer</code> </td><td>Limits the number of results displayed per page.</td><td>No</td></tr><tr><td><strong>searchText</strong> <code>string</code> </td><td>A partial, case-insensitive search on name.</td><td>No</td></tr></tbody></table>

#### Response schema

<table><thead><tr><th width="183">Attribute</th><th>Description</th></tr></thead><tbody><tr><td><strong>count</strong> <code>integer</code> </td><td>The number of results for your search.</td></tr><tr><td>hits.<strong>objectPath</strong> <code>string</code> </td><td>The list of names that uniquely identify the path to a data object in the remote platform's hierarchy. The first element should be the <code>connectionKey</code> and all names are separated by forward slashes.</td></tr><tr><td>hits.<strong>technology</strong> <code>string</code> </td><td>The technology that the object comes from (i.e., Snowflake, Databricks, etc.).</td></tr><tr><td>hits.<strong>state</strong> <code>string</code> </td><td>Whether the object is currently <code>active</code> or <code>inactive</code>.</td></tr><tr><td>hits.<strong>settings</strong> <code>array</code> </td><td>Specifications of the host's settings, including active status, new children status, infrastructure admins, and data owners.</td></tr><tr><td>hits.<strong>overrides</strong> <code>array</code> </td><td>Specifications of the data object's settings that differ from its parents' settings.</td></tr><tr><td>hits.<strong>dataSourceId</strong> <code>integer</code> </td><td>The ID of the data source if it is a table object that is active.</td></tr><tr><td>hits.<strong>createdAt</strong> <code>timestamp</code> </td><td>The time the data object was created in Immuta.</td></tr><tr><td>hits.<strong>lastCrawled</strong> <code>timestamp</code> </td><td>The time the data object was last crawled during object sync.</td></tr><tr><td>hits.<strong>remoteId</strong> <code>string</code> </td><td>The ID of the remote data object.</td></tr></tbody></table>

#### 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
        }
    ]
}
```

## <mark style="color:green;">`PUT`</mark> `/data/connection/{connectionKey}`

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

**Required Immuta permission**: `INFRASTRUCTURE_ADMIN` on the host

{% hint style="warning" %}
**What can be updated?**

Using this endpoint, you can only update connection information. To update other integration details, use the [<mark style="color:blue;">PUT</mark><mark style="color:blue;">`/integrations/{id}`</mark>](https://documentation.immuta.com/saas/~/changes/l3NnvynMHxi6VvqRtJhK/developer-guides/integrations-api/reference-guides/integrations-api#put-integrations-id) endpoint.
{% endhint %}

{% tabs %}
{% tab title="Snowflake username and password" %}

```
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>"
     }
    }'
```

{% endtab %}

{% tab title="Snowflake key pair" %}

```
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: "keyPair",
       username: "<the-Snowflake-username>",
       privateKeyPassword: "<your-Snowflake-key-password>",
       privateKey: {
         keyName: "PRIV_KEY_FILE",
         userFilename: "<your-private-key-file-name>",
         content: "<-----BEGIN PRIVATE KEY-----your-private-key-----END PRIVATE KEY----->"
       }
     }
    }'
```

{% endtab %}

{% tab title="Snowflake OAuth with certificate" %}

```
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: "oAuthClientCredentials",
       oAuthClientConfig: {
         useCertificate: true,
         clientId: "<your-client-ID>",
         authorityUrl: "<your-example.authority.com>",
         scope: "session:role-any",
         publicCertificateThumbprint: "<your-certificate-thumbprint>",
         resource: "<your-optional-resource>",
         oauthPrivateKey: {
           keyName: "oauth client certificate",
           userFilename: "<your-user-file.pem>",
           content: "<-----BEGIN PRIVATE KEY-----your-private-key-----END PRIVATE KEY----->"
         }
       }
     }
    }'
```

{% endtab %}

{% tab title="Snowflake OAuth with secret" %}

```
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: "oAuthClientCredentials",
       oAuthClientConfig: {
         useCertificate: false,
         clientId: "<your-client-ID>",
         authorityUrl: "<your-example.authority.com>",
         scope: "session:role-any",
         resource: "<your-optional-resource>",
         clientSecret: "<your-client-secret>"
       }
     }
    }'
```

{% endtab %}

{% tab title="Databricks Unity Catalog" %}

```
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: "Databricks",
       hostname: "<www.your-workspace.cloud.databricks.com>",
       port: <your-Databricks-port>,
       httpPath: "<your-Databricks-warehouse-path>",
       authenticationType: "token",
       token: "<your-service-principal-pat>"
     }
    }'
```

{% endtab %}
{% endtabs %}

#### Path parameters

| Attribute                  | Description                                       | Required |
| -------------------------- | ------------------------------------------------- | -------- |
| **connectionKey** `string` | The key to uniquely identify the host connection. | **Yes**  |

#### Body parameters

The connection parameters differ based on your backing technology. See the [Host registration payload reference guide](https://documentation.immuta.com/saas/~/changes/l3NnvynMHxi6VvqRtJhK/developer-guides/api-intro/enhanced-onboarding-api/host-connection-payloads-reference-guide) for details about the payloads.

#### Response schema

<table><thead><tr><th width="147">Attribute</th><th>Description</th></tr></thead><tbody><tr><td><strong>objectPath</strong> <code>string</code> </td><td>The list of names that uniquely identify the path to a data object in the remote platform's hierarchy. The first element should be the <code>connectionKey</code> and all names are separated by forward slashes.</td></tr><tr><td><strong>bulkId</strong> <code>string</code></td><td>A bulk ID that can be used to search for the status of background jobs triggered by this request.</td></tr></tbody></table>

#### Example response

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

## <mark style="color:green;">`POST`</mark> `/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

<table><thead><tr><th width="172">Attribute</th><th width="372">Description</th><th>Required</th></tr></thead><tbody><tr><td><strong>objectPath</strong> <code>string</code> </td><td>The list of names that uniquely identify the path to a data object in the remote platform's hierarchy. The first element should be the <code>connectionKey</code> and all names should be separated by forward slashes (<code>/</code>). For example, <code>yourConnectionKey/yourDatabase/yourSchema</code>.</td><td><strong>Yes</strong></td></tr></tbody></table>

#### Query parameters

<table><thead><tr><th width="172">Attribute</th><th width="372">Description</th><th>Required</th></tr></thead><tbody><tr><td><strong>forceRecursive</strong> <code>boolean</code> </td><td>If <code>false</code>, only active objects will be crawled. If <code>true</code>, both active and inactive data objects will be crawled; any child objects from inactive objects will be set as inactive. Defaults to <code>false</code>.</td><td>No. </td></tr></tbody></table>

#### Response schema

<table><thead><tr><th width="170">Attribute</th><th>Description</th></tr></thead><tbody><tr><td><strong>objectPath</strong> <code>string</code> </td><td>The list of names that uniquely identify the path to a data object in the remote platform's hierarchy. The first element should be the <code>connectionKey</code> and all names are separated by forward slashes.</td></tr><tr><td><strong>bulkId</strong> <code>string</code></td><td>A bulk ID that can be used to search for the status of background jobs triggered by this request.</td></tr></tbody></table>

#### Example response

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

## <mark style="color:green;">`PUT`</mark> `/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

<table><thead><tr><th width="214">Attribute</th><th width="440">Description</th><th>Required</th></tr></thead><tbody><tr><td><strong>objectPath</strong> <code>string</code> </td><td>The list of names that uniquely identify the path to a data object in the remote platform's hierarchy. The first element should be the <code>connectionKey</code> and all names should be separated by forward slashes (<code>/</code>). For example, <code>yourConnectionKey/yourDatabase/yourSchema</code>.</td><td><strong>Yes</strong></td></tr></tbody></table>

#### Body parameters

<table><thead><tr><th width="300">Attribute</th><th width="419">Description</th><th>Required</th></tr></thead><tbody><tr><td><strong>overrides</strong> <code>array</code> </td><td>A list of settings configured differently from the parent object's settings. </td><td></td></tr><tr><td>overrides.<strong>isActive</strong> <code>boolean</code> </td><td>If <code>true</code>, the object and all its child objects are active.</td><td></td></tr><tr><td>overrides.<strong>activateNewChildren</strong> <code>boolean</code> </td><td>If <code>true</code>, all new children found during object sync will be registered as active.</td><td></td></tr><tr><td>overrides.<strong>infrastructureAdmins</strong> <code>array</code> </td><td>A list of the users and groups that are infrastructure admins on the host. These users can crawl the host, edit the connection, and delete data objects.</td><td></td></tr><tr><td>overrides.infrastructureAdmins.<strong>id</strong> <code>integer</code> </td><td>The ID of the user or group to make infrastructure admin.</td><td></td></tr><tr><td>overrides.infrastructureAdmins.<strong>type</strong> <code>string</code> </td><td>The type to make infrastructure admin. Options are <code>user</code> or <code>group</code>.</td><td></td></tr><tr><td>overrides.<strong>dataOwners</strong> <code>array</code> </td><td>A list of users and groups that are data owners on the host. These users will be data owners for all the data sources under the data object they are assigned to.</td><td></td></tr><tr><td>overrides.dataOwners.<strong>id</strong> <code>integer</code> </td><td>The ID of the user or group to make data owner.</td><td></td></tr><tr><td>overrides.dataOwners.<strong>type</strong> <code>string</code> </td><td>The type to make data owner. Options are <code>user</code> or <code>group</code>.</td><td></td></tr></tbody></table>

#### Response schema

<table><thead><tr><th width="160">Attribute</th><th>Description</th></tr></thead><tbody><tr><td><strong>objectPath</strong> <code>string</code> </td><td>The list of names that uniquely identify the path to a data object in the remote platform's hierarchy. The first element should be the <code>connectionKey</code> and all names should be separated by forward slashes.</td></tr><tr><td><strong>technology</strong> <code>string</code> </td><td>The backing technology of the host. Options are <code>Databricks</code> or <code>Snowflake</code>.</td></tr><tr><td><strong>state</strong> <code>string</code> </td><td>Whether the object is currently <code>active</code> or <code>inactive</code>.</td></tr><tr><td><strong>settings</strong> <code>array</code> </td><td>Specifications of the host's settings, including active status, new children status, infrastructure admins, and data owners.</td></tr><tr><td><strong>overrides</strong> <code>array</code> </td><td>Specifications of the data object's settings that differ from its parents' settings.</td></tr><tr><td><strong>dataSourceId</strong> <code>integer</code> </td><td>The ID of the data source if it is a table object that is active.</td></tr><tr><td><strong>createdAt</strong> <code>timestamp</code> </td><td>The time the data object was created in Immuta.</td></tr><tr><td><strong>lastCrawled</strong> <code>timestamp</code> </td><td>The time the data object was last crawled during object sync.</td></tr><tr><td><strong>remoteId</strong> <code>string</code> </td><td>The ID of the remote data object.</td></tr><tr><td><strong>bulkId</strong> <code>string</code></td><td>A bulk ID that can be used to search for the status of background jobs triggered by this request.</td></tr></tbody></table>

#### 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"
}

```

## <mark style="color:green;">`DELETE`</mark> `/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

{% hint style="info" %}
See the [Disconnect a Host guide](https://documentation.immuta.com/saas/~/changes/l3NnvynMHxi6VvqRtJhK/developer-guides/api-intro/enhanced-onboarding-api/how-to-guides/deregister-a-host) to delete a host and all its data objects.
{% endhint %}

```
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

| Attribute               | Description                                                                                                                                                                                                                                                                  | Required |
| ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| **objectPath** `string` | The list of names that uniquely identify the path to a data object in the remote platform's hierarchy. The first element should be the `connectionKey` and all names should be separated by forward slashes (`/`). For example, `yourConnectionKey/yourDatabase/yourSchema`. | **Yes**  |

#### Response schema

| Attribute                | Description                                                                                                                                                                                            |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **objectPath** `string`  | The list of names that uniquely identify the path to a data object in the remote platform's hierarchy. The first element should be the `connectionKey` and all names are separated by forward slashes. |
| **childCount** `integer` | The number of child objects of the data object that were deleted.                                                                                                                                      |

#### Example response

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