Skip to content

Data Source API

Audience: All Immuta Users

Content Summary: This page describes the dataSource endpoint, through which users can subscribe to data sources, make unmasking and query debug requests, and manage data source tasks. To create data sources, see the specific handler endpoints.

Note

Additional fields may be included in some responses you receive; however, these attributes are for internal purposes and are therefore undocumented.

Data Source Workflow

  1. Search data sources and data source details.
  2. Access data sources and make data source requests.
  3. Manage data source requests.
  4. Update data sources.
  5. Delete a data source.

Search Data Sources and Data Source Details

Method Path Purpose
GET /dataSource Search for data sources.
GET /dataSource/{dataSourceId} Get a data source based on the ID.
GET /dataSource/name/{dataSourceName} Get data source based on the name.
GET /dataSource/sqlTableName/{shortName} Get data source based on the short name.
GET /dataSource/{dataSourceId}/queries Search for queries associated with the provided data source ID.
GET /dataSource/{dataSourceId}/blob/{blobId*} Retrieve a blob.
GET /dataSource/{dataSourceId}/comments/{commentId} Get a comment by ID for the data source.
GET /dataSource/{dataSourceId}/comments Get all the comments for the data source.
GET /dataSource/{dataSourceId}/comments/count Count the comments for a data source.
GET /dataSource/{dataSourceId}/access Get all users with the provided access level for this data source.

Search for Data Sources

Endpoint

Method Path Purpose
GET /dataSource Search for data sources.

Query Parameters

Attribute Description Required
BlobHandlerType array[string] Describes the type of underlying blob handler that will be used with this data source (e.g., Custom, MS SQL). No
Subscription array[string] The requesting user's subscription status: pending, owner, subscribed, not_subscribed, expert, or ingest. No
Status array[string] The data source status: passed or failed. No
Tag array[string] Filters data sources by tags associated with the data sources. No
SearchText string Searches for data source names using the provided string. No
Column array[string] Searches for data source column names. No
ConnectionString array[string] Searches by connection string. No
Schema string Searches for data source schema. No
NameOnly boolean When true, searchText will only search data source names. Default is false. No
IdOnly boolean When true, only returns the ID Of the data source and the user's subscription status. No
DataSourceIds array[integer] Searches for the provided data source IDs. No
SelectFields array[string] This field accepts the values id, name, and columnEvolutionEnabled. When id or name are provided, the request will return only the ID or name of the data source and the subscription status. If columnEvolutionEnabled is provided, the response will also include information about the policies, policy conflicts, and workspaces associated with the data sources. No
Offset integer Used in combination with size to fetch pages. Default is 0. No
Size integer The number of results to return per page. Default is 10. No
SortField string Used to sort results by field, which must be createdAt, name, blobHandlerType, subscriptionStatus, recordCount, status, policy, or editable. No
SortOrder string Sorts results by order, which must be asc or desc. No
ExcludedProjects array[integer] Filter out any data sources that belong to the specified projects. No
Ephemeral boolean When true, returns ephemeral data sources. No
ClusterName string The name of the remote cluster the data source is connected to. No
Mode integer Specifies the query mode, which must be 0 (FULL), 1 (COUNT), 4 (TAG), 5 (MIN_MAX), or 6 (STATUS). No
GlobalPolicy string Filter by data sources that have this Global Policy applied. No
Hostname string Searches data sources by hostname. No

Response Parameters

Attribute Description
Name string Data source name.
Id integer Data source ID.
Deleted boolean If true the data source is a deleted data source.
Description string The data source description.
CreatedAt timestamp The date and time the data source was created.
SubscriptionPolicy array Details the type of Subscription Policy applied to the data source.
SchemaEvolutionId integer The schema evolution ID.
RecordCount integer The record count.
Status array[string] Accepted statuses are passed or failed.
SubscriptionStatus array[string] Accepted statuses are subscribed or unsubscribed.
BlobHandlerType array[string] Describes the type of underlying blob handler of this data source (e.g., Custom, MS SQL).
SubscriptionType string The type of subscription policy on the project. The type can be automatic (which allows anyone to subscribe), approval (which requires the subscriber to be manually approved), policy (which only allows users with specific groups or attributes to subscribe), or manual (which requires users to be manually added).
ConnectionString string The connection string information.
SqlSchemaName string The schema name.
Policy string When this value is none, there are no data policies applied to the data source. Otherwise, this field indicates whether or not there are policy conflicts among the data policies applied to the data source.
PolicyHandlerType string The policy handler type, such as None or Builder.

Request Example

The following request returns all data sources.

curl \
    --request GET \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    https://your-immuta-url.com/dataSource

Response Example

{
  "name": "Public Barfoo",
  "id": 22,
  "recordFormat": "Not Provided",
  "deleted": false,
  "description": null,
  "createdAt": "2021-07-22T14:11:55.539Z",
  "subscriptionPolicy": {
      "type": "subscription",
      "automaticSubscription": true
  },
  "schemaEvolutionId": 1,
  "recordCount": 0,
  "status": "passed",
  "subscriptionStatus": "subscribed",
  "blobHandlerType": "Snowflake",
  "subscriptionType": "automatic",
  "connectionString": "test@immuta.connection.source.com:###/test",
  "sqlSchemaName": "public",
  "policy": "None",
  "policyHandlerType": "None",
  "native": null,
  "workspace": null
}

Get a Data Source by ID

Endpoint

Method Path Purpose
GET /dataSource/{dataSourceId} Get a data source based on the ID.

Query Parameters

Attribute Description Required
DataSourceId integer The data source ID . Yes

Response Parameters

Attribute Description
Name string The data source name.
RecordFormat string The data format of blobs in the data source, such as json, xml, html, or jpeg.
Description string The description of the data source.
PolicyHandler array The ID of the policy handler and details about the data policies enforced on the data source.
SqlSchemaName string A string that represents this data source's schema name in the Query Engine.
SqlTableName string The SQL table name in the Query Engine.
BlobHandler array[object] A list of full URLs providing the locations of all blob store handlers to use with this data source.
BlobHandlerType string Describes the type of underlying blob handler that will be used with this data source (e.g., MS SQL).
CreatedBy integer The ID of the profile creating the data source.
Deleted boolean If true, the data source was deleted.
Type string The data source type, such as queryable or ingested.
RowCount integer The number of rows.
Documentation string Documentation associated with the data source.
Id integer The data source ID.
PolicyHandlerType string The type of policy handler applied to the data source: Builder.
SubscriptionType string The type of subscription policy on the data source. The type can be automatic (which allows anyone to subscribe), approval (which requires the subscriber to be manually approved), policy (which only allows users with specific groups or attributes to subscribe), or manual (which requires users to be manually added).
SubscriptionPolicy array Details about the Subscription Policy applied to the data source.
GlobalPolicies string Details about the Global Policies applied to the data source.
Status string The data source health status.

Request Example

The following request gets a data source based on the ID 22.

curl \
    --request GET \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    https://your-immuta-url.com/dataSource/22

Response Example

{
  "name": "Public Barfoo",
  "recordFormat": "Not Provided",
  "description": null,
  "policyHandler": null,
  "sqlSchemaName": "public",
  "sqlTableName": "barfoo",
  "blobHandler": {
      "url": "https://your-url/snowflake/handler/22",
      "ca": {
          "name": "Certificate Authority Bundle"
  },
      "manualDictionary": false
  },
  "createdBy": 2,
  "deleted": false,
  "type": "queryable",
  "recordCount": 0,
  "rowCount": 6,
  "documentation": "# Public Barfoo",
  "statsExpiration": "2021-08-27T16:34:47.846Z",
  "id": 22,
  "blobHandlerType": "Snowflake",
  "policyHandlerType": "None",
  "subscriptionType": "automatic",
  "subscriptionPolicy": {
  "type": "subscription",
      "automaticSubscription": true
  },
  "globalPolicies": null,
  "status": "passed",
  "statusInfo": {
  "sql": {
      "status": "passed",
      "message": "Passed"
   }
  }
}

Get Data Source by Name

Endpoint

Method Path Purpose
GET /dataSource/name/{dataSourceName} Get a data source based on the name.

Query Parameters

Attribute Description Required
DataSourceName string The data source name. Yes

Response Parameters

Attribute Description
Name string The data source name.
RecordFormat string The data format of blobs in the data source, such as json, xml, html, or jpeg.
Description string The description of the data source.
PolicyHandler array The ID of the policy handler and details about the data policies enforced on the data source.
SqlSchemaName string A string that represents this data source's schema name in the Query Engine.
SqlTableName string The SQL table name in the Query Engine.
BlobHandler array[object] A list of full URLs providing the locations of all blob store handlers to use with this data source.
BlobHandlerType string Describes the type of underlying blob handler that will be used with this data source (e.g., MS SQL).
CreatedBy integer The ID of the profile creating the data source.
Deleted boolean If true, the data source was deleted.
Type string The data source type, such as queryable or ingested.
RowCount integer The number of rows.
Documentation string Documentation associated with the data source.
Id integer The data source ID.
PolicyHandlerType string The type of policy handler applied to the data source: Builder.
SubscriptionType string The type of subscription policy on the data source. The type can be automatic (which allows anyone to subscribe), approval (which requires the subscriber to be manually approved), policy (which only allows users with specific groups or attributes to subscribe), or manual (which requires users to be manually added).
SubscriptionPolicy array Details about the Subscription Policy applied to the data source.
GlobalPolicies string Details about the Global Policies applied to the data source.
Status string The data source health status.

Request Example

The following request gets a data source based on the name Public Barfoo.

curl \
   --request GET \
   --header "Content-Type: application/json" \
   --header "Authorization: Bearer dea464c07bd07300095caa8" \
    https://your-immuta-url.com/dataSource/name/Public%20Barfoo

Response Example

{
  "name": "Public Barfoo",
  "recordFormat": "Not Provided",
  "description": null,
  "policyHandler": null,
  "sqlSchemaName": "public",
  "sqlTableName": "barfoo",
  "blobHandler": {
      "url": "https://your-url/snowflake/handler/22",
      "ca": {
          "name": "Certificate Authority Bundle"
  },
      "manualDictionary": false
      },
  "createdBy": 2,
  "deleted": false,
  "type": "queryable",
  "recordCount": 0,
  "rowCount": 6,
  "documentation": "# Public Barfoo",
  "statsExpiration": "2021-08-27T16:34:47.846Z",
  "id": 22,
  "blobHandlerType": "Snowflake",
  "policyHandlerType": "None",
  "subscriptionType": "automatic",
  "subscriptionPolicy": {
      "type": "subscription",
      "automaticSubscription": true
  },
  "globalPolicies": null,
  "status": "passed",
  "statusInfo": {
      "sql": {
      "status": "passed",
      "message": "Passed"
      }
  }
}

