- Product Docs
- Engineering Blog
Users
Invitations
Workspaces
Syncs
Sync Runs
Destination Types
Destinations
Destination Connect Links
Source Types
Sources
- GETList sources
- POSTCreate a new source
- GETFetch source
- DELDelete source
- PATCHUpdate source
- POSTStart table refresh
- GETCheck table refresh
Objects
Models
Topics
Tables
Segments
- GET
Source Connect Links
Organization APIs
Workspace APIs
Create a new source
Bearer token for the current workspace. Can be retrieved from the Workspace's settings page.
Contains the information for the connection.
An optional label that can be assigned to the source for better categorization or identification.
Credentials that should be associated with this source (e.g. hostname, port)
The type of the data source. A valid type is the service_name
of a source type returned from the /source_types
endpoint, where the source type is marked as creatable_via_api
.
curl --request POST \
--url https://app.getcensus.com/api/v1/sources \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"connection": {
"label": "Acme Inc. Snowflake",
"credentials": {
"hostname": "<instance>.<region>.redshift.amazonaws.com,",
"port": "5439,",
"user": "redshift_user,",
"password": "redshift_password,",
"database": "demo"
},
"type": "snowflake"
}
}'
{
"status": "created",
"data": {
"id": 4,
"name": "Snowflake - xxxxxxx.us-east-1",
"label": "Acme Inc. Snowflake",
"type": "snowflake",
"created_at": "2023-07-22T23:42:47.239Z",
"last_test_succeeded": true,
"last_tested_at": "2023-11-07T05:31:56Z",
"connection_details": {
"account": "xxxxxxx.us-east-1,",
"user": "DEV,",
"warehouse": "TEST,",
"use_keypair": false
}
}
}
Authorizations
Bearer token for the current workspace. Can be retrieved from the Workspace's settings page.
Body
Contains the information for the connection.
An optional label that can be assigned to the source for better categorization or identification.
Credentials that should be associated with this source (e.g. hostname, port)
The type of the data source. A valid type is the service_name
of a source type returned from the /source_types
endpoint, where the source type is marked as creatable_via_api
.
Response
Outcome of the operation.
success
, updated
, created
, not_found
, error
The unique identifier of the source.
The name assigned to this source, typically a combination of type and location.
An optional label that can be assigned to the source for better categorization or identification.
The type of the data source. A valid type is the service_name
of a source type returned from the /source_types
endpoint, where the source type is marked as creatable_via_api
.
When the connection was created
Indicates if the last connection test to this source was successful.
Timestamp of when the last connection test was conducted on this source.
Detailed configuration and information for connecting to this source.
Was this page helpful?
curl --request POST \
--url https://app.getcensus.com/api/v1/sources \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"connection": {
"label": "Acme Inc. Snowflake",
"credentials": {
"hostname": "<instance>.<region>.redshift.amazonaws.com,",
"port": "5439,",
"user": "redshift_user,",
"password": "redshift_password,",
"database": "demo"
},
"type": "snowflake"
}
}'
{
"status": "created",
"data": {
"id": 4,
"name": "Snowflake - xxxxxxx.us-east-1",
"label": "Acme Inc. Snowflake",
"type": "snowflake",
"created_at": "2023-07-22T23:42:47.239Z",
"last_test_succeeded": true,
"last_tested_at": "2023-11-07T05:31:56Z",
"connection_details": {
"account": "xxxxxxx.us-east-1,",
"user": "DEV,",
"warehouse": "TEST,",
"use_keypair": false
}
}
}