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 VDR, or Cloud Elements library)
  • Find metadata, including custom fields, related to an object
  • Retrieve the Open API specifications (API docs) of an object


List Element Objects

GET /hubs/{hubName}/objects

Retrieve a list of all data objects in an element.

List Element Objects Path Parameters

hubNameThe name of hub that the element is in.

List Element Objects Header Parameters

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

 

List Element Objects Response Fields

The response is a JSON list of objects.

List Element Objects Example Request

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

List Element Objects Example Response

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

List Element Objects and their Sources

GET hubs/{hubName}/objects (v2)

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

List Element Objects and their Sources Path Parameters

hubNameThe name of hub that the element is in.

List Element Objects and their Sources Header Parameters

Required: 

  • Authorization including User Secret, Organization Secret, and Element 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.

 

List Element Objects and their Sources Response Parameters

  • name The name of the element object. 
  • vendorName The name specified within the API provider's system. 
  • type Specifies whether the object is a VDR created in Cloud Elements, a normalized Cloud Elements object (ceCanonical), or an object that exists at the API provider (vendor).

List Element Objects and their Sources Example Request

curl -X GET \
https://api.cloud-elements.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' \

List Element Objects and their Sources 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 element object. The returned specifications are in the Version 2.0 OpenAPI Specification format.

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

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

Retrieve the Open API Specifications (API docs) for an 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

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

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

 

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

The response is a Version 2.0 OpenAPI Specification.

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

curl -X GET \
  https://api.cloud-elements.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' \

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

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


Retrieve an Element 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.

Retrieve an Element Object's Metadata Path Parameters

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

Retrieve an Element Object's Metadata Header Parameters

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

 

Retrieve an Element Object's Metadata Response Fields

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

Retrieve an Element Object's Metadata Example Request

curl -X GET \
  https://api.cloud-elements.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' \

Retrieve an Element Object's Metadata Example Response

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