SAP Cloud Platform Open Connectors

Discovery APIs

Use the Discovery APIs in conjunction with a specific authenticated element intsance to:
  • Identify data objects in an element
  • Identify data objects and their source (the vendor, a CO, or SAP Cloud Platform Open Connectors library)
  • Find metadata, including custom fields, related to an object
  • Retrieve the Open API specifications (API docs) of an object

List Connector Objects

GET /hubs/{hubName}/objects

Retrieve a list of all data objects in an connector.

Path Parameters

hubNameThe name of hub that the connector is in.

Header Parameters

Required: Authorization including User Secret, Organization Secret, and Connector Instance Token

 

Response Fields

The response is a JSON list of objects.

Example Request

curl -X GET \
  https://api.openconnectors.us2.ext.hana.ondemand.com/elements/api-v2/objects \
  -H 'authorization: User sAfK7LJGNz5ZHcNrvdJvLI=f03WbTbH6aRKc0HJ3oOIi, Organization 58168435e3b9959a929eb04b6218b9a2, Token yCCtl7Pqx0E4Qf6MBFXxT+/QcbogS1q1Deyw+1vSW=A3' \
  -H 'Content-Type: application/json' \

Example Response

[  
  "Account",
  "ApexTestResult",
  "CaseContactRole",
  "SearchPromotionRule",
  "ApexTestResultLimits",
  "UserProvAccountStaging",
  "FeedAttachment",
  "Document",
  "ContactCleanInfo",
  "ContentWorkspaceMember",
]

List Connector Objects and their Sources

GET hubs/{hubName}/objects (v2)

Retrieve a list of all data objects in an connector and their source (the vendor, a CO, or Cloud Elements library). For version 2, pass Elements-Version: Helium in the request header.

Path Parameters

hubNameThe name of hub that the connector is in.

Header Parameters

Required: 

  • Authorization including User Secret, Organization Secret, and Connector Instance Token
  • Elements-Version: Helium. The Elements-Version header specifies the version of the API request, with Helium being version two required for this more verbose GET /objects endpoint.

 

Response Parameters

  • name The name of the connector object. 
  • vendorName The name specified within the API provider's system. 
  • type Specifies whether the object is a CO created in SAP Cloud Platform Open Connectors, a normalized SAP Cloud Platform Open Connectors object (ceCanonical), or an object that exists at the API provider (vendor).

Example Request

curl -X GET \
https://api.openconnectors.us2.ext.hana.ondemand.com/elements/api-v2/objects \
-H 'authorization: User sAfK7LJGNz5ZHcNrvdJvLI=f03WbTbH6aRKc0HJ3oOIi, Organization 58168435e3b9959a929eb04b6218b9a2, Token yCCtl7Pqx0E4Qf6MBFXxT+/QcbogS1q1Deyw+1vSW=A3' \
-H 'Elements-Version: Helium ' \
-H 'Content-Type: application/json' \

Example Response

[
    {
        "name": "products",
        "vendorName": "Product",
        "type": "vdr"
    },
    {
        "name": "servicesDataV20.0SobjectsAttachmentBody",
        "vendorName": "servicesDataV20.0SobjectsAttachmentBody",
        "type": "vendor"
    },
    {
        "name": "servicesDataV35.0AnalyticsReportsDescribe",
        "vendorName": "servicesDataV35.0AnalyticsReportsDescribe",
        "type": "vendor"
    },
    {
        "name": "notes",
        "vendorName": "Note",
        "type": "vdr"
    },
    {
        "name": "incidents",
        "vendorName": "Case",
        "type": "vdr"
    },
    {
        "name": "tasks",
        "vendorName": "Task",
        "type": "vdr"
    },
    {
        "name": "contacts",
        "vendorName": "Contact",
        "type": "vdr"
    },
    {
        "name": "servicesDataV36.0SobjectsBody",
        "vendorName": "servicesDataV36.0SobjectsBody",
        "type": "vendor"
    },
    {
        "name": "agents",
        "vendorName": "Contact",
        "type": "vdr"
    },
    {
        "name": "attachments",
        "vendorName": "servicesDataV29.0SobjectsAttachment",
        "type": "ceCanonical"
    },
    {
        "name": "accounts",
        "vendorName": "Account",
        "type": "vdr"
    },
    {
        "name": "activities",
        "vendorName": "Event",
        "type": "vdr"
    },
    {
        "name": "reportsMetadata",
        "vendorName": "servicesDataV35.0AnalyticsReportsDescribe",
        "type": "ceCanonical"
    },
    {
        "name": "opportunities",
        "vendorName": "Opportunity",
        "type": "vdr"
    },
    {
        "name": "servicesDataV20.0SobjectsAttachment",
        "vendorName": "servicesDataV20.0SobjectsAttachment",
        "type": "vendor"
    },
    {
        "name": "users",
        "vendorName": "User",
        "type": "vdr"
    },
    {
        "name": "servicesDataV29.0SobjectsAttachment",
        "vendorName": "servicesDataV29.0SobjectsAttachment",
        "type": "vendor"
    },
    {
        "name": "attachments",
        "vendorName": "servicesDataV36.0SobjectsAttachments",
        "type": "ceCanonical"
    },
    {
        "name": "reports",
        "vendorName": "Report",
        "type": "vdr"
    }
]


