Skip to main content

Celonis Product Documentation

Connector Details asynchronous API's

Connector Details asynchronous API's

General Information

The affected asynchronous API’s of SAP Ariba are the endpoints for Procurement, Sourcing and Analytical Reporting. Each API Group has multiple endpoints of which these three are used to extract data:

  • View Management API

  • Job Submission API

  • Job Results API

View Management API

The SAP Ariba API allows you to work with reporting view templates, which are used to specify filters and fields that determine what data will be returned in response to an API request.

A reporting view template specifies the type of records to report on, the reporting fields to be included in the API response, and selection filters to select relevant records for inclusion.

This API lets you:

  • Create a reporting view templates

  • View metadata for a specific view template

  • List all reporting view templates

  • Update an existing reporting view template (view template name, view template status, select attributes and filter criteria)

API Limits for the View Management API

  • Per second: 1 request

  • Per minute: 10 requests

  • Per hour: 100 requests

  • Per day: 500 requests

Job Submission API

The SAP Ariba APIs enables you to report on the transactional data that you need to make operational decisions on.

You use the API to create a client application that extracts reportable data. The client application posts a reporting job to the jobs queue specifying a reporting view template.

API Limits for the Job Submission API

  • Per second: 1 request

  • Per minute: 2 requests

  • Per hour: 8 requests

  • Per day: 40 requests

Job Results API

This set of APIs enables an API client to query the status of a submitted job and to download the result files that are generated when the job completes successfully.

When the job is complete, the output is batched into ZIP files containing 1000 records per file. The client application requests one file at a time.

For the job results API the maximum number of records returned is 10,000 (50,000 for Analytical API), or 10 files containing 1,000 (5,000) records per file. Files created in response to an asynchronous API query expire after 48 hours.

API Limits for Job Results API

  • Per second: 2 requests

  • Per minute: 20 requests

  • Per hour: 200 requests

  • Per day: 1000 requests

Implementation and Request Structure

Ariba has a special implementation compared to other cloud connectors as it is based on the concept of view templates. To extract all custom fields, we create a separate view template per table.

Exemplarily for creating a view template for the CopyOrder table as part of the procurement process:

To authorize for the API access, a post request is sent to get the OAuth Access-Token that is used to authorize for all upcoming requests.

OAuth Authorization

Post:   https://api.ariba.com/v2/oauth/token

HEADERS: 
        ClientID
    ClientSecret          

We make a metadata call to get all the fields of this table

Exemplary Metadata Call

Get: https://openapi.ariba.com/api/procurement-reporting-view/v2/prod/metadata?product=buyer&documentType=CopyOrder&realm=xyz&includeCustomFields=true

HEADERS: 
        Authorization   Bearer xyz 
    Apikey          xyz  

Afterwards we create our custom view template by including all the fields returned by metadata request

Exemplary Custom View Template

Post: https://openapi.ariba.com/api/procurement-reporting-view/v2/prod/viewTemplates/CopyOrder_VIEW?realm=XYZ

HEADERS: 
        Authorization   Bearer xyz 
    Apikey          xyz  
    Content-Type        application/json 

Once a user starts an extraction, we rely on the timeFilters provided in the table extraction configuration. If the extraction is in full mode then we rely on the createDateotherwise if the extraction is in delta mode we rely on the updateDate.

Based on the filters that a user has provided, we chunk the extraction by month and submit jobs. Each job has an ID as identifier.

Exemplary Chunked Job Submission

Post:   https://openapi.ariba.com/api/procurement-reporting-job/v2/prod/jobs?includeInactive=true&realm=xyz

HEADERS: 
        Authorization   Bearer xyz 
    Apikey          xyz  
    Content-Type        application/json 

BODY:
{"viewTemplateName":"Invoice_CELONIS_VIEW_V2","filters":{"createdDateFrom":"2019-02-01T00:00:00Z","createdDateTo":"2019-03-01T00:00:00Z"}}

After we have submitted the jobs, they need some time to be processed so a job status check is made every 5 minutes until the job status is:completed, completedZeroRecords or expired.

Exemplary Job Status Check

Get:    https://openapi.ariba.com/api/procurement-reporting-jobresult/v2/prod/jobs/{jobId}?realm=xyz 

HEADERS:
        Authorization   Bearer xyz 
    Apikey                      xyz   
    Content-Type        application/json

If the status of the job iscompletedthis means that data is ready to be downloaded. Therefore another call is made to download the result.

Exemplary Download Call

Get:   https://openapi.ariba.com/api/procurement-reporting-jobresult/v2/prod/jobs/88fe53b0-848e-48d8-99d4-31758a5e42b91574699039445/files/Fk3enaqz1.zip?includeInactive=true&realm=xyz 

HEADERS:
     Authorization   Bearer xyz
     Apikey              xyz 
     Content-Type    application/json

After we have downloaded the data we continue processing it to the Data Integration.