curl --request PATCH \
--url https://app.getcensus.com/api/v1/destinations/{destination_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"service_connection": {
"name": "Google Sheets",
"credentials": {},
"type": "<string>"
}
}
'{
"status": "updated",
"data": {
"id": 12,
"name": "Google Sheets",
"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_id": "7515011393,",
"account_name": "Manager Account Test"
},
"objects": [
{
"label": "User",
"full_name": "user",
"supported_operations": [
"insert",
"update",
"upsert"
],
"primary_identifier_mapping_attributes": {
"upsert": {
"required": true,
"hide_destination_key": false,
"notes": "Your identifier must be a valid email."
},
"mirror": {
"required": false,
"hide_destination_key": false,
"notes": null
}
},
"allow_custom_fields": true,
"allow_case_sensitive_fields": true,
"advanced_configuration_field_definitions": [
{
"name": "http_endpoint",
"type": "string",
"label": "HTTP Endpoint",
"input_type": "text",
"placeholder": "/users",
"sort_order": 1,
"required": true
},
{
"name": "batch_size",
"type": "integer",
"label": "Batch Size",
"input_type": "textarea",
"placeholder": "",
"default": 1,
"sort_order": 2
},
{
"name": "http_method",
"type": "string",
"label": "HTTP Method",
"input_type": "dropdown",
"default": "POST",
"sort_order": 3,
"supported_values": [
"POST",
"PUT",
"PATCH",
"DELETE",
"GET"
]
}
],
"supports_field_ordering": false,
"can_be_sync_destination": true,
"fields": [
{
"label": "External User ID",
"full_name": "external_id",
"createable": true,
"updateable": true,
"operations": [
"overwrite"
],
"array": true,
"preserve_values_supported": true,
"required_for_mapping": true,
"can_be_upsert_key": true,
"can_be_update_key": true,
"can_be_insert_key": true,
"can_be_reference_key": true,
"lookup_object": "company",
"type": "string"
}
],
"configurable_field_definitions": {
"http_endpoint": "string",
"batch_size": "integer"
}
}
]
}
}Update certain values of a destination
curl --request PATCH \
--url https://app.getcensus.com/api/v1/destinations/{destination_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"service_connection": {
"name": "Google Sheets",
"credentials": {},
"type": "<string>"
}
}
'{
"status": "updated",
"data": {
"id": 12,
"name": "Google Sheets",
"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_id": "7515011393,",
"account_name": "Manager Account Test"
},
"objects": [
{
"label": "User",
"full_name": "user",
"supported_operations": [
"insert",
"update",
"upsert"
],
"primary_identifier_mapping_attributes": {
"upsert": {
"required": true,
"hide_destination_key": false,
"notes": "Your identifier must be a valid email."
},
"mirror": {
"required": false,
"hide_destination_key": false,
"notes": null
}
},
"allow_custom_fields": true,
"allow_case_sensitive_fields": true,
"advanced_configuration_field_definitions": [
{
"name": "http_endpoint",
"type": "string",
"label": "HTTP Endpoint",
"input_type": "text",
"placeholder": "/users",
"sort_order": 1,
"required": true
},
{
"name": "batch_size",
"type": "integer",
"label": "Batch Size",
"input_type": "textarea",
"placeholder": "",
"default": 1,
"sort_order": 2
},
{
"name": "http_method",
"type": "string",
"label": "HTTP Method",
"input_type": "dropdown",
"default": "POST",
"sort_order": 3,
"supported_values": [
"POST",
"PUT",
"PATCH",
"DELETE",
"GET"
]
}
],
"supports_field_ordering": false,
"can_be_sync_destination": true,
"fields": [
{
"label": "External User ID",
"full_name": "external_id",
"createable": true,
"updateable": true,
"operations": [
"overwrite"
],
"array": true,
"preserve_values_supported": true,
"required_for_mapping": true,
"can_be_upsert_key": true,
"can_be_update_key": true,
"can_be_insert_key": true,
"can_be_reference_key": true,
"lookup_object": "company",
"type": "string"
}
],
"configurable_field_definitions": {
"http_endpoint": "string",
"batch_size": "integer"
}
}
]
}
}Bearer token for the current workspace. Can be retrieved from the Workspace's settings page.
ID of the destination to update
Contains the information for the connection.
Show child attributes
Was this page helpful?