Get a Data Source by the Short Name

Endpoint

Method Path Purpose
GET /dataSource/sqlTableName/{shortName} Get a data source based on the SQL table name.

Query Parameters

Attribute Description Required
ShortName string The data source SQL table name. Yes

Response Parameters

Attribute Description
Name string The data source name.
RecordFormat string The data format of blobs in the data source, such as json, xml, html, or jpeg.
Description string The description of the data source.
PolicyHandler array The ID of the policy handler and details about the data policies enforced on the data source.
SqlSchemaName string A string that represents this data source's schema name in the Query Engine.
SqlTableName string The SQL table name in the Query Engine.
BlobHandler array[object] A list of full URLs providing the locations of all blob store handlers to use with this data source.
BlobHandlerType string Describes the type of underlying blob handler that will be used with this data source (e.g., MS SQL).
CreatedBy integer The ID of the profile creating the data source.
Deleted boolean If true, the data source was deleted.
Type string The data source type, such as queryable or ingested.
RowCount integer The number of rows.
Documentation string Documentation associated with the data source.
Id integer The data source ID.
PolicyHandlerType string The type of policy handler applied to the data source: Builder.
SubscriptionType string The type of subscription policy on the data source. The type can be automatic (which allows anyone to subscribe), approval (which requires the subscriber to be manually approved), policy (which only allows users with specific groups or attributes to subscribe), or manual (which requires users to be manually added).
SubscriptionPolicy array Details about the Subscription Policy applied to the data source.
GlobalPolicies string Details about the Global Policies applied to the data source.
Status string The data source health status.

Request Example

The following request gets a data source based on the SQL table name customer_data.

curl \
    --request GET \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    https://your-immuta-url.com/dataSource/sqlTableName/customer_data

Response Example

    {
  "name": "Dbo Customer Data",
  "recordFormat": "Not Provided",
  "description": null,
  "policyHandler": {
    "visibilitySchema": {
      "fields": [],
      "version": "2021-10-06T19:39:39.145Z"
    },
    "handlerId": 55,
    "dataSourceId": 26
  },
  "sqlSchemaName": "dbo",
  "sqlTableName": "customer_data",
  "blobHandler": {
    "url": "https://1.1.1.1.1/testmssql/testhandler/26",
    "ca": {
      "name": "Certificate Authority Bundle"
    },
    "manualDictionary": false
  },
  "createdBy": 2,
  "deleted": false,
  "type": "queryable",
  "recordCount": 0,
  "rowCount": 1000,
  "documentation": "# Dbo Customer Data",
  "statsExpiration": "2021-11-05T19:37:43.270Z",
  "id": 26,
  "blobHandlerType": "Microsoft SQL Server",
  "policyHandlerType": "Builder",
  "subscriptionType": "automatic",
  "subscriptionPolicy": {
    "type": "subscription",
    "automaticSubscription": false
  },
  "globalPolicies": null,
  "status": "passed",
  "statusInfo": {
    "sql": {
      "status": "passed",
      "message": "Passed"
    },
    "stats": {
      "status": "passed",
      "lastAttempted": "2021-10-06T19:37:43.337Z"
    },
    "lastAttempt": {
      "date": "2021-10-06T19:39:39.821Z"
    },
    "highCardinality": {
      "status": "passed",
      "lastAttempted": "2021-10-06T19:37:43.337Z"
      }
  },
  "expiration": null,
  "catalogMetadata": null,
  "workspace": null,
  "seeded": false,
  "schemaEvolutionId": 4,
  "columnEvolutionEnabled": true,
  "createdAt": "2021-10-01T14:23:27.225Z",
  "updatedAt": "2021-10-06T19:39:39.145Z",
  "subscribedAsUser": true,
  "subscriptionId": 45,
  "acknowledgeRequired": false,
  "subscriptionStatus": "owner",
  "requestedState": "owner",
  "approved": true,
  "subscriptionExpiration": null,
  "filterId": null
}

Search for Queries by Data Source ID

Endpoint

Method Path Purpose
GET /dataSource/{dataSourceId}/queries Search for queries associated with the provided data source ID.

Query Parameters

Attribute Description Required
DataSourceId integer The data source ID. Yes
Mine boolean When true, only returns queries made by the requesting user. No
Offset integer Used in combination with size to fetch specific pages. No
Size integer Page results by default; the number of results to return per page. No
SortFiled string Sorts results by field, which must be subscribers, freshness, name, category, organization, blobHandlerType subscriptionStatus, recordCount, or status. No
SortOrder string Sorts results by order, which must be asc or desc. Default desc. No

Response Parameters

Attribute Description
Hits array Metadata regarding the query.
Count integer The number of queries associated with the provided data source.

Request Example

The following request searches for queries associated with the provided data source ID.

curl \
    --request GET \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    https://your-immuta-url.com/dataSource/50/queries

Response Example

{
  "hits": [
    {
      "author": {
        "name": "Katie",
        "email": "katie@example.com",
        "preferences": {
          "sortProjectState": {
            "column": "name",
            "order": "asc",
            "size": 12
          },
          "tabDataSourceState": 0,
          "tabProjectState": 1
        },
        "externalUserIds": {},
        "systemGenerated": false,
        "id": 2,
        "createdAt": "2021-09-09T13:54:44.784Z",
        "updatedAt": "2021-10-07T14:21:29.015Z"
      },
      "statement": "Select * from \"default\".\"customer\" limit 10",
      "hash": "ad803d711b0fa8c395e16cabe42f55d6",
      "name": "Sample Query",
      "dataSource": 50,
      "public": true,
      "id": 2,
      "lastrun": "2021-10-07T15:40:26.520Z",
      "timesrun": "1",
      "expiration": "2021-10-07T15:40:58.514Z",
      "createdAt": "2021-10-07T15:40:58.520Z",
      "updatedAt": "2021-10-07T15:40:58.520Z"
    }
  ],
  "count": 1
}

Retrieve a Blob

Endpoint

Method Path Purpose
GET /dataSource/{dataSourceId}/blob/{blobid*} Retrieve a blob.

Query Parameters

Attribute Description Required
DataSourceId integer The data source ID. Yes
BlobId string The blob ID. Yes

Response Parameters

The response will download the blobs in a file you specify.

Request Example

The following request retrieves a blob.

curl \
    --request GET \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    --output ./the-blobs-will-be-saved-here
    https://your-immuta-url.com/dataSource/22/blob/22

Response Example

% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  215k  100  215k    0     0   541k      0 --:--:-- --:--:-- --:--:--  541k

Get a Comment by ID

Endpoint

Method Path Purpose
GET /dataSource/{dataSourceId}/comments/{commentId} Get a comment by ID for the data source.

Query Parameters

Attribute Description Required
DataSourceId integer The data source ID. Yes
CommentId integer The comment ID. Yes

Response Parameters

Attribute Description
Author integer The user ID of the user who posted the comment.
ParentId integer The parent comment ID.
Resolved boolean If true, the comment has been resolved.
Body string The text of the comment.
Id integer The comment ID.
CreatedAt timestamp When the comment was created.
UpdatedAt timestamp When the comment was last updated.

Request Example

The following request gets a comment by ID for the data source.

curl \
    --request GET \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    https://your-immuta-url.com/dataSource/1/comments/2

Response Example

{
  "author": 1,
  "parentId": null,
  "resolved": false,
  "body": "Should this data source be part of the Medical Claims project?",
  "id": 2,
  "createdAt": "2021-09-02T14:14:31.228Z",
  "updatedAt": "2021-09-02T14:14:31.228Z"
}

Get All Comments for a Data Source

Endpoint

Method Path Purpose
GET /dataSource/{dataSourceId}/comments Get all the comments for the data source.

Query Parameters

Attribute Description Required
DataSourceId integer The data source ID. Yes

Response Parameters

Attribute Description
Author array The id, name, and email of the author.
Resolved boolean If true, the comment has been resolved.
Id integer The comment ID.
CreatedAt timestamp The date and time the comment was created.
UpdatedAt timestamp The date and time the comment was updated.
Models array The modelType (such as datasource), modelId, and modelName.
Totalreplies integer The number of replies to the comment.
Lastreply timestamp The date and time of the last reply.
Public boolean If true, the comment is public.

Request Example

The following request adds a comment to the data source.

curl \
    --request GET \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    https://your-immuta-url.com/dataSource/22/comments

Response Example

[{
        "author": {
            "id": 2,
            "name": "Jane Doe",
            "email": "jane.doe@immuta.com"
        },
        "body": "Actually, Billing does not need access, but Customer Service does.",
        "resolved": false,
        "id": 8,
        "createdAt": "2021-10-21T17:03:31.174Z",
        "updatedAt": "2021-10-21T17:03:31.174Z",
        "models": [{
            "modelType": "datasource",
            "modelId": "22",
            "modelName": "Fake Medical Claims 2017"
        }],
        "totalreplies": 0,
        "lastreply": "0001-01-01T00:00:00.000Z",
        "public": true
    },
    {
        "author": {
            "id": 2,
            "name": "Jane Doe",
            "email": "jane.doe@immuta.com"
        },
        "body": "This data source should be accessible to the Docs team and Billing.",
        "resolved": false,
        "id": 7,
        "createdAt": "2021-10-21T17:02:41.390Z",
        "updatedAt": "2021-10-21T17:02:41.390Z",
        "models": [{
            "modelType": "datasource",
            "modelId": "22",
            "modelName": "Fake Medical Claims 2017"
        }],
        "totalreplies": 0,
        "lastreply": "0001-01-01T00:00:00.000Z",
        "public": true
    }
]

Count the Comments for a Data Source

Endpoint

Method Path Purpose
GET /dataSource/{dataSourceId}/comments/count Count the comments for a data source.

Query Parameters

Attribute Description Required
DataSourceId integer The data source ID. Yes
Columns boolean When true, retrieves comments for columns. No
Queries array[string] The queries for which to retrieve comments. No
Resolved boolean If true, will retrieve only resolved comments. If false, will retrieve only unresolved comments. If not set, will retrieve all comments. No

Response Parameters

Attribute Description
modelId integer The model ID.
ModelType string The model type.
Count integer The number of comments on the data source.

