Connectivity Hub API

Note: This is provided as-is.
No commitment the functionality will remain available on future releases

Configuration API

Use the API information in the table below to connect to your database and/or check for an upgrade.

Method Operation Description URI JSON (Request) Body Response Body Successful Result Unsuccessful Result
POST Create Connect to database /api/databaseConnections/undefined?dbOperation=Connect {"dbAuth""Service|Impersonate",
"type""ConfigurationDatabase",
"dbConnMode""Advanced",
"displayConnectionString":"Data Source=SQLServer;Initial Catalog=CH;Integrated Security=True",
"dbServer""",
"dbName""",
"dbUser":"",
"dbPass":""
}
none HTTP 200 OK
GET Read Check for database upgrade /api/healthcheck/dbversion none none

HTTP 200 OK

  • no upgrade is needed)

HTTP 500 ERROR

  • an upgrade is needed
  • The content of the response will contain the details of the error in case it's triggered by something else)

How to Upgrade the Database

First you need to get the current database details so our API knows what you're trying to upgrade

  • API: GET /api/DatabaseConnections?type=ConfigurationDatabase
  • Expected result: JSON object with ID and connection details to database (passwords are hidden)

You extract the ID from the JSON and keep the entire JSON to send it to the upgrade API

  • API: PUT /api/DatabaseConnections/{ID from previous step}?dbOperation=Upgrade
    JSON body: the JSON from the previous step

Expected result:

  • 200 OK - the upgrade was successful

Other possible results:

  • HTTP 500 ERROR - something wrong happened and manual intervention is needed (check logs, UI, etc.)

  1. First, retrieve the content details so the Connectivity Hub API knows what you're trying to modify.
  2. Next, modify the connectionId parameter and send it to the API.

See here for an example of how to automatically connect to a database from a Windows PowerShell module.

Method Operation Description URI JSON (Request) Body Response Body Successful Result Unsuccessful Result
GET Read Retrieve the current database details so the Connectivity Hub API knows what you're trying to upgrade /api/DatabaseConnections?type=ConfigurationDatabase none none JSON object with ID and connection details to database (passwords are hidden)
PUT Update

Extract the ID from the JSON object returned.

Keep the entire JSON to send to the upgrade API.

/api/DatabaseConnections/{ID from previous step}?dbOperation=Upgrade JSON output from the READ operation above none

HTTP 200 OK

  • Upgrade successful

HTTP 500 ERROR

  • An error occurred.
  • Manual intervention is needed (check logs, UI, etc.)

Content Source API

How to Change the Connection Content is Linked to

First you need to get the content details so our API knows what you're trying to modify.

For this you need a content ID which you can identify via GET /api/contents

  • API: GET /api/ws-content-sources/{ID}
  • Expected result: JSON object with the details of the content including the related connection (connectionId)

You then modify the connectionId and send it to the API

  • API: PUT /api/ws-content-sources/{ID}
  • JSON body: the JSON from the previous call with all the content details and the modified connectionId

Expected result:

  • 200 OK - The update was successful

Other possible results:

  • HTTP 500 ERROR - Something wrong happened and manual intervention is needed (check logs, UI etc)
  1. First, retrieve the content details so the Connectivity Hub API knows what you're trying to modify.
  2. Next, modify the connectionId parameter and send it to the API.
Method Operation Description URI JSON (Request) Body Response Body Successful Result Unsuccessful Result
GET Read

Retrieve the content details the Connectivity Hub API knows what you're trying to modify.

This requires a content ID which you can identify via GET /api/contents

/api/ws-content-sources/{ID} none none JSON object with the details of the content including the related connection (connectionId)
PUT Update Modify the connectionId and send it to the API /api/ws-content-sources/{ID} JSON output from the READ operation above with all the content details and the modified connectionId none

HTTP 200 OK

  • Update successful

HTTP 500 ERROR

  • An error occurred.
  • Manual intervention is needed (check logs, UI, etc.)