Data Dictionary API
Audience: Data Owners
Content Summary: The Data Dictionary API allows you to manage the Data Dictionary for your data sources.
Note
Additional fields may be included in some responses you receive; however, these attributes are for internal purposes and are therefore undocumented.
Data Dictionary Workflow
- Manage the dictionary for a data source.
- Search dictionaries.
- Delete a dictionary for a data source.
Manage Data Dictionaries
Method | Path | Purpose |
---|---|---|
POST | /dictionary/{dataSourceId} |
Create the dictionary for the specified data source. |
PUT | /dictionary/{dataSourceId} |
Update the data dictionary for the specified data source. |
Create a Data Dictionary
Endpoint
Method | Path | Purpose |
---|---|---|
POST | /dictionary/{dataSourceId} |
Create the dictionary for the specified data source. |
Query Parameters
Attribute | Description | Required |
---|---|---|
DataSourceId | integer The ID of the data source that will contain the Data Dictionary. |
Yes |
Body | array[object] Data dictionary metadata, including column names, data types, description and tags. |
Yes |
Payload Parameters
| Attribute | Description | Required |
| --- | --- |
| Name | string
The name of the column. | Yes |
| DataType | string
The type of data in the column. | Yes |
| RemoteType | string
The type of data in the remote column. | Yes |
Response Parameters
Attribute | Description |
---|---|
CreatedAt | timestamp When the object was created. |
DataSource | integer The ID of the data source the dictionary is associated with. |
Id | integer The ID of the dictionary object. |
Metadata | array[string] Metadata for the individual fields in the dictionary, including name , dataType , and remoteType . |
Types | array[string] A list of all data types the dictionary contains, such as text , integer , json , or timestamp with time zone . |
Request Example
The following request creates a Data Dictionary (saved in example-payload.json
) for the data source with ID 1
.
curl \
--request POST \
--header "Authorization: Bearer dea464c07bd07300095caa8" \
--header "Content-Type: application/json" \
--data @example-payload.json \
https://demo.immuta.com/dictionary/1
Payload Example
{
"metadata": [
{
"name": "notificationType",
"dataType": "text",
"remoteType": "text"
},
{
"name": "actionBy",
"dataType": "text",
"remoteType": "integer"
},
{
"name": "targetUser",
"dataType": "integer",
"remoteType": "integer"
},
{
"name": "metadata",
"dataType": "json",
"remoteType": "json"
},
{
"name": "id",
"dataType": "integer",
"remoteType": "integer"
},
{
"name": "notifyInitiator",
"dataType": "text",
"remoteType": "boolean"
},
{
"name": "eventTime",
"dataType": "timestamp with time zone",
"remoteType": "timestamp with time zone"
}
]
}
Response Example
{
"createdAt": "2018-03-21T10:52:30.535Z",
"dataSource": 1,
"id": 1,
"metadata": [
{
"name": "notificationType",
"dataType": "text",
"remoteType": "text"
},
{
"name": "actionBy",
"dataType": "text",
"remoteType": "integer"
},
{
"name": "targetUser",
"dataType": "integer",
"remoteType": "integer"
},
{
"name": "metadata",
"dataType": "json",
"remoteType": "json"
},
{
"name": "id",
"dataType": "integer",
"remoteType": "integer"
},
{
"name": "notifyInitiator",
"dataType": "text",
"remoteType": "boolean"
},
{
"name": "eventTime",
"dataType": "timestamp with time zone",
"remoteType": "timestamp with time zone"
}
],
"types": [
"text",
"integer",
"json",
"timestamp with time zone"
],
"updatedAt": "2018-03-21T12:18:25.531Z"
}
Other status codes returned include:
Status Code | Message |
---|---|
400 | Bad request: (detailed reason). |
401 | A valid Authorization token must be provided. |
403 | User must have one of the following roles to delete dictionary: owner,expert. |
404 | Data source not found. |
Update a Data Dictionary
Endpoint
Method | Path | Purpose |
---|---|---|
PUT | /dictionary/{dataSourceId} |
Update the dictionary for the specified data source. |
Query Parameters
Attribute | Description | Required |
---|---|---|
DataSourceId | integer The ID of the data source that will contain the Data Dictionary. |
Yes |
Body | array[object] Data dictionary metadata, including column names, data types, description and tags. |
Yes |
| Attribute | Description | Required |
| --- | --- |
| Name | string
The name of the column. | Yes |
| DataType | string
The type of data in the column. | Yes |
| RemoteType | string
The type of data in the remote column. | Yes |
Response Parameters
Attribute | Description |
---|---|
CreatedAt | timestamp When the object was created. |
DataSource | integer The ID of the data source the dictionary is associated with. |
Id | integer The ID of the dictionary object. |
Metadata | array[string] Metadata for the individual fields in the dictionary, including name , dataType , and remoteType . |
Types | array[string] A list of all data types the dictionary contains, such as text , integer , json , or timestamp with time zone . |
Request Example
The request below updates the Data Dictionary for the data source with the ID 1
.
curl \
--request PUT \
--header "Authorization: Bearer dea464c07bd07300095caa8" \
--header "Content-Type: application/json" \
--data @example-payload.json \
https://demo.immuta.com/dictionary/1
Payload Example
{
"metadata": [
{
"name": "notificationType",
"dataType": "text",
"remoteType": "text"
},
{
"name": "actionBy",
"dataType": "text",
"remoteType": "integer"
},
{
"name": "targetUser",
"dataType": "integer",
"remoteType": "integer"
},
{
"name": "metadata",
"dataType": "json",
"remoteType": "json"
},
{
"name": "id",
"dataType": "integer",
"remoteType": "integer"
},
{
"name": "notifyInitiator",
"dataType": "text",
"remoteType": "boolean"
},
{
"name": "eventTime",
"dataType": "timestamp with time zone",
"remoteType": "timestamp with time zone"
}
]
}
Response Example
{
"createdAt": "2018-03-21T10:52:30.535Z",
"dataSource": 1,
"id": 1,
"metadata": [
{
"name": "notificationType",
"dataType": "text",
"remoteType": "text"
},
{
"name": "actionBy",
"dataType": "text",
"remoteType": "integer"
},
{
"name": "targetUser",
"dataType": "integer",
"remoteType": "integer"
},
{
"name": "metadata",
"dataType": "json",
"remoteType": "json"
},
{
"name": "id",
"dataType": "integer",
"remoteType": "integer"
},
{
"name": "notifyInitiator",
"dataType": "text",
"remoteType": "boolean"
},
{
"name": "eventTime",
"dataType": "timestamp with time zone",
"remoteType": "timestamp with time zone"
}
],
"types": [
"text",
"integer",
"json",
"timestamp with time zone"
],
"updatedAt": "2018-03-21T12:18:25.531Z"
}
Other status codes returned include
Status Code | Message |
---|---|
400 | Bad request: (detailed reason). |
401 | A valid Authorization token must be provided. |
403 | User must have one of the following roles to delete dictionary: owner,expert. |
404 | Data source not found. |
Search Data Dictionaries
Method | Path | Purpose |
---|---|---|
GET | /dictionary/{dataSourceId} |
Get the dictionary for the specified data source. |
GET | /dictionary/columns |
Search across all dictionary columns. |
Get the Dictionary for a Specified Data Source
Endpoint
Method | Path | Purpose |
---|---|---|
GET | /dictionary/{dataSourceId} |
Get the dictionary for the specified data source. |
Query Parameters
Attribute | Description | Required |
---|---|---|
DataSourceId | integer The ID of the data source that contains the Data Dictionary. |
Yes |
Response Parameters
Attribute | Description |
---|---|
CreatedAt | timestamp When the object was created. |
DataSource | integer The ID of the data source the dictionary is associated with. |
Id | integer The ID of the dictionary object. |
Metadata | array[string] Metadata for the individual fields in the dictionary, including name , dataType , and remoteType . |
Types | array[string] A list of all data types the dictionary contains, such as text , integer , json , or timestamp with time zone . |
Request Example
The request below gets the Data Dictionary for the data source with the ID 1
.
curl \
--request GET \
--header "Authorization: Bearer dea464c07bd07300095caa8" \
--header "Content-Type: application/json" \
https://demo.immuta.com/dictionary/1
Response Example
{
"createdAt": "2018-03-21T10:52:30.535Z",
"dataSource": 1,
"id": 1,
"metadata": [
{
"name": "notificationType",
"dataType": "text",
"remoteType": "text"
},
{
"name": "actionBy",
"dataType": "text",
"remoteType": "integer"
},
{
"name": "targetUser",
"dataType": "integer",
"remoteType": "integer"
},
{
"name": "metadata",
"dataType": "json",
"remoteType": "json"
},
{
"name": "id",
"dataType": "integer",
"remoteType": "integer"
},
{
"name": "notifyInitiator",
"dataType": "text",
"remoteType": "boolean"
},
{
"name": "eventTime",
"dataType": "timestamp with time zone",
"remoteType": "timestamp with time zone"
}
],
"types": [
"text",
"integer",
"json",
"timestamp with time zone"
],
"updatedAt": "2018-03-21T12:18:25.531Z"
}
Search Across All Dictionary Columns
Endpoint
Method | Path | Purpose |
---|---|---|
GET | /dictionary/columns |
Search across all dictionary columns. |
Query Parameters
Attribute | Description | Required |
---|---|---|
SearchText | string A string used to filter returned columns. The query is executed with a wildcard prefix and suffix. |
No |
Limit | integer The maximum number of search results that will be returned. Default is 10 . |
No |
Response Parameters
Attribute | Description |
---|---|
ColumnName | string The name of the column. |
Request Example
The following request searches for columns in all dictionaries that contain the text address
in their name, with a
limit of 10
results.
curl \
--request GET \
--header "Authorization: Bearer dea464c07bd07300095caa8" \
--header "Content-Type: application/json" \
https://demo.immuta.com/dictionary/columns?searchText=address&limit=10
Response Example
[
"address_city",
"address_state",
"address_street"
]
Delete a Data Dictionary
Endpoint
Method | Path | Purpose |
---|---|---|
DELETE | /dictionary/{dataSourceId} |
Delete the Data Dictionary for the specified data source. |
Query Parameters
Attribute | Description | Required |
---|---|---|
DataSourceId | integer The ID of the data source. |
Yes |
Response Parameters
None.
Request Example
The request below deletes the Data Dictionary for the data source with ID 1
.
curl \
--request DELETE \
--header "Authorization: Bearer dea464c07bd07300095caa8" \
--header "Content-Type: application/json" \
https://demo.immuta.com/dictionary/1
Response Example
This endpoint returns {}
on success.
Other status codes returned include
Status Code | Message |
---|---|
401 | A valid Authorization token must be provided. |
403 | User must have one of the following roles to delete dictionary: owner,expert. |
404 | Data source not found. |