Request Example

The following request counts the comments for data source 1.

curl \
    --request GET \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    https://your-immuta-url.com/dataSource/1/comments/count

Response Example

[
  {
    "modelId": "1",
    "modelType": "datasource",
    "count": 2
  }
]

Get Users by Access Level

Endpoint

Method Path Purpose
GET /dataSource/{dataSourceId}/access Get all users with the provided access level for this data source.

Query Parameters

Attribute Description Required
DataSourceId integer The data source ID. Yes
States Array[string] The status levels to include when querying for user access. No
Approved boolean Denotes whether the returned access objects should be approved. No
SearchText string A string used to filter returned users. The query is executed with a wildcard prefix and suffix. No
Size integer The number of results to return. No
Offset integer The number of results to skip (for paging). No
SortField string The field on which to sort the result set. No
SortOrder string The order in which to sort the results. No
ExpandGroups boolean If true will return individual members of any group subscribed. No
IgnoreSystemGenerated boolean If true, will not return system generated accounts. No
FilterBySchemaEvolution boolean If true, will only return users who have the specified level of access across ALL data sources within the same schema evolution group as this one. No

Response Parameters

Attribute Description
Count integer The number of users with access to the data source.
Users string The metadata regarding the users with access to the data source.

Request Example

The following request gets all users with the provided access level for this data source.

curl \
    --request GET \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    https://your-immuta-url.com/dataSource/22/access?sortOrder=desc

Response Example

{
  "count": 2,
  "users": [
    {
      "profile": 2,
      "name": "First Last",
      "iamid": "bim",
      "userid": "first.last@immuta.com",
      "email": "first.last@immuta.com",
      "type": "user",
      "admin": "First Last",
      "approved": true,
      "state": "owner",
      "systemGenerated": false,
      "lastExternalRefresh": "2021-10-06T14:58:46.983Z",
      "subscriptionId": 586,
      "createdAt": "2021-10-05T14:33:01.518Z",
      "updatedAt": "2021-10-05T14:33:01.518Z",
      "approvals": [
        {
          "requiredPermission": "OWNER",
          "state": "approved",
          "approverId": null,
          "ownerModelId": null,
          "approver": "First Last",
          "ownerModelName": null
        }
      ],
      "currentUserCanApprove": false
    },
    {
      "profile": 3,
      "name": "Tommy Test",
      "iamid": "bim",
      "userid": "tommy.test@immuta.com",
      "email": "tommy.test@immuta.com",
      "type": "user",
      "admin": "First Last",
      "approved": true,
      "state": "subscribed",
      "systemGenerated": false,
      "lastExternalRefresh": "2021-09-07T16:16:29.957Z",
      "subscriptionId": 649,
      "createdAt": "2021-10-06T14:58:31.366Z",
      "updatedAt": "2021-10-06T14:58:31.366Z",
      "approvals": [
        {
          "requiredPermission": "OWNER",
          "state": "approved",
          "approverId": null,
          "ownerModelId": null,
          "approver": "First Last",
          "ownerModelName": null
        }
      ],
      "currentUserCanApprove": false
    }
  ]
}

Access Data Sources and Make Data Source Requests

Method Path Purpose
POST /dataSource/subscribe Subscribe to a data source.
POST /dataSource/featureStore Create a SQL account to access data sources through your analytic tool.
PUT /dataSource/featureStore/password Modify SQL account password.
POST /dataSource/featureStore/temporary Create a temporary SQL account.
POST /dataSource/{dataSourceId}/reverseMask Make a request for values to be unmasked.
POST /dataSource/{dataSourceId}/queries/debug Make a request for an owner of the data source to debug a query.
POST /dataSource/{dataSourceId}/comments Add a comment to a data source.
POST /dataSource/{dataSourceId}/comments/{parentId}/reply Reply to a data source comment.
POST /dataSource/{dataSourceId}/comments/{commentId}/resolve Resolve a comment for a data source.
POST /dataSource/{dataSourceId}/access Add a user to a specific data source.

Subscribe to a Data Source

Endpoint

Method Path Purpose
POST /dataSource/subscribe Subscribe to a data source.

Query Parameters

Attribute Description Required
DataSourceId integer Data source ID number. Yes

Payload Parameters

Attribute Description Required
DataSourceIds array The ID of the data source the user is subscribing to. No
Approvals array Includes details about the Subscription policy on the data source: requiredPermissions, specificApproverRequired, specificApprover, and ownerModelId. No

Response Parameters

Attribute Description
Body array Contains details about the data source, including the data source ID, subscription status of the user, the profile ID of the user, and the dates the data source was created and updated.

Request Example

The following request subscribes to the data source with ID 22.

curl \
    --request POST \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    --data @example-payload.json \
    https://your-immuta-url.com/dataSource/subscribe?dataSourceId=22
Payload Request Example
{
  "dataSourceIds": [
    22
  ],
  "metadata": {},
  "approvals": [
    {
      "requiredPermission": "Owner",
      "specificApproverRequired": false,
      "specificApprover": 2,
      "ownerModelId": 23
    }
  ],
  "groupId": 12
}

Response Example

{
  "inError": [],
  "success": [{
    "id": 64,
    "modelId": "22",
    "modelType": "datasource",
    "state": "subscribed",
    "metadata": {},
    "admin": null,
    "denialReasoning": null,
    "profile": 2,
    "group": null,
    "expiration": null,
    "acknowledgeRequired": false,
    "createdAt": "2021-08-26T16:36:09.587Z",
    "updatedAt": "2021-08-26T16:36:09.587Z",
    "approved": true
  }]
}

Create a SQL Account

Endpoint

Method Path Purpose
POST /dataSource/featureStore Create a SQL account.

Query Parameters

None.

Payload Parameters

Attribute Description Required
Username string The SQL account username. Yes
Password string The SQL account password. Yes

Response Parameters

Attribute Description
Status boolean If true, the SQL account was created.

Request Example

The following request creates a SQL account.

curl \
    --request POST \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    --data @example-payload.json \
    https://your-immuta-url.com/dataSource/featureStore
Request Payload Example
{
    "username": "jane@example.com",
    "password": "your-new-sql-password"
}

Response Example

{
  "success": true
}

Modify a SQL Account Password

Endpoint

Method Path Purpose
PUT /dataSource/featureStore/password Modify SQL account password for the requesting user.

Query Parameters

None.

Payload Parameters

Attribute Description Required
Password string The new SQL account password. Yes

Response Parameters

Attribute Description
Success boolean If true, the password was successfully changed.
SqlUser integer SQL user ID.

Request Example

The following request modifies a SQL account password.

curl \
    --request PUT \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    --data @example-payload.json \
    https://your-immuta-url.com/dataSource/featureStore/password
Payload Request Example
{
  "password": "testpassword"
}

Response Example

{
  "success": true,
  "sqlUser": "jane@example.com"
}

Create a Temporary SQL Account

Endpoint

Method Path Purpose
POST /dataSource/featureStore/temporary Create a temporary SQL account.

Query Parameters

None.

Payload Parameters

Attribute Description Required
ProjectId string The ID of the project to be applied. No
AccountPrefix string The prefix to use for the SQL username. No
ExpiresIn integer The number of minutes the account should be valid. No
ForceDirectAudit boolean If true, will force direct audit of queries run by this account. No

Response Parameters

Attribute Description
Success boolean If true, a temporary SQL account was created.
SqlUser string The SQL username.
SqlPassword string The SQL password.
Port integer The port number.
Database string The database name.
Host string The hostname.
SslMode string Indicates whether or not SSL is required.
ConnectionString string The connection string.

Request Example

The following request creates a temporary SQL account.

curl \
    --request POST \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    --data @example-payload.json \
    https://your-immuta-url.com/dataSource/featureStore/temporary
Payload Request Example
{
  "projectId": 1,
  "accountPrefix": "temp",
  "expiresIn": 60,
  "forceDirectAudit": false
}

Response Example

{
  "success": true,
  "sqlUser": "temp1635366310923d8b65qm6279",
  "sqlPassword": "************",
  "port": 5432,
  "database": "test",
  "host": "your.host.io",
  "sslMode": "require",
  "connectionString": "postgresql://temp1635366310923d8b65qm6279:************@your.host.io:5432/test?sslmode=require"
}

Request to Unmask Values

Endpoint

Method Path Purpose
POST /dataSource/{dataSourceId}/reverseMask Makes a request for values to be unmasked.

Query Parameters

Attribute Description Required
DataSourceId integer The data source ID. Yes

Payload Parameters

Attribute Description Required
Column string The column to unmask. Yes
UnmaskingReason string The reason the values need to be unmasked. Yes
UnmaskingUsers array[integer] The profile ID of the users who can unmask the values for the requestor. Yes
ProjectId integer The ID of the associated project. No
DataSourceId integer The data source ID. No

Response Parameters

Attribute Description
Id integer The ID of the request.
RequestingUserProfile integer The requesting user profile ID.
DataSourceId integer The data source ID.
Reason string The reason for the unmasking request.
Metadata string Metadata regarding the masking, such as the column, values, and maskingConfig.
Type string The type of request.
State string The state of the task, such as pending.
CreatedAt timestamp The date and time the task was created.
UpdatedAt timestamp The date and time the task was updated.

Request Example

The following requests for values to be unmasked.

curl \
   --request POST \
   --header "Content-Type: application/json" \
   --header "Authorization: Bearer dea464c07bd07300095caa8" \
   --data @example-payload.json \
    https://your-immuta-url.com/dataSource/23/reverseMask
Request Payload Example
{
  "column": "cc_county",
  "values": ["WlRObU9ERTVNVE0yTVdabU9XVXdPQT09OktYN2lkNEZqZjlaWUluck8xTnVHOGlSN25wWmdudVZjbnZES1ArUkxhMGc9"],
  "unmaskReasoning": "Marketing project",
  "unmaskingUsers": [1]
}

Response Example

{
  "id": 1,
  "requestingUserProfile": 13,
  "dataSourceId": 12,
  "reason": "Marketing Campaign",
  "metadata": {
    "salt": "**********87",
    "column": "cc_county",
    "values": ["WlRObU9ERTVNVE0yTVdabU9XVXdPQT09OktYN2lkNEZqZjlaWUluck8xTnVHOGlSN25wWmdudVZjbnZES1ArUkxhMGc9"],
    "maskingConfig": {
      "type": "Reversible",
      "metadata": {}
    }
  },
  "type": "unmask",
  "state": "pending",
  "createdAt": "2021-10-27T20:35:48.253Z",
  "updatedAt": "2021-10-27T20:35:48.253Z"
}

