Update source
Update certain values of a source. Only include the fields you want to change.
- The
type,region, andsync_engineof a source are set at creation and cannot be changed. Includingregionin the request returns a400error. - To rotate the credentials of the source's custom storage backend, include
storage_backendwith the new credentials. The storage backend type and location can't be changed, and a storage backend can't be added to a source that doesn't have one. If the new credentials are invalid, the request returns a422error and nothing is saved.
Request schema
Path parameters
ID of the source to update
Header parameters
HTTP: basicAuth
HTTP AuthorizationScheme: basic
Request
Contains the information for the connection.
An optional label that can be assigned to the source for better categorization or identification.
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.
Credentials that should be associated with this source (for example, hostname, port)
additional property
Credentials for the source's existing custom storage backend. Use this to rotate or replace the credentials Fivetran uses to access your bucket or container.
- The source must already have a storage backend configured. A storage backend can't be added to a source after creation.
- The storage backend type and its location (for example, the bucket name) can't be changed. You can omit type and the location fields. If you include them, they must match the current values.
- Fields you omit keep their current values.
- The new credentials are tested for read, write, and delete access before they're saved. If the test fails, the request returns a 422 error and the existing credentials are unchanged.
Credentials to update on an existing Amazon S3 storage backend
The storage backend type. Optional, but if provided it must be s3 and match the source's existing storage backend.
The name of the S3 bucket. Optional, but if provided it must match the current bucket. It can't be changed.
The new AWS IAM role ARN used to access the bucket.
Credentials to update on an existing Google Cloud Storage backend
The storage backend type. Optional, but if provided it must be gcs and match the source's existing storage backend.
The name of the GCS bucket. Optional, but if provided it must match the current bucket. It can't be changed.
The GCP project ID. Optional, but if provided it must match the current project ID. It can't be changed.
The new GCP service account email used to access the bucket.
The new GCP service account key JSON used to access the bucket.
Credentials to update on an existing Azure Blob Storage backend
The storage backend type. Optional, but if provided it must be azure and match the source's existing storage backend.
The Azure storage account name. Optional, but if provided it must match the current account name. It can't be changed.
The Azure storage container name. Optional, but if provided it must match the current container name. It can't be changed.
The new Azure SAS token used to access the container.
The list of email addresses that receive sync alerts.
PATCH /api/v2/sources/{source_id} HTTP/1.1 Authorization: Bearer REPLACE_BEARER_TOKEN Content-Type: application/json Host: app.getcensus.com Content-Length: 578 { "connection": { "name": "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" }, "storage_backend": { "type": "s3", "bucket_name": "my-census-bucket", "role_arn": "arn:aws:iam::123456789012:role/census-role" }, "notification_emails": [ "notifications@mycompany.slack.com", "alerts@mycompany.com" ] } }
Responses
200
Outcome of the operation.
The unique identifier of the source.
The unique identifier of the group that this source belongs to.
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.
The sync engine type for this source.
When the connection was created
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.
The name of the step in the connection test process.
The error message associated with the step, if any.
The status of the step.
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.
additional property
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.
The geographic region where the source data resides. Region availability depends on your account tier.
See the available regions for a complete list.
Custom storage backend configuration for the source. The structure varies based on the storage type (S3, GCS, or Azure).
additional property
The list of email addresses that receive sync alerts.
{ "status": "updated", "data": { "id": 4, "group_id": "wandering_aimlessly", "name": "Acme Inc. Snowflake", "type": "snowflake", "sync_engine": "basic", "created_at": "2023-07-22T23:42:47.239Z", "last_test_results": { "steps": [ { "step": "Verify connectivity", "error": { "message": "string" }, "status": "success" } ] }, "last_test_succeeded": true, "last_tested_at": "2019-08-24T14:15:22Z", "connection_details": { "account": "xxxxxxx.us-east-1,", "user": "DEV,", "warehouse": "TEST,", "use_keypair": false }, "warehouse_writeback_retention_in_days": 7, "region": "AWS-US-EAST-1", "storage_backend": {}, "notification_emails": [ "notifications@mycompany.slack.com", "alerts@mycompany.com" ] } }