connections_create
const url = 'https://example.com/api/connections';const options = { method: 'POST', headers: { 'X-Workspace': '2489E9AD-2EE2-8E00-8EC9-32D5F69181C0', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"plugin":"example","name":"example","shared_params":{"additionalProperty":"example"},"private_params":{"additionalProperty":"example"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/connections \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'X-Workspace: 2489E9AD-2EE2-8E00-8EC9-32D5F69181C0' \ --data '{ "plugin": "example", "name": "example", "shared_params": { "additionalProperty": "example" }, "private_params": { "additionalProperty": "example" } }'Create a new Connection object.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Workspace ID
Request Bodyrequired
Section titled “Request Bodyrequired”Document the request body for creating a connection.
The runtime validation is custom (plugin/shared_params/private_params) and
does not fully map to ConnectionSerializer fields, so Swagger needs a
dedicated request schema.
object
Name of the connection. When empty, the name is computed by the plugin. Ignored when the connection already exists in the workspace.
object
object
Example generated
{ "plugin": "example", "name": "example", "shared_params": { "additionalProperty": "example" }, "private_params": { "additionalProperty": "example" }}Document the request body for creating a connection.
The runtime validation is custom (plugin/shared_params/private_params) and
does not fully map to ConnectionSerializer fields, so Swagger needs a
dedicated request schema.
object
Name of the connection. When empty, the name is computed by the plugin. Ignored when the connection already exists in the workspace.
object
object
Example generated
plugin=example&name=example&additionalProperty=example&additionalProperty=exampleDocument the request body for creating a connection.
The runtime validation is custom (plugin/shared_params/private_params) and
does not fully map to ConnectionSerializer fields, so Swagger needs a
dedicated request schema.
object
Name of the connection. When empty, the name is computed by the plugin. Ignored when the connection already exists in the workspace.
object
object
Responses
Section titled “Responses”Serializer for handling connection-related data.
object
Serializer for handling connection-related data.
object
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
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
Return the last edited time of an object’s credential for the current user.
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.
Return the current tasks for the current connection.
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.
Example generated
{ "plugin": "example", "shared_params": [ { "key": "example", "value": "example" } ], "workspace": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}object
object
Example
{ "code": "plugin_error", "message": "An error occurred in the plugin. Check the `details` property for more details.", "details": [ { "parameter": "connection", "message": "Custom message from the plugin", "code": "authentication_failed" } ]}