Request Debug Info Sent to Owner

Endpoint

Method Path Purpose
POST /dataSource/{dataSourceId}/queries/debug Makes a request for an owner of the data source to receive debug info about the query.

Query Parameters

Attribute Description Required
DataSourceId integer Target data source ID. Yes

Payload Parameters

Attribute Description Required
AuditRecordId string The ID of the audit record. Yes
TargetUsers array[integer] The profile ID of the user receiving the debug request. Yes
DebugReasoning string The reason for debugging the query. Yes
ProjectId integer The ID of the associated project. No

Response Parameters

Attribute Description
Id integer
RequestingUserProfile integer The profile ID for the requesting user.
DataSourceId integer The data source ID.
Reason string The reason for receiving the debug info.
Type string The type of task, such as queryDebug.
State string The status of the task, such as pending.
CreatedAt timestamp The date and time the task was created.
UpdatedAt timestamp The date and time the task was updated.

Request Example

The following example sends a debug query request.

curl \
    --request GET \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    --data @example-payload.json \
    https://your-immuta-url.com/dataSource/47/queries/debug
Request Payload Example
{
  "auditrecordId": "test audit record Id",
  "targetUsers": [
    7
  ],
  "debugReasoning": "test debug necessary",
  "projectId": 7
}

Response Example

{
  "id": 8,
  "requestingUserProfile": 2,
  "dataSourceId": 47,
  "reason": "I need help with this query.",
  "type": "queryDebug",
  "state": "pending",
  "createdAt": "2021-10-12T19:28:04.999Z",
  "updatedAt": "2021-10-12T19:28:04.999Z"
}

Add a Comment to a Data Source

Endpoint

Method Path Purpose
POST /dataSource/{dataSourceId}/comments Add a comment to a data source.

Query Parameters

Attribute Description Required
DataSourceId integer The ID of the data source to add the comment to. Yes

Payload Parameters

Attribute Description Required
Body string The text of the comment. Yes
AffectedColumn string The column to apply the comment to. No
AssociatedQuery integer The ID of the query to apply the comment to. No

Response Parameters

Attribute Description
Id integer The comment ID.

Request Example

This request adds a comment (saved in example-payload.json) to the data source with the ID 48.

curl \
    --request POST \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    --data @example-payload.json \
    https://your-immuta-url.com/dataSource/48/comments
Payload Example
{
  "body": "Should this data source be added to the HR project?"
}

Response Example

{
  "id": 8
}

Reply to a Data Source Comment

Endpoint

Method Path Purpose
POST /dataSource/{dataSourceId}/comments/{parentId}/reply Reply to a data source comment.

Query Parameters

Attribute Description Required
DataSourceId integer The data source ID. Yes
ParentId integer The parent comment ID. Yes

Payload Parameters

Attribute Description Required
Body string The reply to the comment. Yes

Response Parameters

Attribute Description
Id integer The comment response ID.

Request Example

The following request replies to a data source comment.

curl \
    --request POST \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    --data @example-payload.json
    https://your-immuta-url.com/dataSource/23/comments/3/reply
Payload Example
{
  "body": "Yes, I think this data source should be part of that project."
}

Response Example

{
  "id": 5
}

Resolve a Data Source Comment

Endpoint

Method Path Purpose
POST /dataSource/{dataSourceId}/comments/{commentId}/resolve Resolve a comment for a data source.

Query Parameters

Attribute Description Required
DataSourceId integer Data source ID Yes
CommentId integer The comment ID Yes

Response Parameters

Attribute Description
Success boolean if true the comment for the data source is resolved.

Request Example

The following request resolves a comment for a data source.

curl \
    --request POST \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    https://your-immuta-url.com/dataSource/23/comments/3/resolve

Response Example

{
  "success": true
}

Add a User to a Data Source

Endpoint

Method Path Purpose
POST /dataSource/{dataSourceId}/access Add a user to a specific data source.

Query Parameters

Attribute Description Required
DataSourceId integer The data source ID. Yes

Payload Parameters

Attribute Description Required
State string The status of the user: subscribed, owner, expert, or ingest. Yes
ProfileId integer The profile ID of the user being added to the data source. Yes
GroupId integer The ID of the group being added to the data source. No
Approvals array Details about the user approving access: requiredPermission, specificApproverRequired, and specificApprover. No
Expiration date The date the user's data source subscription ends. No

Response Parameters

Attribute Description
Id integer The user's subscription ID.
ModelId integer The model ID.
ModelType string The model type.
State string The user's data source role, such as subscribed.
DenialReasoning string If the user was denied access, the reason for denial.
Profile integer The user's profile ID.
Group integer If a group was added, the group ID.
Expiration date The date the user's subscription to the data source will expire.
AcknowledgeRequired boolean If the data source is associated with a project, this value will be true if the user needs to confirm they have read the project acknowledgment.
CreatedAt timestamp The date and time of creation.
UpdatedAt timestamp The date and time of update.
Approved boolean When true, the user's request has been approved.

Request Example

The following request adds a user (saved in example-payload.json) to this data source.

curl \
    --request POST \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    --data @example-payload.json \
    https://your-immuta-url.com/dataSource/22/access
Request Payload Example
{
  "profileId": 3,
  "state": "subscribed"
}

Response Example

{
  "id": 19,
  "modelId": "1",
  "modelType": "datasource",
  "state": "subscribed",
  "metadata": null,
  "admin": 2,
  "denialReasoning": null,
  "profile": 3,
  "group": null,
  "expiration": null,
  "acknowledgeRequired": false,
  "createdAt": "2021-09-21T14:24:12.528Z",
  "updatedAt": "2021-09-21T14:24:12.528Z",
  "approved": true
}

Manage Data Source Requests

Method Path Purpose
GET /dataSource/tasks/pending Get all pending tasks for this user and pending tasks this user has created.
GET /dataSource/tasks/{taskId} Handles the given task and marks it as complete.
GET /dataSource/{dataSourceId}/tasks Returns all tasks the user has made/can approve or deny for this data source.
PUT /dataSource/{dataSourceId}/access/{id} Change user status for a specific data source.

Get Pending Tasks by User

Endpoint

Method Path Purpose
GET /dataSource/tasks/pending Get all pending tasks for this user and pending tasks this user has created.

Query Parameters

Attribute Description Required
SearchText string If specified, will filter results using the specified string. No
SearchModel string Will filter the results by model type: dataSource or schemaEvolution. No
Offset integer integer The number of results to skip (for paging). No
Size integer The number of results to return per page. No
SchemaEvolutionConnectionString string The schema evolution connection string to filter by. No
CountBySchemaEvolution boolean Iftrue, will only return the number of tasks, grouped by schema evolution. No
CountByDataSource boolean Iftrue, will only return the number of tasks, grouped by data source. No
CountOnly boolean When true, will only return a count of the pending tasks. No
GroupByDataSource boolean If true, will return the results as an array of { dataSourceId: , rows: }. No
Types Array[string] Filters the results by the type of task: queryDebug, unmask, dataSourceCreated, columnAdded, columnDeleted, or columnTypeChanged. No

Response Parameters

Attribute Description
Outgoing array Includes details of the tasks or requests created by the user, such as the count, type, and targetEmails.
Incoming array Includes details about the tasks received by the user, such as the count, type, and targetEmails.

Request Example

The following request gets all pending tasks for a user and pending tasks the user has created.

curl \
    --request GET \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    https://your-immuta-url.com/dataSource/tasks/pending

Response Example

{
  "outgoing": [],
  "incoming": [
    {
      "fullCount": 1,
      "id": 7,
      "state": "pending",
      "type": "queryDebug",
      "reason": "Please help me with this query.",
      "targetNames": [
        "Katie"
      ],
      "targetEmails": [
        "katie@example.com"
      ],
      "requester": {
        "name": "User 1",
        "id": 3,
        "email": "user@example.com"
      },
      "dataSource": {
        "id": 3,
        "name": "Public Fake Medical Claims 2017"
      },
      "createdAt": "2021-10-12T18:56:22.954Z"
    }
  ]
}

Mark Tasks as Complete

Endpoint

Method Path Purpose
GET /dataSource/tasks/{taskId} Handles the given task and marks it as complete.

Query Parameters

Attribute Description Required
TaskId integer The task ID. Yes

Response Parameters

Attribute Description
Result array Includes details about the task.

Request Example

The following request handles the given task and marks it as complete.

curl \
    --request GET \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    https://your-immuta-url.com/dataSource/tasks/7

Response Example

{
  "result": {
    "unmaskPairs": [
      {
        "masked": "TnpjNFpXSXdOR1pqWkdNeE5EYzJPQT09OktaWjJEVldXZVluTmQ2SUVQdW1MajJtVTdqL2ZBT1JlaGFUUHJidmhkWmM9",
        "unmasked": "jalekseev2@phoca.cz"
      }
    ],
    "column": "email"
  }
}

Return Tasks for a Data Source

Endpoint

Method Path Purpose
GET /dataSource/{dataSourceId}/tasks Returns all tasks the user has made/can approve or deny for this data source.

Query Parameters

Attribute Description Required
DataSourceId integer The data source ID. Yes
States Array[string] The state of the tasks: pending or completed. No
TargetProfileId integer Only returns tasks where the target user has this profile ID. No
RequestingUserProfileId integer Only returns tasks where the requesting user has this profile ID. No
ProfileId integer Returns tasks where either the target or requesting user has this profile ID. No
SearchText string A string used to filter returned users. The query is executed with a wildcard prefix and suffix. No
SearchModel string A string used to determine how results should be filtered using searchText. No
Types Array[string] The type of task: unmask, queryDebug, dataSourceCreated, columnAdded, columnDeleted, or columnTypeChanged. No
Size integer The number of results to return. No
Offset integer The number of results to skip (for paging). No
SortField string The field by which to sort the result set. No
SortOrder string The order in which to sort the results. The default is desc. No
CountOnly boolean If true, will only return the number of tasks. No

Response Parameters

Attribute Description
Hits array Includes details about each task, such as the id, state, type, and requestor.
Count integer The total number of tasks.

Request Example

The following request returns all tasks the user has made/can approve or deny for this data source.

curl \
    --request GET \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    https://your-immuta-url.com/dataSource/23/tasks?sortOrder=desc

Response Example

