SAP Open Connectors

List Account-Level Transformations by Connector

GET /accounts/{id}/elements/{keyOrId}/transformations

Retrieve a list of the default account-level transformations by connector. 

Path Parameters

idThe unique identifier for an account within an organization.
keyOrIdThe connector key, usually a lowercase version of the connector name, or the connector id, which is a numeric identifier of the connector.

Response Fields

levelThe level of the specified account, either organization, account, or instance.
objectNameThe name of the new common object.
vendorNameThe APIN provider's name of the resource that is mapped to the common object.
startDateThe date that the transformation was updated.
fieldsAn object containing the field names and data types of the common object.
fields.pathThe name of the field.
fields.typeThe data type of the field.
fields.vendorPathThe API provider's field name that the path is mapped to.
fields.levelThe level at which the mapping exists, either organization, account, or instance.
configurationAn object containing the configuration of the common object.
configuration.typeThe type of configuration. passThrough is the configuration for removing unmapped fields while inherit is a legacy configuration.
isLegacyIndicates if the common object was created in SAP Open Connectors (true) or earlier (false).

Example Request

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

Example Response

{  
  "myContacts":{  
    "level":"organization",
    "objectName":"myContacts",
    "vendorName":"Contact",
    "startDate":"2018-03-07 16:50:32.223761",
    "fields":[  
      {  
        "type":"string",
        "path":"address.city",
        "vendorPath":"MailingCity",
        "level":"organization"
      },
      {  
        "type":"string",
        "path":"address.state",
        "vendorPath":"MailingState",
        "level":"organization"
      },
      {  
        "type":"string",
        "path":"address.street",
        "vendorPath":"MailingStreet",
        "level":"organization"
      },
      {  
        "type":"string",
        "path":"address.zip",
        "vendorPath":"MailingPostalCode",
        "level":"organization"
      },
      {  
        "type":"string",
        "path":"firstName",
        "vendorPath":"FirstName",
        "level":"organization"
      },
      {  
        "type":"string",
        "path":"id",
        "vendorPath":"Id",
        "level":"organization"
      },
      {  
        "type":"string",
        "path":"lastName",
        "vendorPath":"LastName",
        "level":"organization"
      },
      {  
        "type":"boolean",
        "path":"Deleted",
        "vendorPath":"IsDeleted",
        "level":"organization"
      }
    ],
    "configuration":[  
      {  
        "type":"passThrough",
        "properties":{  
          "fromVendor":false,
          "toVendor":false
        }
      },
      {  
        "type":"inherit"
      }
    ],
    "isLegacy":false
  }
}

GET /accounts/{id}/elements/{keyOrId}/transformations/{objectName}

GET /accounts/{id}/elements/{keyOrId}/transformations/{objectName}

Retrieve a list of the default account-level transformations associated with a specific common object by connector. 

Path Parameters

id
The unique identifier for an account within an organization.
keyOrId
The connector key, usually a lowercase version of the connector name, or the connector id, which is a numeric identifier of the connector.
objectName
The name of the common object.

Response Fields

level
The level of the specified account, either organization, account, or instance.
objectName
The name of the new common object.
vendorName
The APIN provider's name of the resource that is mapped to the common object.
startDate
The date that the transformation was updated.
fields
An object containing the field names and data types of the common object.
fields.path
The name of the field.
fields.type
The data type of the field.
fields.vendorPath
The API provider's field name that the path is mapped to.
fields.level
The level at which the mapping exists, either organization, account, or instance.
configuration
An object containing the configuration of the common object.
configuration.type
The type of configuration. passThrough is the configuration for removing unmapped fields while inherit is a legacy configuration.
isLegacy
Indicates if the CO was created in SAP Open Connectors (true) or earlier (false).

Example Request

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

Example Response

{  
  "myContacts":{  
    "level":"organization",
    "objectName":"myContacts",
    "vendorName":"Contact",
    "startDate":"2018-03-07 16:50:32.223761",
    "fields":[  
      {  
        "type":"string",
        "path":"address.city",
        "vendorPath":"MailingCity",
        "level":"organization"
      },
      {  
        "type":"string",
        "path":"address.state",
        "vendorPath":"MailingState",
        "level":"organization"
      },
      {  
        "type":"string",
        "path":"address.street",
        "vendorPath":"MailingStreet",
        "level":"organization"
      },
      {  
        "type":"string",
        "path":"address.zip",
        "vendorPath":"MailingPostalCode",
        "level":"organization"
      },
      {  
        "type":"string",
        "path":"firstName",
        "vendorPath":"FirstName",
        "level":"organization"
      },
      {  
        "type":"string",
        "path":"id",
        "vendorPath":"Id",
        "level":"organization"
      },
      {  
        "type":"string",
        "path":"lastName",
        "vendorPath":"LastName",
        "level":"organization"
      },
      {  
        "type":"boolean",
        "path":"Deleted",
        "vendorPath":"IsDeleted",
        "level":"organization"
      }
    ],
    "configuration":[  
      {  
        "type":"passThrough",
        "properties":{  
          "fromVendor":false,
          "toVendor":false
        }
      },
      {  
        "type":"inherit"
      }
    ],
    "isLegacy":false
  }
}

