curl --request PATCH \
--url https://app.getcensus.com/api/v1/sources/{source_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"connection": {
"name": "Acme Inc. Snowflake",
"label": "Acme Inc. Snowflake",
"warehouse_writeback_retention_in_days": 7,
"credentials": {
"hostname": "<instance>.<region>.redshift.amazonaws.com,",
"port": "5439,",
"user": "redshift_user,",
"password": "redshift_password,",
"database": "demo"
}
}
}
'{
"status": "updated",
"data": {
"id": 4,
"name": "Acme Inc. Snowflake",
"label": "Acme Inc. Snowflake",
"type": "snowflake",
"sync_engine": "basic",
"created_at": "2023-07-22T23:42:47.239Z",
"last_test_results": {
"steps": [
{
"step": "Verify connectivity",
"status": "success",
"error": {
"message": "<string>"
}
}
]
},
"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
},
"warehouse_writeback_retention_in_days": 7
}
}Update certain values of a source
curl --request PATCH \
--url https://app.getcensus.com/api/v1/sources/{source_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"connection": {
"name": "Acme Inc. Snowflake",
"label": "Acme Inc. Snowflake",
"warehouse_writeback_retention_in_days": 7,
"credentials": {
"hostname": "<instance>.<region>.redshift.amazonaws.com,",
"port": "5439,",
"user": "redshift_user,",
"password": "redshift_password,",
"database": "demo"
}
}
}
'{
"status": "updated",
"data": {
"id": 4,
"name": "Acme Inc. Snowflake",
"label": "Acme Inc. Snowflake",
"type": "snowflake",
"sync_engine": "basic",
"created_at": "2023-07-22T23:42:47.239Z",
"last_test_results": {
"steps": [
{
"step": "Verify connectivity",
"status": "success",
"error": {
"message": "<string>"
}
}
]
},
"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
},
"warehouse_writeback_retention_in_days": 7
}
}Bearer token for the current workspace. Can be retrieved from the Workspace's settings page.
ID of the source to update
Contains the information for the connection.
Show child attributes
An optional label that can be assigned to the source for better categorization or identification.
"Acme Inc. Snowflake"
DEPRECATED: Use 'name' instead. An optional label that can be assigned to the source for better categorization or identification.
"Acme Inc. Snowflake"
Number of days to retain warehouse writeback data. When set, automatically enables sync logs for this source. Only supported for certain source types, see supports_warehouse_writeback field in the Source Types endpoint. Only supported for sources with Advanced sync engine. Requires the sync logs feature to be included in your organization's plan.
x >= 17
Credentials that should be associated with this source (e.g. hostname, port)
{
"hostname": "<instance>.<region>.redshift.amazonaws.com,",
"port": "5439,",
"user": "redshift_user,",
"password": "redshift_password,",
"database": "demo"
}Successfully updated the source
Outcome of the operation.
success, updated, created, not_found, error "updated"
Show child attributes
The unique identifier of the source.
4
An optional label that can be assigned to the source for better categorization or identification.
"Acme Inc. Snowflake"
DEPRECATED: Use 'name' instead. An optional label that can be assigned to the source for better categorization or identification.
"Acme Inc. Snowflake"
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.
"snowflake"
The sync engine type for this source.
basic, advanced "basic"
When the connection was created
"2023-07-22T23:42:47.239Z"
Show child attributes
An ordered array of steps representing the results of the last connection test. If one step fails then we won't surface details on later steps.
Show child attributes
The name of the step in the connection test process.
"Verify connectivity"
The status of the step.
running, success, failed, warning "success"
Indicates if the last connection test to this source was successful.
true
Timestamp of when the last connection test was conducted on this source.
Detailed configuration and information for connecting to this source.
{
"account": "xxxxxxx.us-east-1,",
"user": "DEV,",
"warehouse": "TEST,",
"use_keypair": false
}Number of days to retain warehouse writeback data. When set, automatically enables sync logs for this source. Only supported for certain source types, see supports_warehouse_writeback field in the Source Types endpoint. Only supported for sources with Advanced sync engine. Requires the sync logs feature to be included in your organization's plan.
x >= 17
Was this page helpful?