{
  "hits": [
    {
      "fullCount": 2,
      "id": 6,
      "state": "completed",
      "type": "queryDebug",
      "reason": "I don't understand why my query isn't returning any results.",
      "targetNames": [
        "John"
      ],
      "targetEmails": [
        "john@example.com"
      ],
      "requester": {
        "name": "User 1",
        "id": 3,
        "email": "user@example.com"
      },
      "dataSource": {
        "id": 3,
        "name": "Public Fake Medical Claims 2017"
      },
      "createdAt": "2021-10-12T15:48:23.095Z"
    },
    {
      "fullCount": 2,
      "id": 7,
      "state": "completed",
      "type": "queryDebug",
      "reason": "Is my query written properly?",
      "targetNames": [
        "John"
      ],
      "targetEmails": [
        "john@example.com"
      ],
      "requester": {
        "name": "User 1",
        "id": 3,
        "email": "user@example.com"
      },
      "dataSource": {
        "id": 3,
        "name": "Public Fake Medical Claims 2017"
      },
      "createdAt": "2021-10-12T18:56:22.954Z"
    }
  ],
  "count": 2
}

Change User Status

Endpoint

Method Path Purpose
PUT /dataSource/{dataSourceId}/access/{id} Change user status for a specific data source.

Query Parameters

Attribute Description Required
DataSourceId Integer The data source ID. Yes
Id Integer The user's ID. Yes
Attribute Description Required
State string The new status for the user: denied, subscribed, owner, expert or ingest. Yes

Response Parameters

Attribute Description
Id integer The user's profile ID.
ModelId integer The model ID.
ModelType array The model type (i.e., datasource).
State array The current state of the user's role: denied, subscribed, owner, expert, or ingest.
DenialReasoning string The reason for the denial.
Profile integer The profile ID.
Group integer If a group's status is being updated, this is the group ID.
Expiration 'timestamp' The date the user will no longer have access to the data source.
AcknowledgeRequired boolean This attribute is specific to projects. When true the user needs to confirm they have read the project acknowledgement statement.
CreatedAt timestamp The date and time created.
UpdatedAt timestamp The date and time updated.
OriginalState array The user's previous status for the data source.
Approved boolean If true, the status is approved.

Request Example

The following request changes the user status to denied for the specified data source.

curl \
    --request PUT \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    --data @example-payload.json \
    https://your-immuta-url.com/dataSource/23/access/95
Payload Example
{
  "state": "denied"
}

Response Example

{
  "id": 95,
  "modelId": "3",
  "modelType": "datasource",
  "state": "denied",
  "metadata": {},
  "admin": 2,
  "denialReasoning": "No longer works in this department.",
  "profile": 3,
  "group": null,
  "expiration": null,
  "acknowledgeRequired": false,
  "createdAt": "2021-10-12T15:40:13.878Z",
  "updatedAt": "2021-10-12T16:10:46.801Z",
  "originalState": "subscribed",
  "approved": true
}

Update Data Sources

Method Path Purpose
PUT /dataSource/{dataSourceId} Update a data source.
PUT /dataSource/bulk/{type} Update multiple data sources.
POST /dataSource/{dataSourceId}/blobs Save blob metadata to Immuta.
POST /dataSource/{dataSourceId}/persistBlob Save blob metadata to Immuta and store raw content in local blob store.
PUT /dataSource/detectRemoteChanges Trigger the schema detection job for the specified detection group, or all groups if no ID is given.
PUT /dataSource/{dataSourceId}/queries/{queryId} Update the query object for the provided query ID.

Update a Data Source

Endpoint

Method Path Purpose
PUT /dataSource/{dataSourceId} Update a data source.

Query Parameters

Attribute Description Required
DataSourceId integer The data source ID. Yes

Payload Parameters

Attribute Description Required
BlobHandler array[object] A list of full URLs providing the locations of all blob store handlers to use with this data source. No
BlobHandlerType string Describes the type of underlying blob handler that will be used with this data source (e.g., MS SQL). No
RecordFormat string The data format of blobs in the data source, such as json, xml, html, or jpeg. No
Type string The type of data source: ingested (metadata will exist in Immuta) or queryable (metadata is dynamically queried). No
Name string The name of the data source. It must be unique within the Immuta instance. No
SqlTableName string A string that represents this data source's table in the Query Engine. No
Organization string The organization that owns the data source. No
Category string The category of the data source. No
Description string The description of the data source. No
Owner array[object] Users and groups that should be added as owners to this data source. Profiles must be a list of profile IDs and groups must be a list of group IDs: { "profiles": [3, 5], "groups": [4, 1999] }. No
Expert array[object] Users and groups that should be added as expert users to this data source. Profiles must be a list of profile IDs and groups must be a list of group IDs: { "profiles": [87, 199], "groups": [324] }. No
Ingest array[object] Users and groups that should be added as ingest users to this data source. Profiles must be a list of profile IDs and groups must be a list of group IDs: { "profiles": [34, 23], "groups": [32] }. No
HasExamples boolean When true, the data source contains examples. No

Response Parameters

Attribute Description
Private boolean When false, the data source will be publicly available in the Immuta UI.
BlobHandler array[object] A list of full URLs providing the locations of all blob store handlers to use with this data source.
BlobHandlerType string Describes the type of underlying blob handler that will be used with this data source (e.g., MS SQL).
RecordFormat string The data format of blobs in the data source, such as json, xml, html, or jpeg.
Type string The type of data source: ingested (metadata will exist in Immuta) or queryable (metadata is dynamically queried).
Name string The name of the data source. It must be unique within the Immuta instance.
SqlTableName string A string that represents this data source's table in the Query Engine.
Organization string The organization that owns the data source.
Description string The description of the data source.
PolicyHandler array The ID of the policy handler and details about the data policies enforced on the data source.
SubscriptionPolicy array Details about the subscription policy enforced on the data source, including the type of policy and exceptions.

Request Example

The following request updates the data source's documentation (saved in example-payload.json).

curl \
    --request PUT \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    --data @example-payload.json \
    https://your-immuta-url.com/dataSource/22
Request Payload Example
{
  "documentation": "# Public Credit Accounts\nThis request updates the data source documentation."
}

Response Example

{
  "name": "Public Credit Accounts",
  "recordFormat": "Not Provided",
  "description": null,
  "policyHandler": {
    "handlerId": 21,
    "visibilitySchema": {
      "fields": [],
      "version": "2021-09-15T17:44:20.678Z"
    },
    "previousHandlerId": 20,
    "dataSourceId": 1
  },
  "sqlSchemaName": "public",
  "sqlTableName": "credit_accounts",
  "blobHandler": {
    "url": "https://1.1.1.1:1111/mariadb/handler/1",
    "ca": {
      "name": "Certificate Authority Bundle"
    },
    "manualDictionary": false
  },
  "createdBy": 2,
  "deleted": false,
  "type": "queryable",
  "recordCount": 0,
  "rowCount": "100000",
  "documentation": "# Public Credit Accounts\nThis request updates the data source documentation.",
  "statsExpiration": "2021-09-22T13:51:46.646Z",
  "id": 1,
  "blobHandlerType": "MariaDB",
  "policyHandlerType": "Builder",
  "subscriptionType": "approval",
  "subscriptionPolicy": {
    "type": "subscription",
    "approvals": [{
      "requiredPermission": "OWNER",
      "specificApproverRequired": false
    }]
  },
  "globalPolicies": null,
  "status": "failed",
  "statusInfo": {
    "sql": {
      "status": "passed",
      "message": "Passed"
    },
    "stats": {
      "status": "passed",
      "lastAttempted": "2021-09-21T13:51:46.674Z"
    },
    "fingerprint": {
      "status": "passed",
      "lastAttempted": "2021-09-09T14:12:25.177Z"
    },
    "lastAttempt": {
      "date": "2021-09-20T19:35:21.929Z"
    },
    "globalPolicy": {
      "status": "passed",
      "lastAttempted": "2021-09-17T19:07:38.092Z"
    },
    "highCardinality": {
      "status": "failed",
      "message": "Error could not connect to remote database: \n[immuta-fdw] ODBC driver reported the following error during SQLDriverConnect: \n[immuta-fdw] 08001:1:0:[FreeTDS][SQL Server]Unable to connect to data source\n[immuta-fdw] 01000:2:20002:[FreeTDS][SQL Server]Adaptive Server connection failed",
      "lastAttempted": "2021-09-20T16:43:19.426Z"
    }
  },
  "expiration": null,
  "catalogMetadata": null,
  "workspace": null,
  "seeded": false,
  "schemaEvolutionId": 1,
  "columnEvolutionEnabled": true,
  "createdAt": "2021-09-09T14:12:09.511Z",
  "updatedAt": "2021-09-21T13:52:42.908Z"
}

Update Multiple Data Sources

Endpoint

Method Path Purpose
PUT /dataSource/bulk/{type} Update data sources.

Query Parameters

Attribute Description Required
Type string The action to perform on the data sources: add-users, disable, restore, delete, or tags. Yes

Payload Parameters