Retrieve the Open API Specifications (API docs) for an Object

GET /hubs/{hubName}/objects/{objectName}/docs

Retrieve the Open API Specifications (API docs) for an connector object. The returned specifications are in the Version 2.0 OpenAPI Specification format.

Path Parameters

hubNameThe name of hub that the connector is in.
objectNameThe name of the connector object.

Query Parameters

discoveryInclude discoverable vendor metadata in the definitions object true. The default is false.boolean
resolveReferencesOptionally resolve swagger references for an inline object definition true. The default is false.boolean
basicInclude only OpenAPI / Swagger properties in definitions true. The default is false which include specification extensions.boolean

Header Parameters

Required: Authorization including User Secret, Organization Secret, and Connector Instance Token

 

Response Fields

The response is a Version 2.0 OpenAPI Specification.

Example Request

curl -X GET \
  https://api.openconnectors.us2.ext.hana.ondemand.com/elements/api-v2/hubs/crm/objects/opportunities/docs?discovery=true&resolveReferences=false&basic=false" \ 
  -H 'authorization: User sAfK7LJGNz5ZHcNrvdJvLI=f03WbTbH6aRKc0HJ3oOIi, Organization 58168435e3b9959a929eb04b6218b9a2, Token yCCtl7Pqx0E4Qf6MBFXxT+/QcbogS1q1Deyw+1vSW=A3' \
  -H 'Content-Type: application/json' \

Example Response

{  
  "basePath":"/elements/api-v2/hubs/crm",
  "paths":{  },
  "host":"console.cloud-elements.com",
  "schemes":[  
    "https"
  ],
  "definitions":{  },
  "swagger":"2.0",
  "info":{  },
  "tags":[  ]
}


Retrieve an Connector Object's Metadata

GET /hubs/{hubName}/objects/{objectName}/metadata

Retrieve detailed information about an element object. The metadata includes the fields, including custom fields, related to an object.

Path Parameters

hubNameThe name of hub that the connector is in.
objectNameThe name of the connector object.

Header Parameters

Required: Authorization including User Secret, Organization Secret, and Connector Instance Token

 

Response Fields

The response varies depending on the object, but typically include a fields array.

Example Request

curl -X GET \
  https://api.openconnectors.us2.ext.hana.ondemand.com/elements/api-v2/hubs/marketing/objects/listsContactsActivities/metadata \ 
  -H 'authorization: User sAfK7LJGNz5ZHcNrvdJvLI=f03WbTbH6aRKc0HJ3oOIi, Organization 58168435e3b9959a929eb04b6218b9a2, Token yCCtl7Pqx0E4Qf6MBFXxT+/QcbogS1q1Deyw+1vSW=A3' \
  -H 'Content-Type: application/json' \

Example Response

{  
  "fields":[  
    {  
      "type":"string",
      "path":"activity[*].action",
      "vendorPath":"activity[*].action",
      "displayName":"Action Type",
      "vendorDisplayName":"Action Type",
      "vendorNativeType":"string",
      "method":[  ]
    },
    {  },
    {  },
    {  },
    {  },
    {  },
    {  }
  ]
}