Create a Default Transformation

POST /accounts/{id}/elements/{keyOrId}/transformations/{objectName}

Create a default transformation of an connector for a specific common object. 

Note: You cannot create a field in the common object and map a default transformation with this request. The fields must already exist in the common object.

Path Parameters

id
The unique identifier for an account within an organization.
keyOrId
The connector key, usually a lowercase version of the connector name, or the connector id, which is a numeric identifier of the connector.
objectName
The name of the common object.

Request Body Parameters

level
The level of the specified account, either organization, account, or instance.
Optional
objectName
An object containing the field names and data types of the common resource.
Optional
vendorName
The API provider's name of the resource that is mapped to the common object.
Required
fields
An object containing the field names and data types of the common object.
Required
level
The level at which the mapping exists, either organization, account, or instance.
With an account-level API request, you can use only accountor instance.
Optional
fields.type
The data type of the field.
Required
fields.path
The name of the field.
Required
fields.vendorPath
The API provider's field name that the path is mapped to.
Required
fields.level
The level at which the mapping exists, either organization, account, or instance.
With an account-level API request, you can use only accountor instance.
Required
configuration
An object containing the configuration of the common object.
Optional
configuration.properties
An object containing the configuration properties of the common object.
Optional
configuration.type
The type of configuration. passThrough is the configuration for removing unmapped fields while inherit is a legacy configuration.
Optional
configuration.properties.key
Configuration properties of the transformation.
For passThrough, properties are:
"properties":{  
  "fromVendor":false,
  "toVendor":false
  }
For inherit, use only false or no value.
Optional

Example Request

curl -X POST \ 
  https://api.openconnectors.us2.ext.hana.ondemand.com/elements/api-v2/accounts/156162/elements/sfdc/transformations/myContacts3 \ 
  -H 'authorization: User sAfK7LJGNz5ZHcNrvdJvLI=f03WbTbH6aRKc0HJ3oOIi, Organization 58168435e3b9959a929eb04b6218b9a2' \
  -H 'Content-Type:application/json' \ 
  -d '{  
  "vendorName":"Contact",
  "fields":[  
    {  
      "type":"string",
      "path":"lastName",
      "vendorPath":"LastName"
    }
  ],
  "configuration":[  
    {  
      "type":"passThrough",
      "properties":{  
        "fromVendor":false,
        "toVendor":false
      }
    }
  ]
}'

Example Response

{  
  "myContacts":{  
    "level":"accout",
    "objectName":"myContacts",
    "vendorName":"Contact",
    "startDate":"2018-03-07 16:50:32.223761",
    "fields":[  
      {  
        "type":"string",
        "path":"address.city",
        "vendorPath":"MailingCity",
        "level":"organization"
      },
      {  
        "type":"string",
        "path":"address.state",
        "vendorPath":"MailingState",
        "level":"organization"
      },
      {  
        "type":"string",
        "path":"address.street",
        "vendorPath":"MailingStreet",
        "level":"organization"
      },
      {  
        "type":"string",
        "path":"address.zip",
        "vendorPath":"MailingPostalCode",
        "level":"organization"
      },
      {  
        "type":"string",
        "path":"firstName",
        "vendorPath":"FirstName",
        "level":"organization"
      },
      {  
        "type":"string",
        "path":"id",
        "vendorPath":"Id",
        "level":"organization"
      },
      {  
        "type":"string",
        "path":"lastName",
        "vendorPath":"LastName",
        "level":"account"
      },
      {  
        "type":"boolean",
        "path":"Deleted",
        "vendorPath":"IsDeleted",
        "level":"organization"
      }
    ],
    "configuration":[  
      {  
        "type":"passThrough",
        "properties":{  
          "fromVendor":false,
          "toVendor":false
        }
      },
      {  
        "type":"inherit"
      }
    ],
    "isLegacy":false
  }
}

Replace a Default Transformation

PUT /accounts/{id}/elements/{keyOrId}/transformations/{objectName}

Replace a default transformation of an connector for a specific common object. Replacing fields removes existing transformations, but not the common resources.