Attribute Description Required
Ids array[integer] The IDs of the data sources to update. Yes
Update array[object] Only required for add-users (includes metadata about the users' profiles: id and state) and tags (includes metadata about the tags: name and source) types. No

Response Parameters

Attribute Description
BulkId string The ID of the bulk data source update.
JobsCreated integer The number of jobs created.

Request Example

The following request adds the Address.email tag to two data sources.

curl \
    --request PUT \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    --data @example-payload.json \
    https://your-immuta-url.com/dataSource/dataSource/bulk/tags
Payload Request Example
{
  "ids": [49, 50],
  "update": {
    "tags": [{
      "name": "Address.email",
      "source": "curated"
    }]
  }
}

Response Example

{
  "bulkId": "bulk_ds_update_4896d300e04c4a8f89493ebf125c5c6b",
  "jobsCreated": 2
}

Save Blob Metadata to Immuta

Endpoint

Method Path Purpose
POST /dataSource/{dataSourceId}/blobs Save blob metadata to Immuta.

Query Parameters

Attribute Description Required
DataSourceId integer The data source ID. Yes

Payload Parameters

Attribute Description Required
BlobId string The unique ID used to identify this blob within its data source. Yes
File string The binary file to add to the data source. Yes
Filename string The name that will display in the filesystem. No
Tags array[string] Tags to apply to the blob. No
Date data A date that corresponds to a date within the record itself. No
Filesize integer The size of the file in bytes. No

Response Parameters

Attribute Description
BlobsWithoutIds integer The number of blobs added without IDs.
BlobsInError array The blobs that were not added because of an error.
BlobsInserted array The blobs added to the data source.
Tags array[string] Tags applied to the blobs.

Request Example

The following request saves blob metadata to Immuta.

curl \
    --request POST \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    https://your-immuta-url.com/dataSource/23/blobs
Payload Example
[
  {
    "blobId": "testblob",
    "filename": "testfile",
    "tags": [
      "update"
    ],
    "visibility": {},
    "metadata": {},
    "date": "2021-10-21",
    "filesize": 2
  }
]

Response Example

{
  "blobsWithoutIds": 0,
  "blobsInError": [],
  "blobsInserted": [
      "string"
  ],
  "tags": [
      "string"
  ]
}

Store Blob Metadata Locally

Endpoint

Method Path Purpose
POST /dataSource/{dataSourceId}/persistBlob Save blob metadata to Immuta and store raw content in local blob store.

Query Parameters

Attribute Description Required
DataSourceId integer The data source ID. Yes

Payload Parameters

Attribute Description Required
BlobId string The unique ID used to identify this blob within its data source. Yes
File string The binary file to add to the data source. Yes
Filename string The name that will display in the filesystem. No
Tags array[string] Tags to apply to the blob. No
Date data A date that corresponds to a date within the record itself. No
Filesize integer The size of the file in bytes. No

Response Parameters

Attribute Description
BlobsWithoutIds integer The number of blobs added without IDs.
BlobsInError array The blobs that were not added because of an error.
BlobsInserted array The blobs added to the data source.
Tags array[string] Tags applied to the blobs.

Request Example

The following request saves blob metadata to Immuta and stores raw content in local blob stores.

curl \
    --request POST \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    --data @example-payload.json
    https://your-immuta-url.com/dataSource/23/persistBlob
Payload Example
{
  "blobId": "test/pov-queries-2.dbc",
  "filename": "pov-queries",
  "date": "2021-10-26",
  "file": "pov-queries.dbc"
}

Response Example

{
  "blobsWithoutIds": 0,
  "blobsInError": [],
  "blobsInserted": ["test/pov-queries.dbc"],
  "tags": []
}

Trigger Schema Detection Jobs

Endpoint

Method Path Purpose
PUT /dataSource/detectRemoteChanges Trigger the schema detection job for the specified detection group, or all groups if no ID is given.

Query Parameters

None.

Attribute Description Required
DataSourceIds array[integer] The data source IDs to run the schema evolution job on. No
Hostname string The hostname of the data sources. No
Port integer The port used to connect the data sources to Immuta. No
Database string The database name. No
Table string The table name. No

Response Parameters

Attribute Description
SchemaDetection string Metadata regarding the jobs.
ColumnDetection string Metadata regarding the jobs.

Request Example

The following request triggers the schema detection job for the specified detection group.

curl \
    --request PUT \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    --data @example-payload.json \
    https://your-immuta-url.com/dataSource/detectRemoteChanges
Payload Example

This payload doesn't provide any search parameters and will return all jobs run that the requesting user owns.

{}

Response Example

{
  "schemaDetection": {
      "jobs": [
      "d5e90200-10c2-11ec-a1d4-bf16ff6b4e81"
      ]
  },
  "columnDetection": {
      "jobs": [
      "d5e5cdb0-10c2-11ec-a1d4-bf16ff6b4e81",
      "d5ea6190-10c2-11ec-a1d4-bf16ff6b4e81",
      "d5eaafb0-10c2-11ec-a1d4-bf16ff6b4e81",
      "d5eb24e0-10c2-11ec-a1d4-bf16ff6b4e81",
      "d5eb9a10-10c2-11ec-a1d4-bf16ff6b4e81"
      ]
  }
}

Update a Query Object

Endpoint

Method Path Purpose
PUT /dataSource/{dataSourceId}/queries/{queryId} Update the query object for the provided query ID.

Query Parameters

Attribute Description Required
DataSourceId integer The data source ID. Yes
QueryId integer The query ID. Yes

Payload Parameters

Attribute Description Required
Name string The name of the saved query. No
Public boolean If true, all users will be able to see the saved query. No
Description string The description of the query. No

Response Parameters

Attribute Description
Author integer The profile ID of the author.
Statement string The text of the query.
Description string The description of the query.
Name string The name of the query.
DataSource integer The data source ID.
Public boolean If true, the query is public.
Id integer The query ID.
Lastrun timestamp The date and time the query was last run.
Timesrun integer The number of times the query was run.
Expiration timestamp The date and time of the query expiration.
CreateAt timestamp The date and time created.
UpdatedAt timestamp The date and time updated.

Request Example

The following request updates the query object for the provided query ID.

curl \
    --request PUT \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    --data @example-payload.json \
    https://your-immuta-url.com/dataSource/3/queries/4
Payload Example
{
  "name": "Updated Query",
  "public": true,
  "description": "This query has been updated via the Immuta API."
}

Response Example

{
  "author": 2,
  "statement": "SELECT * FROM \"public\".\"fake_medical_claims_2017\" LIMIT 100",
  "hash": "dab1dc2b2c18da5fe02cd01da239e6a5",
  "description": "This query has been updated via the Immuta API.",
  "name": "Updated Query",
  "dataSource": 3,
  "public": true,
  "id": 4,
  "lastrun": "2021-09-27T17:53:27.137Z",
  "timesrun": "2",
  "expiration": "2021-10-12T15:58:53.129Z",
  "createdAt": "2021-10-12T15:58:53.144Z",
  "updatedAt": "2021-10-12T16:02:24.388Z"
}

View and Review Data Sources

Method Path Purpose
GET /dataSource/{dataSourceId}/test Run a health check on a data source.
GET /dataSource/blobHandlerTypes Retrieve all blob handlers the current user is allowed to create.
GET /dataSource/byPurposes Get data sources that match a set of purposes.
GET /dataSource/featureStore Return the user's SQL connection parameters.
GET /dataSource/featureStore/connection Return the user's SQL connection string.
GET /dataSource/rpc/mine Retrieve all the data sources the current user has access to.
GET /dataSource/{dataSourceId}/comments Get all of the comments for the data source.
GET /dataSource/{dataSourceId}/activities Get all of the recent policy activities for a given data source.
GET /dataSource/{dataSourceId}/contacts Get the profiles for the data source owners and experts.
GET /dataSource/{dataSourceId}/tags Get the tags for a data source.
GET /dataSource/{dataSourceId}/{columnName}/unmaskUsers Return the users who can unmask the given column.
GET /dataSource/{dataSourceId}/comments/{parentId}/replies Get all replies to a comment.
GET /dataSource/{dataSourceId}/queries/debug/{auditrecordId}/{projectId} Return debug info about a query (can only be run by an owner).

Run a Data Source Health Check

Endpoint

Method Path Purpose
GET /dataSource/{dataSourceId}/test Run a health check on the data source.

Query Parameters

Attribute Description Required
DataSourceId integer The data source ID. Yes

Response Parameters

Attribute Description
Sql array Indicates whether or not the SQL query run to check the data source's health passed and when it was last run.
Stats array Indicates whether or not the job run to calculate the number of rows in the data source passed and when it was last run.
Fingerprint array Indicates whether or not the fingerprint job was successful (passed) and when it was last run. The fingerprint captures summary statistics of the data source.
ColumnEvolution array Indicates whether or not the job run to check for columns added or removed from the data source passed and when it was last run.
HighCardinality array Indicates whether or not the job run to calculate the data source's high cardinality column passed and when it was last run.
SchemaEvolution array Indicates whether or not the job run to check if a new table had been added in the remote database passed and when it was last run. If a new table was added, Immuta automatically creates a new data source. Correspondingly, if a remote table is removed, that data source will be disabled in the console.

Request Example

The following request tests a data source.

curl \
    --request GET \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    https://your-immuta-url.com/dataSource/23/test

Response Example

{
  "sql": {
      "status": "passed",
      "message": "Passed"
  },
  "stats": {
      "status": "passed",
      "lastAttempted": "2021-09-09T13:43:43.948Z"
  },
  "fingerprint": {
      "status": "passed",
      "lastAttempted": "2021-07-22T14:12:01.525Z"
  },
  "lastAttempt": {
      "date": "2021-09-09T16:47:05.173Z"
  },
  "columnEvolution": {
      "status": "passed",
      "lastAttempted": "2021-09-08T16:36:05.557Z"
  },
  "highCardinality": {
      "status": "passed",
      "lastAttempted": "2021-07-22T14:11:58.439Z"
  },
  "schemaEvolution": {
      "status": "passed",
      "lastAttempted": "2021-09-08T16:35:57.867Z"
  },
  "status": "passed"
}

Retrieve Blob Handlers

Endpoint

Method Path Purpose
GET /dataSource/blobHandlerTypes Retrieve all blob handlers the current user is allowed to create.

Query Parameters

None.

Response Parameters

Attribute Description
Name string The name of the blob handler.
BaseUrl string The base URL for the data source.
Config array Includes information about the connection configuration.
Port integer The port number.
Driver string The name of the driver.

Request Example

The following request retrieves all blob handlers the current user is allowed to create.

curl \
    --request GET \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    https://your-immuta-url.com/dataSource/blobHandlerTypes

Response Example

{
  "name": "Azure Synapse Analytics",
  "pluginType": "odbcHandler",
  "clientUrl": "/asa",
  "baseUrl": "https://0.0.0.0:8823/asa",
  "config": {
  "port": 1433,
  "allowSSLToggle": false
  },
  "displayOrder": 41,
  "requiresHashPhraseForDP": true,
  "driver": "Azure Synapse Analytics"
}

Get Data Sources by Purpose

Endpoint

Method Path Purpose
GET /dataSource/byPurposes Get data sources that match a set of purposes.

Query Parameters

Attribute Description Required
Purposes array[string] The purposes to filter the data sources by. Yes
ExcludedProjects array[integer] Excludes data sources associated with specified project IDs. No

Response Parameters

Attribute Description
Id integer The data source ID.
Name array The name of the data source.
PolicyId integer The policy ID.
Restrictions array Details regarding the operator (and or or) and purposes.

Request Example

The following request gets data sources that match a set of purposes.

curl \
    --request GET \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    https://your-immuta-url.com/dataSource/byPurposes?purposes=Data+Analysis

Response Example

[{
  "id": 42,
  "name": "Army Army Records",
  "policyId": 56,
  "restrictions": [{
    "operator": "and",
    "purposes": ["Data Analysis"]
  }]
}]

Return SQL Connection Parameters

Endpoint

Method Path Purpose
GET /dataSource/featureStore Return the user's SQL connection parameters as JSON.

Query Parameters

None.

Response Parameters

Attribute Description
Host string The host of the Immuta database.
Port integer The port number of the Immuta database.
Database string The name of the Immuta database.
User string The SQL user name.
Sslmode string Indicates whether or not SSL is required.

Request Example

The following request returns the user's connection parameters for the feature store as JSON.

curl \
    --request GET \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    https://your-immuta-url.com/dataSource/featurestore

Response Example

{
  "protocol": "postgresql://",
  "host": "last-test-immuta-query-engine.iim",
  "port": 5432,
  "database": "immuta",
  "user": "first.last",
  "ssl": {
      "rejectUnauthorized": false
  },
  "sslmode": "require"
}

Return SQL Connection String

Endpoint

Method Path Purpose
GET /dataSource/featureStore/connection Return the user's SQL connection string.

Query Parameters

None.

Response Parameters

Attribute Description
ConnectionString string The connection string.
Host string The host for the Immuta database.
Port integer The port number for the Immuta database.
Database string The Immuta database name.
SslMode string Indicates whether or not SSL is required.
SqlUser string The SQL username.

Request Example

The following request returns the users connection string or the feature store.

curl \
    --request GET \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    https://your-immuta-url.com/dataSource/featureStore/connection

Response Example

{
  "connectionString": "postgresql://your.name@name-test.internal.immuta.io:5432/immuta?sslmode=require",
  "host": "name-test.internal.immuta.io",
  "port": 5432,
  "database": "immuta",
  "sslMode": "require",
  "sqlUser": "first.last"
}

Retrieve Data Sources by User

Endpoint

Method Path Purpose
GET /dataSource/rpc/mine Retrieves all the data sources the current user has access to.

Query Parameters

None.

Response Parameters

Attribute Description
Id integer The data source ID.
Name string The data source name.
Type string The type of data source, such as ingested.
SqlTableName string The name of the table in the Immuta Query Engine.
SqlSchemaName string The name of the schema in the Immuta Query Engine.
BlobHandlerType string The type of handler, such as PostgreSQL.
SparkUseJDBC boolean When true, uses a JDBC driver.

Request Example

The following request retrieves all the data sources the current user has access to.

curl \
    --request GET \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    https://your-immuta-url.com/dataSource/rpc/mine

Response Example

{
  "id": 23,
  "name": "Public Record",
  "type": "queryable",
  "sqlTableName": "record",
  "sqlSchemaName": "public",
  "blobHandlerType": "Snowflake",
  "sparkUseJDBC": true
}

Get All Comments by Data Source

Endpoint

Method Path Purpose
GET /dataSource/{dataSourceId}/comments Get all of the comments for the data source.

Query Parameters

Attribute Description Required
DataSourceId integer The data source ID. Yes
Columns array[string] The columns for which to retrieve comments. No
Queries array[string] The queries for which to retrieve comments. No
Resolved boolean When true, will only retrieve comments that are resolved. No
SortField string The field by which to sort results: createdAt, totalreplies, lastreply, body, or profile.name. No
SortOrder string Determines whether to sort results in ascending (asc) or descending (desc) order. No

Response Parameters

Attribute Description
Author array Details about the author, including id, name, and email.
Body string The text of the comment.
Totalreplies integer The total number of replies to a comment.
Public boolean When true, the comment is visible to all users.

Request Example

The following request gets all of the comments for data source 23.

curl \
    --request GET \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    https://your-immuta-url.com/dataSource/23/comments

Response Example

{
  "author": {
  "id": 2,
  "name": "first last",
  "email": "first.last@immuta.com"
          },
  "body": "Test",
  "resolved": true,
  "id": 3,
  "createdAt": "2021-09-08T15:35:17.910Z",
  "updatedAt": "2021-09-08T16:32:13.743Z",
  "models": [
  {
      "modelType": "datasource",
      "modelId": "23",
      "modelName": "Public Foobar"
  }
  ],
  "totalreplies": 2,
  "lastreply": "2021-09-08T15:37:09.479Z",
  "public": true
}

Get Recent Policy Activities for a Data Source

Endpoint

Method Path Purpose
GET /dataSource/{dataSourceId}/activities Get all of the recent policy activities for a given data source.

Query Parameters

Attribute Description Required
DataSourceId integer The data source ID. Yes
Offset integer The number of results to skip (for paging). No
Size integer The number of results to return per page. No

Response Parameters

Attribute Description
Count integer The number of results.
Activities array Includes details about the policy and the data source, including the policy and data source type, when the activity notification was triggered, and whether or not the policy change was triggered by a Global policy.
ActionBy array Details about who triggered the action.
TargetUser array Information about the user who received the notification.

Request Example

The following request gets all of the recent policy activities for a given data source.

curl \
    --request GET \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    https://your-immuta-url.com/dataSource/23/activities

Response Example

{
  "count": 3,
  "activities": [{
    "modelType": "datasource",
    "modelId": "23",
    "createdAt": "2021-09-07T16:13:25.197Z",
    "notificationType": "policyUpdated",
    "metadata": {
      "dataSourceName": "Public Foobar",
      "triggeredByGlobal": false,
      "conflictCount": 0,
      "policyType": "data",
      "handlerId": 3,
      "previousHandlerId": 2,
      "dataSourceType": "queryable"
    },
    "read": false,
    "id": 256,
    "updatedAt": "2021-09-07T16:13:25.197Z",
    "actionBy": {
      "id": 2,
      "name": "first last",
      "email": "first.last@immuta.com"
    },
    "targetUser": {
      "id": 2,
      "name": "first last",
      "email": "first.last@immuta.com"
    }
  }]
}

Get Profiles for Data Source Owners and Experts

Endpoint

Method Path Purpose
GET /dataSource/{dataSourceId}/contacts Gets the profiles for the data source owners and experts.

Query Parameters

Attribute Description Required
DataSourceId integer The data source ID. Yes

Response Parameters

Attribute Description
Id integer The data source ID.
State string The user's data source role, such as owner or subscribed.
Name string The user's name.
Email string The user's email.
Profile integer The user's profile ID.

Request Example

The following request gets all the profiles for the data source owners and experts.

curl \
    --request GET \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    https://your-immuta-url.com/dataSource/23/contacts

Response Example

{
  "type": "profile",
  "id": 23,
  "state": "owner",
  "name": "first last",
  "email": "first.last@immuta.com",
  "profile": 2
},
{
  "type": "profile",
  "id": 23,
  "state": "owner",
  "name": "Tommy Test",
  "email": "tommy.test@immuta.com",
  "profile": 3
}

Get Tags by Data Source

Endpoint

Method Path Purpose
GET /dataSource/{dataSourceId}/tags Get the tags for a data source.

Query Parameters

Attribute Description Required
DataSourceId integer The data source ID. Yes
BlobId string Returns the tags for the specified blob. No
BlobTagsOnly boolean When true, will only display blob tags associated with a data source. No

Response Parameters

Attribute Description
Tags array Includes details about the tags, such as the name, source, and the profile ID of the user who added the tag.

Request Example

The following request gets the tags for data source 4.

curl \
    --request GET \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    https://your-immuta-url.com/dataSource/4/tags

Response Example

{
  "tags": [
    {
      "name": "Discovered.Entity.Medicare Number",
      "source": "curated",
      "modelType": "datasource",
      "modelId": "4",
      "addedBy": 1,
      "deleted": false
    }
  ]
}

Get Users Who Can Unmask Columns

Endpoint

Method Path Purpose
GET /dataSource/{dataSourceId}/{columnName}/unmaskUsers Return the users who can unmask the given column.

Query Parameters

Attribute Description Required
DataSourceId integer The data source ID. Yes
ColumnName string The name of the column to unmask. Yes

Response Parameters

Attribute Description
Name array The name of the user who can unmask the value.
ProfileId integer The profile ID of the user who can unmask the value.
Iamid string The IAM ID of the user who can unmask the value.

Request Example

The following request returns the users who can unmask the given column.

curl \
    --request GET \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    https://your-immuta-url.com/dataSource/47/gender/unmaskUsers

Response Example

[
  {
    "name": "Katie",
    "profileId": 2,
    "iamid": "bim"
  }
]

Get Replies to a Comment

Endpoint

Method Path Purpose
GET /dataSource/{dataSourceId}/comments/{parentId}/replies Get all of the replies to a specified comment.

Query Parameters

Attribute Description Required
DataSourceId integer The data source ID. Yes
ParentId integer The ID of the parent comment. Yes

Response Parameters

Attribute Description
Author array Information about the author of the reply, including their name and email.
Body string The reply to the data source comment.
Resolved boolean When true, the reply has been resolved.
Id integer The comment ID.
CreatedAt timestamp The date and time the reply was written.
UpdatedAt timestamp The date and time the reply was updated.
Totalreplies integer The number of total replies to the comment.
Lastreply timestamp The date and time of the last reply.
Public boolean If true, the comment is public.

Request Example

The following request gets replies to the data source comment 28.

curl \
    --request GET \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    https://your-immuta-url.com/dataSource/23/comments/28/replies

Response Example

[{
  "author": {
    "id": 1,
    "name": "John",
    "email": "john@example.com"
  },
  "body": "I think we should add it.",
  "parentId": 28,
  "resolved": false,
  "id": 29,
  "createdAt": "2021-10-28T01:27:15.572Z",
  "updatedAt": "2021-10-28T01:27:15.572Z",
  "totalreplies": 1,
  "public": true
}]

Return Query Debug Information

Endpoint

Method Path Purpose
GET /dataSource/{dataSourceId}/queries/debug/{auditrecordId}/{projectId} Returns debug info about the query (can only be run as an owner).

Query Parameters

Attribute Description Required
DataSourceId integer The data source ID. Yes
AuditrecordId string The ID of the audit record. Yes
ProjectId integer The ID of the associated project. No

Response Parameters

Attribute Description
Query string The text of the query run.
TableInfo array Details about the table queried.
QueryExplain array Details about the query plan.

Request Example

The following request returns debug info about the query.

curl \
    --request GET \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    https://your-immuta-url.com/dataSource/47/queries/debug/a1af3329-d096-4cc0-8037-10b63d437dac/

Response Example

{
  "query": "Select * from \"public\".\"fake__medical_claims_2017\" limit 10",
  "tableInfo": [
    {
      "id": 47,
      "rowCount": "1000",
      "name": "Fake Medical Claims 2017",
      "sqlTableName": "fake__medical_claims_2017",
      "sqlSchemaName": "public",
      "columnInfo": [
        {
          "name": "visit_id",
          "dataType": "integer",
          "remoteType": "int(11)"
        },
        {
          "name": "date_of_service",
          "dataType": "timestamp",
          "remoteType": "datetime"
        },
        {
          "name": "ssn",
          "dataType": "text",
          "remoteType": "text"
        },
        {
          "name": "first_name",
          "dataType": "text",
          "remoteType": "text"
        },
        {
          "name": "last_name",
          "dataType": "text",
          "remoteType": "text"
        },
        {
          "name": "dob",
          "dataType": "timestamp",
          "remoteType": "datetime"
        },
        {
          "name": "gender",
          "dataType": "text",
          "remoteType": "text"
        },
        {
          "name": "city",
          "dataType": "text",
          "remoteType": "text"
        },
        {
          "name": "state",
          "dataType": "text",
          "remoteType": "text"
        },
        {
          "name": "icd10_diag_code",
          "dataType": "text",
          "remoteType": "text"
        },
        {
          "name": "claim_amount",
          "dataType": "double precision",
          "remoteType": "double"
        }
      ],
      "fdwMetadata": [
        {
          "Server": "immuta_1",
          "FDW options": "(row_count '1000', schema 'public', \"table\" 'fake_medical_claims_2017')"
        }
      ]
    }
  ],
  "queryExplain": [
    {
      "QUERY PLAN": "Foreign Scan on public.fake__medical_claims_2017 r1  (cost=100.00..140.00 rows=1000 width=252)"
    },
    {
      "QUERY PLAN": "  Output: visit_id, date_of_service, ssn, first_name, last_name, dob, gender, city, state, icd10_diag_code, claim_amount"
    },
    {
      "QUERY PLAN": "  Immuta SQL query: SELECT `visit_id`, `date_of_service`, `ssn`, `first_name`, `last_name`, `dob`, `gender`, `city`, `state`, `icd10_diag_code`, `claim_amount` FROM `public`.`fake_medical_claims_2017` WHERE ( (mod(cast(conv(substr(md5(`visit_id`), 1, 16), 16, 10) AS decimal(65)), 100) < 25) ) LIMIT 10"
    }
  ]
}

Delete Data Sources or Comments

Method Path Purpose
DELETE /dataSource/{dataSourceId} Delete a data source. This will perform a soft delete on the first call and a hard delete the second time.
DELETE /dataSource/tasks/{taskId} Delete the specified task.
DELETE /dataSource/{dataSourceId}/blob/{blobId*} Delete a blob.
DELETE /dataSource/{dataSourceId}/comments/{commentId} Delete a data source comment (and potentially the comment replies).
DELETE /dataSource/{dataSourceId}/unsubscribe Unsubscribe from a data source.
DELETE /dataSource/featureStore/account/{sqlUsername} Delete a SQL account.
DELETE /dataSource/featureStore/accounts/{targetProfileId}/{targetUserId} Delete all SQL accounts for user.

Delete a Data Source

Endpoint

Method Path Purpose
DELETE /dataSource/{dataSourceId} Delete a data source. This will perform a soft delete on the first call and a hard delete the second time.

Query Parameters

Attribute Description Required
DataSourceId integer The data source ID. Yes

Response Parameters

Attribute Description
Success boolean If true, the data source is deleted.
Id integer The data source ID.
SchemaEvolutionId integer The schema evolution ID.
Name string The data source name.
Disabled boolean If true, the data source is disabled.
HandlerDeleteErrorMessage string The delete error message.

Request Example

The following request deletes the data source 23.

curl \
    --request DELETE \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    https://your-immuta-url.com/dataSource/23

Response Example

{
  "success": true,
  "id": 23,
  "schemaEvolutionId": 1,
  "name": "Public Foobar",
  "disabled": true,
  "handlerDeleteErrorMessage": null
}

Delete a Task

Endpoint

Method Path Purpose
DELETE /dataSource/tasks/{taskId} Delete the specified task.

Query Parameters

Attribute Description Required
TaskId integer Target task ID. Yes

Response Parameters

Attribute Description
Id integer The deleted task ID.
State array The state of the deleted task, such as pending.
Type array The type of deleted task, such as queryDebug.
TargetNames string The name of the user who received the request.
TargetEmails string The email of the user who received the request.
Requester metadata Details regarding the requesting profile.
DataSource metadata details regarding the data source.
Metadata array Details about the deleted task.

Request Example

The following request deletes a specified task.

curl \
    --request DELETE \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    https://your-immuta-url.com/dataSource/tasks/8

Response Example

{
  "fullCount": 1,
  "id": 8,
  "state": "pending",
  "type": "queryDebug",
  "reason": "I need help with this query.",
  "targetNames": ["Katie"],
  "targetEmails": ["katie@example.com"],
  "requester": {
    "name": "Katie",
    "id": 2,
    "email": "katie@example.com"
  },
  "dataSource": {
    "id": 47,
    "name": "Fake Medical Claims 2017"
  },
  "createdAt": "2021-10-12T19:28:04.999Z",
  "metadata": {
    "query": "Select * from \"public\".\"fake__medical_claims_2017\" limit 10",
    "tableInfo": [{
      "id": 47,
      "name": "Fake Medical Claims 2017",
      "rowCount": "1000",
      "columnInfo": [{
        "name": "visit_id",
        "dataType": "integer",
        "remoteType": "int(11)"
      }, {
        "name": "date_of_service",
        "dataType": "timestamp",
        "remoteType": "datetime"
      }, {
        "name": "ssn",
        "dataType": "text",
        "remoteType": "text"
      }, {
        "name": "first_name",
        "dataType": "text",
        "remoteType": "text"
      }, {
        "name": "last_name",
        "dataType": "text",
        "remoteType": "text"
      }, {
        "name": "dob",
        "dataType": "timestamp",
        "remoteType": "datetime"
      }, {
        "name": "gender",
        "dataType": "text",
        "remoteType": "text"
      }, {
        "name": "city",
        "dataType": "text",
        "remoteType": "text"
      }, {
        "name": "state",
        "dataType": "text",
        "remoteType": "text"
      }, {
        "name": "icd10_diag_code",
        "dataType": "text",
        "remoteType": "text"
      }, {
        "name": "claim_amount",
        "dataType": "double precision",
        "remoteType": "double"
      }],
      "fdwMetadata": [{
        "Server": "immuta_1",
        "FDW options": "(row_count '1000', schema 'public', \"table\" 'fake_medical_claims_2017')"
      }],
      "sqlTableName": "fake__medical_claims_2017",
      "sqlSchemaName": "public"
    }],
    "queryExplain": [{
      "QUERY PLAN": "Foreign Scan on public.fake__medical_claims_2017 r1  (cost=100.00..140.00 rows=1000 width=252)"
    }, {
      "QUERY PLAN": "  Output: visit_id, date_of_service, ssn, first_name, last_name, dob, gender, city, state, icd10_diag_code, claim_amount"
    }, {
      "QUERY PLAN": "  Immuta SQL query: SELECT `visit_id`, `date_of_service`, `ssn`, `first_name`, `last_name`, `dob`, `gender`, `city`, `state`, `icd10_diag_code`, `claim_amount` FROM `public`.`fake_medical_claims_2017` WHERE ( (mod(cast(conv(substr(md5(`visit_id`), 1, 16), 16, 10) AS decimal(65)), 100) < 25) ) LIMIT 10"
    }],
    "taskType": "queryDebug",
    "dataSourceName": "Fake Medical Claims 2017"
  }
}

Delete a Blob

Endpoint

Method Path Purpose
DELETE /dataSource/{dataSourceId}/blob/{blobId*} Delete a blob.

Query Parameters

Attribute Description Required
DataSourceId integer The data source ID. Yes
BlobId string The blob ID. Yes

Response Parameters

When the blob is successfully deleted, there will be no response.

Request Example

The following request deletes a blob.

curl \
    --request DELETE \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    https://your-immuta-url.com/dataSource/23/blob/1

Delete a Data Source Comment

Endpoint

Method Path Purpose
DELETE /dataSource/{dataSourceId}/comments/{commentId} Delete a data source comment (and potentially the comment replies).

Query Parameters

Attribute Description Required
DataSourceId integer The data source ID. Yes
CommentId string The comment ID. Yes

Response Parameters

Attribute Description
Status boolean If true, the data source comment is deleted.

Request Example

The following request deletes the comment 3.

curl \
    --request DELETE \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    https://your-immuta-url.com/dataSource/23/comments/3

Response Example

{
  "success": true
}

Unsubscribe From a Data Source

Endpoint

Method Path Purpose
DELETE /dataSource/{dataSourceId}/unsubscribe Unsubscribe from a data source.

Query Parameters

Attribute Description Required
DataSourceId integer The data source ID. Yes

Response Parameters

Attribute Description
Status boolean If true, the requesting user is unsubscribed from the data source.

Request Example

The following request unsubscribes the user from data source 23.

curl \
    --request DELETE \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    https://your-immuta-url.com/dataSource/23/unsubscribe

Response Example

{
  "success": true
}

Delete a SQL Account

Endpoint

Method Path Purpose
DELETE /dataSource/featureStore/account/{sqlUsername} Delete a SQL account.

Query Parameters

Attribute Description Required
SqlUsername string The SQL username. Yes

Response Parameters

Attribute Description
Status boolean If true, the SQL account is deleted.

Request Example

The following request deletes the specified SQL account.

curl \
    --request DELETE \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    https://your-immuta-url.com/dataSource/featureStore/account/tommy.test

Response Example

{
  "success": true
}

Delete ALL SQL Accounts for a User

Endpoint

Method Path Purpose
DELETE /dataSource/featureStore/accounts/{targetProfileId}/{targetUserId} Delete all SQL accounts for user.

Query Parameters

Attribute Description Required
TargetProfileId integer The profile ID of the user whose SQL accounts will be deleted. Yes
TargetUserId string The user's profile ID. Yes

Response Parameters

Attribute Description
Status boolean If true, all SQL accounts for the user are deleted.

Request Example

The following request deletes all SQL accounts for the user.

curl \
    --request DELETE \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    https://your-immuta-url.com/dataSource/featureStore/accounts/2/2

Response Example

{
  "success": true
}