Skip to content

connections_partial_update

PATCH
/api/connections/{id}
curl --request PATCH \
--url https://example.com/api/connections/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Workspace: 2489E9AD-2EE2-8E00-8EC9-32D5F69181C0' \
--data '{ "name": "example", "private_params": { "additionalProperty": "example" } }'

Rename the connection item or update the user’s private parameters.

id
required
string format: uuid

A UUID string identifying this connection.

X-Workspace
required
string format: uuid

Workspace ID

Document the request body for updating a connection.

object
name

New name of the connection. Only workspace owners may rename it.

string
<= 1000 characters
private_params
object
key
additional properties

Example generated

{
"name": "example",
"private_params": {
"additionalProperty": "example"
}
}
Media typeapplication/json

Serializer for handling connection-related data.

object
id
required
string format: uuid
name
required
string
nullable
plugin
string
nullable <= 100 characters
shared_params
required
Array<object>

Serializer for handling connection-related data.

object
key
string
nullable <= 100 characters
value
required
string
plugin_obj
required

Return serialized data for a plugin object based on the plugin class.

Parameters

obj : Connection The object containing information about a plugin.

Returns

dict An instance of the PluginSerializer class with the plugin class obtained from get_plugin_class(obj.plugin) and the context set to include the request from self.context.

object
key
additional properties
credential
required
One of:
object
key
additional properties
created_by
required

Return the interactor information of the object’s creator.

Parameters

obj : Connection The object containing the creator information.

Returns

dict The interactor information of the creator.

object
key
additional properties
created_time
required
string format: date-time
last_edited_time
required

Return the last edited time of an object’s credential for the current user.

string
nullable
workspace
string format: uuid
status
required

Return the status of a credential object associated with a user.

Parameters

obj : Connection The object containing information related to the credential.

Returns

str A string representing the status of the credential. Returns “not_connected” if no credential is found or an empty string in case of an exception.

string
current_tasks
required

Return the current tasks for the current connection.

Array
is_sandbox
required

Determine whether the connection is a sandbox one.

Parameters

obj : Connection The object containing the plugin and shared parameters.

Returns

bool True if the connection uses a sandbox URL, False otherwise.

boolean

Example generated

{
"plugin": "example",
"shared_params": [
{
"key": "example",
"value": "example"
}
],
"workspace": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}
Media typeapplication/json
object
code
required
string
>= 1 characters
message
required
string
>= 1 characters
details
required
Array<object>
object
parameter
string
nullable
code
string
nullable
message
string

Example

{
"code": "plugin_error",
"message": "An error occurred in the plugin. Check the `details` property for more details.",
"details": [
{
"parameter": "plugin",
"message": "Custom message from the plugin",
"code": "authentication_failed"
}
]
}
Media typeapplication/json
object
code
required
string
>= 1 characters
message
required
string
>= 1 characters
details
required
Array<object>
object
parameter
string
nullable
code
string
nullable
message
string

Example

{
"code": "forbidden",
"message": "You do not have permission to perform this operation. Check the `details` property for more details.",
"details": [
{
"parameter": "name",
"message": "Only workspace owners can rename a connection.",
"code": "permission_denied"
}
]
}
Media typeapplication/json
object
code
required
string
>= 1 characters
message
required
string
>= 1 characters
details
required
Array<object>
object
parameter
string
nullable
code
string
nullable
message
string

Example

{
"code": "object_not_found",
"message": "Object not found. Check the `details` property for more details.",
"details": [
{
"parameter": "<id>",
"code": "does_not_exist",
"message": "\"<id>\" does not exist."
}
]
}