Using the Connections REST API
The Connections REST API has a few different shapes of data to
consider, given that a connection can be one of:
-
MetadataOnly
-
WebService
-
ServiceCloud
-
InterviewExtensionData
Example GET response to metadata-only connection
{
"serviceName": "Test 129",
"serviceType": "MetadataOnly",
"lastUpdated": "2018-03-06T05:49:03Z",
"workspaces": ["Default Collection"],
"metadata": {
"staticMetadata":"<typ:get-metadata-response xmlns:typ=\"<xref format=\"html\" href=\"http://xmlns.oracle.com/policyautomation/hub/12.2.2/metadata/types/\" scope=\"external\"><b>http://xmlns.oracle.com/policyautomation/hub/12.2.2/metadata/types\"</b></xref>supports-checkpoints=\"true\"><!--Optional:--><!--Zero or more repetitions:--><typ:Table accepts-attachments=\"false\" can-be-input=\"true\" can-be-output=\"true\" description=\"INFO\" name=\"Info\"> <!--Zero or more repetitions:--> <typ:Field can-be-input=\"false\" can-be-output=\"true\" description=\"CHILD_NUMBER\" name=\"child_number\" type=\"DECIMAL\"/> <!--Zero or more repetitions:--> <typ:Link cardinality=\"C_1M\" description=\"ALL_CHILDREN\" name=\"all_children\" target=\"Child\"/><\/typ:Table><typ:Table accepts-attachments=\"false\" can-be-input=\"true\" can-be-output=\"true\" description=\"CHILD\" name=\"Child\"> <!--Zero or more repetitions:--> <typ:Field can-be-input=\"true\" can-be-output=\"false\" description=\"CHILD_NAME\" name=\"child_name\" type=\"STRING\"/> <typ:Field can-be-input=\"true\" can-be-output=\"false\" description=\"CHILD_AGE\" name=\"child_age\" type=\"DECIMAL\"/> <typ:Field can-be-input=\"false\" can-be-output=\"true\" description=\"BIGGEST_CHILD\" name=\"biggest_child\" type=\"BOOLEAN\"/> <!--Zero or more repetitions:--> <typ:Link cardinality=\"C_1M\" description=\"CHILD_TOYS\" name=\"child_toys\" target=\"Toy\"/><\/typ:Table><typ:Table accepts-attachments=\"false\" can-be-input=\"true\" can-be-output=\"false\" description=\"TOY\" name=\"Toy\"> <!--Zero or more repetitions:--> <typ:Field can-be-input=\"true\" can-be-output=\"false\" description=\"TOY_NAME\" name=\"toy_name\" type=\"STRING\"/> <typ:Field can-be-input=\"true\" can-be-output=\"false\" description=\"TOY_PRICE\" name=\"toy_price\" type=\"DECIMAL\"/><\/typ:Table><\/typ:get-metadata-response>",
"schemaVersion":"12.2.2"
}
}
Example GET response to web service connection
{
"serviceName": "Test 128",
"serviceType": "WebService",
"lastUpdated": "2018-03-21T00:17:31Z",
"workspaces": ["Default Collection"],
"webService": {
"url": "https://mysite.example.com/my-webservice",
"usePrivateCertificateFlag": false,
"username": "service user",
"schemaVersion": "12.2.9",
"useWSS": "None",
"useWSSTimestampFlag": false
}
}
Example GET response to Service Cloud connection
{
"serviceName": "opa_dev",
"serviceType": "ServiceCloud",
"lastUpdated": "2017-12-18T07:05:04Z",
"workspaces": ["Default Collection"],
"serviceCloud": {
"url": "https://mysite.example.com/services/soap/connect/soap",
"usePrivateCertificateFlag": false,
"username": "OPA_Internal",
"cxSiteName": "opa_dev"
}
}
Example GET response to interview extension connection
{
"serviceName": "fetch-service",
"serviceType": "InterviewExtensionData",
"workspaces": ["Default Collection"],
"interviewExtensionData": {
"url": "https://mysite.example.com/fetch-service",
"useCustomRootCertificatesFlag": false,
"authenticationMethod": "Basic",
"username": "admin",
"healthCheckUrl": "https://mysite.example.com/fetch-service/check"
}
}