Path Parameters

id
The unique identifier for an account within an organization.
keyOrId
The connector key, usually a lowercase version of the connector name, or the connector id, which is a numeric identifier of the connector.
objectName
The name of the common object.

Request Body Parameters

level
The level of the specified account, either organization, account, or instance.
Optional
objectName
An object containing the field names and data types of the common resource.
Optional
vendorName
The API provider's name of the resource that is mapped to the common object.
Required
fields
An object containing the field names and data types of the common object.
Required
level
The level at which the mapping exists, either organization, account, or instance.
With an account-level API request, you can use only accountor instance.
Optional
fields.type
The data type of the field.
Required
fields.path
The name of the field.
Required
fields.vendorPath
The API provider's field name that the path is mapped to.
Required
fields.level
The level at which the mapping exists, either organization, account, or instance.
With an account-level API request, you can use only accountor instance.
Required
configuration
An object containing the configuration of the common object.
Optional
configuration.properties
An object containing the configuration properties of the common object.
Optional
configuration.type
The type of configuration. passThrough is the configuration for removing unmapped fields while inherit is a legacy configuration.
Optional
configuration.properties.key
Configuration properties of the transformation.
For passThrough, properties are:
"properties":{  
  "fromVendor":false,
  "toVendor":false
  }
For inherit, use only false or no value.
Optional

Example Request

curl -X PUT \ 
  https://api.openconnectors.us2.ext.hana.ondemand.com/elements/api-v2/accounts/156162/elements/sfdc/transformations/myContacts3 \ 
  -H 'authorization: User sAfK7LJGNz5ZHcNrvdJvLI=f03WbTbH6aRKc0HJ3oOIi, Organization 58168435e3b9959a929eb04b6218b9a2' \
  -H 'Content-Type:application/json' \ 
  -d '{  
  "vendorName":"Contact",
  "fields":[  
    {  
      "type":"string",
      "path":"salutation",
      "vendorPath":"Salutation"
    }
  ],
  "configuration":[  
    {  
      "type":"passThrough",
      "properties":{  
        "fromVendor":false,
        "toVendor":false
      }
    }
  ]
}'

Example Response

{  
  "myContacts":{  
    "level":"accout",
    "objectName":"myContacts",
    "vendorName":"Contact",
    "startDate":"2018-03-07 16:50:32.223761",
    "fields":[  
      {  
        "type":"string",
        "path":"salutation",
        "vendorPath":"Salutation",
        "level":"account"
      }
    ],
    "configuration":[  
      {  
        "type":"passThrough",
        "properties":{  
          "fromVendor":false,
          "toVendor":false
        }
      },
      {  
        "type":"inherit"
      }
    ],
    "isLegacy":false
  }
}

Delete All Account Transformations for a Specific Connector

DELETE /accounts/{id}/elements/{keyOrId}/transformations

Delete all account-level transformations for a specific connector. 

Path Parameters

id
The unique identifier for an account within an organization.
keyOrId
The connector key, usually a lowercase version of the connector name, or the connector id, which is a numeric identifier of the connector.

Example Request


curl -X DELETE \
  https://api.openconnectors.us2.ext.hana.ondemand.com/elements/api-v2/accounts/{id}/elements/{keyOrId}/transformations \
  -H 'authorization: User sAfK7LJGNz5ZHcNrvdJvLI=f03WbTbH6aRKc0HJ3oOIi, Organization 58168435e3b9959a929eb04b6218b9a2' \
  -H 'content-type: application/json' \

Example Response

A response with a 200 Status Code indicates success. You can confirm that you deleted the transformations with GET accounts/{id}/elements/{keyOrId}/transformations.

Delete Account Transformations for an Account Resource

DELETE /accounts/{id}/elements/{keyOrId}/transformations/{objectName}

Delete account-level transformations for a specific common object and specific connector. 

Path Parameters

id
The unique identifier for an account within an organization.
keyOrId
The connector key, usually a lowercase version of the connector name, or the connector id, which is a numeric identifier of the connector.
objectNameThe name of the common object.

Example Request

curl -X DELETE \
  https://api.openconnectors.us2.ext.hana.ondemand.com/elements/api-v2/accounts/156162/elements/sfdc/transformations/myContacts \
  -H 'authorization: User sAfK7LJGNz5ZHcNrvdJvLI=f03WbTbH6aRKc0HJ3oOIi, Organization 58168435e3b9959a929eb04b6218b9a2' \
  -H 'content-type: application/json' \

Example Response

A response with a 200 Status Code indicates success. You can confirm that you deleted the transformations with GET accounts/{id}/elements/{keyOrId}/transformations.