# Connections

Use the following endpoints to retrieve and create the connections that belong to a Workato Embedded customer account. All API endpoints listed here requires oem_vendor privilege. Talk to your Workato representative to enable this privilege in your account.

# Quick reference

Type Resource Description
GET /api/managed_users/:managed_user_id/connections Returns a list of connections in Workato Embedded user's account.
POST /api/managed_users/:id/connections Allows the Workato Embedded partner to add a shell connection in a customer's account.
PUT /api/managed_users/:id/connections/:connection_id Updates a connection in a customer account.

# List connections

Returns all connections and associated data for the Workato Embedded customer account.

GET /api/managed_users/:managed_user_id/connections

# URL parameters

Name Type Description
managed_user_id string
required
Workato Embedded customer Account ID/External ID.
External id should be prefixed with a E(eg: EA2300) and the resulting id should be URL encoded.

# Sample request

curl  -X GET https://www.workato.com/api/managed_users/98178/connections \
      -H 'x-user-email: <email>' \
      -H 'x-user-token: <token>'

# Response

{
 "result": [
   {
     "id": 36,
     "name": "ACME Production Salesforce connection",
     "provider": "salesforce",
     "authorized_at": "2015-05-26T22:53:52.528Z",
     "authorization_status": "success",
     "authorization_error": null,
     "created_at": "2015-05-26T22:53:52.532Z",
     "updated_at": "2015-05-26T22:53:52.532Z"
   },
   {
       "id": 37,
       "name": "ACME google sheet account",
       "provider": "google_sheets",
       "authorized_at": "2015-05-26T22:53:52.528Z",
       "authorization_status": "success",
       "authorization_error": null,
       "created_at": "2015-05-26T22:53:52.532Z",
       "updated_at": "2015-05-26T22:53:52.532Z"
   }
 ]
}

# Create connection

Allows the Workato Embedded partner to:

  • Add a shell connection in a customer's account OR
  • Add and authenticate a connection in a customer's account
POST /api/managed_users/:managed_user_id/connections

# URL parameters

Name Type Description
managed_user_id string
required
Workato Embedded customer Account ID/External ID.
External id should be prefixed with a E(eg: EA2300) and the resulting id should be URL encoded.

# Body

Name Type Description
name string
optional
Name of the connection. Eg: 'Prod Salesforce connection'
provider string
required
Connector identifier. Eg: 'salesforce'
input Object
optional
Connection parameters.

For a list of providers and connection parameters, please view this document.

# Sample request

# Shell connection request

This creates the connection in a 'Disconnected' state.

curl  -X GET https://www.workato.com/api/managed_users/98178/connection \
      -H 'x-user-email: <email>' \
      -H 'x-user-token: <token>' \
      -H 'Content-Type: application/json' \
      -d  '{
            "name": "jira_connection",
            "provider": "jira"
          }'
# Connection request with credentials

Authenticates the connection (API token authentication).

curl  -X GET https://www.workato.com/api/managed_users/98178/connection \
      -H 'x-user-email: <email>' \
      -H 'x-user-token: <token>' \
      -H 'Content-Type: application/json' \
      -d  '{
            "name": "jira_connection",
            "provider": "jira",
            "input": {
              "host_name": "acme.atlassian.net",
              "api_token_auth": "true",
              "email": "smith@acme.com",
              "apitoken": "XXXXXXXX"
            }
          }'

# Response

{
 "id": 36,
 "name": "jira_connection",
 "provider": "jira",
 "authorized_at": "2015-05-26T22:53:52.528Z",
 "authorization_status": "success",
 "authorization_error": null,
 "created_at": "2015-05-26T22:53:52.532Z",
 "updated_at": "2015-05-26T22:53:52.532Z"
}

# Update connection

Updates a connection in a customer account.

PUT /api/managed_users/:managed_user_id/connections/:connection_id

# URL parameters

Name Type Description
managed_user_id string
required
Workato Embedded customer Account ID/External ID.
External id should be prefixed with a E(eg: EA2300) and the resulting id should be URL encoded.
connection_id string
required
ID of the connection

# Body

Name Type Description
name string
optional
Name of the connection. Eg: 'Prod Salesforce connection'
input Object
optional
Connection parameters.

For a list of providers and connection parameters, please view this document.

# Sample request

curl  -X PUT https://www.workato.com/api/managed_users/98178/connections/1678 \
      -H 'x-user-email: <email>' \
      -H 'x-user-token: <token>' \
      -d  '{
            "name": "jira_connection_latest",
            "input": {
              "host_name": "acme.atlassian.net",
              "api_token_auth": "true",
              "email": "smith@acme.com",
              "apitoken": "XXXXXXXX"
            }
          }'

# Response

{
    "application": "jira",
    "id": 1678,
    "name": "jira_connection_latest",
    "description": null,
    "authorized_at": "2020-08-03T06:06:13.230-07:00",
    "authorization_status": "success",
    "authorization_error": null,
    "created_at": "2020-08-03T06:06:05.389-07:00",
    "updated_at": "2020-08-12T05:02:14.792-07:00"
}