ConnectALL extends its Manage Connections feature by exposing it as a ReST resource to consume and manage your application endpoints externally. You can consume these resources to update the password automatically when it's renewed based on the expiration policies. Additionally, you can perform CRUD operations on managed connections using this API. The resources are currently backed by "Basic authentication" so it's strongly advisable to back the Tomcat with an SSL certificate. 

ReST API for 'Manage Connections' feature is currently limited only to "CA-ADMIN" users.

Query managed connections

MethodGET
Resourcerest/api/connections
Query ParamappType - application type
Request
N/A
CODE
Response

Password is always masked in the GET requests

[
    {
        "id": 19562926701893,
        "userName": "user@sforce.com",
        "url": "https://login.salesforce.com",
        "password": "******",
        "createdUser": "admin",
        "applicationType": "salesforce",
        "operationFlag": "",
        "userGroup": null,
        "loginOptionValues": {
            "organizationId": "0salesforceorgz"
        }
    },
    {
        "id": 91717953888906,
        "userName": "g2guser@go2group.com",
        "url": "https://login.salesforce.com",
        "password": "******",
        "createdUser": "sforceadmin",
        "applicationType": "salesforce",
        "operationFlag": "",
        "userGroup": "Salesforce",
        "loginOptionValues": {
            "organizationId": "00go2grouporgzh"
        }
    }
]
CODE
Example
curl -X GET \
  'http://localhost:8080/ConnectAll/rest/api/connections?appType=salesforce' \
  -H 'Authorization: Basic YWRtaW46d2VsY29tZQ=='
CODE


Create a new managed connection

METHODPUT
Resourcerest/api/connections
Request Payload
{
 "applicationType": "salesforce",
 "createdUser": "admin",
 "userName": "user@sforce.com",
 "url": "https://login.salesforce.com",
 "password": "password+secretkey",
 "loginOptionValues": {
 "organizationId": "00SalesforceOrgIdz"
 }
}
CODE
Response
{
    "id": 19562926701893,
    "userName": "user@sforce.com",
    "url": "https://login.salesforce.com",
    "password": "password+secretkey",
    "createdUser": "admin",
    "applicationType": "salesforce",
    "operationFlag": "",
    "userGroup": null,
    "loginOptionValues": {
        "organizationId": "00SalesforceOrgIdz"
    }
}
CODE
Example
curl -X PUT \
  http://localhost:8080/ConnectAll/rest/api/connections \
  -H 'Authorization: Basic YWRtaW46d2VsY29tZQ==' \
  -H 'Content-Type: application/json' \
  -H 'cache-control: no-cache' \
  -d '{
        "applicationType": "salesforce",
        "userName": "user@sforce.com",
        "url": "https://login.salesforce.com",
        "password": "password+secretkey",
         "createdUser": "admin",
        "loginOptionValues": {
            "organizationId": "00SalesforceOrgIdz"
        }
}'
CODE

Updating a managed connection

MethodPUT
Resourcerest/api/connections/{connectionid}
Request Payload
{
 "id": 19562926701893
 "applicationType": "salesforce",
 "createdUser": "admin",
 "userName": "user@sforce.com",
 "url": "https://login.salesforce.com",
 "password": "password+secretkey_renewed",
 "loginOptionValues": {
 "organizationId": "00SalesforceOrgIdz"
 }
}
CODE
Response
{
    "results": [
        "SUCCESS=Application 'SForceJira_1766446894' is updated successfully \n",
        "COMPLETED=Completed processing the updates; count of applications updated is 1"
    ]
}
CODE
Example
curl -X POST \
  http://localhost:8080/ConnectAll/rest/api/connections/19562926701893 \
  -H 'Authorization: Basic YWRtaW46d2VsY29tZQ==' \
  -H 'Content-Type: application/json' \
  -H 'cache-control: no-cache' \
  -d '{
        "id": 19562926701893,
        "applicationType": "salesforce",
        "userName": "user@sforce.com",
        "url": "https://login.salesforce.com",
        "password": "password+secretkey_renewed",
         "createdUser": "admin",
        "loginOptionValues": {
            "organizationId": "00D1U0000012FPz"
        }
}'
CODE

Retrieve managed connections

MethodGET
Resourcerest/api/connections/{connectionid}
Request payload
N/A
CODE
Response

Password is always masked in the GET requests

{
    "id": 19562926701893,
    "userName": "user@sforce.com",
    "url": "https://login.salesforce.com",
    "password": "************",
    "createdUser": "admin",
    "applicationType": "salesforce",
    "operationFlag": "",
    "userGroup": null,
    "loginOptionValues": {
        "organizationId": "00SalesforceOrgIdz"
    }
}
CODE
Example
curl -X GET \
  http://localhost:9080/ConnectAll/rest/api/connections/19562926701893 \
  -H 'Authorization: Basic YWRtaW46d2VsY29tZQ==' \
  -H 'Content-Type: application/json'
CODE