SAP Open Connectors

GET /accounts/.../definitions

GET /accounts/objects/definitions

GET /accounts/{id}/objects/definitions

Retrieve a list of common object and their account level fields. You can either list the fields based on the credentials that you pass with the request, or you you can specify an account Id. The endpoints to retrieve the common object fields by account are:

  • GET /accounts/objects/definitions
    • Retrieve a list of common object based on the account associated with the logged in user or the Organization and User Secret passed with the request
  • GET/accounts/{id}/objects/definitions
    • Retrieve a list of common object within an account by passing the account id with the request.

Path Parameters

Only used for GET/accounts/{id}/objects/definitions.

id
The unique identifier for an account within an organization.

Response Fields

objectName
The name of the new common object.
fields
An object containing the field names and data types of the common object.
path
The name of the field.
type
The data type of the field.
level
The level at which the mapping exists, either organization, account, or instance.

GET /accounts/objects/definitions Example Request

curl -X GET \
https://api.openconnectors.us2.ext.hana.ondemand.com/elements/api-v2/accounts/objects/definitions \ 
  -H 'authorization: User sAfK7LJGNz5ZHcNrvdJvLI=f03WbTbH6aRKc0HJ3oOIi, Organization 58168435e3b9959a929eb04b6218b9a2' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-Type: application/json' \

GET /accounts/{id}/objects/definitions Example Request

curl -X GET \
https://api.openconnectors.us2.ext.hana.ondemand.com/elements/api-v2/accounts/156162/objects/definitions\
-H 'authorization: User sAfK7LJGNz5ZHcNrvdJvLI=f03WbTbH6aRKc0HJ3oOIi, Organization 58168435e3b9959a929eb04b6218b9a2' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \

Example Response

{
    "myListContacts": {
    "fields": [
      {
        "type": "string",
        "path": "email"
      }
    ],
    "level": "organization"
  },
  "myContacts": {
    "fields": [
      {
        "type": "string",
        "path": "mobile"
      },
      {
        "type": "string",
        "path": "fax"
      }
    ],
    "level": "account"
  }
}