SAP Cloud Platform Open Connectors

GET /accounts/.../{objectName}/definitions

GET /accounts/objects/{objectName}/definitions

GET /accounts/{id}/objects/{objectName}/definitions

Retrieve account-level fields in a specific common resource in an account. You can either retrieve a common resource that is in your account based on the credentials that you pass with the request, or you you can specify an account Id. The endpoints to retrieve common resource fields by account are:

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

Path Parameters

id
The unique identifier for an account within an organization.
Only used for GET/accounts/{id}/objects/{objectName}/definitions.
objectNameThe name of the common resource.

Response Fields

fields
An object containing the field names and data types of the common resource.
path
The name of the field.
type
The data type of the field.

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

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

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

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

Example Response

{
  "fields": [
      {
        "type": "string",
        "path": "mobile"
      },
      {
        "type": "string",
        "path": "fax"
      }
    ],
  "level": "account"
}