api/v1/dataexport
The Data Export Service is an open API that allows you to retrieve data from SAP Analytics Cloud.
This service offers a PULL based API data extraction API that helps with data integration from SAP Analytics Cloud to target systems including SAP Datasphere, SAP BW/4 HANA, SAP S/4 HANA Cloud, SAP SuccessFactors and other third-party tools. The API doesn't have a dedicated user-interface, and simply extracts data and information about providers. A provider corresponds to a planning model within a particular SAP Analytics Cloud system.
The API is comprised of two services: the Administration service and the Provider service. The first extracts list of models or currency tables on your SAP Analytics Cloud system, and the second one retrieves information about a specific planning model or currency tables. The API supports all standard OData parameters, as well as custom parameters.
Both services offer multiple endpoints to extract both metadata and underlying data. With the Data Export Service API, you can decide whether you would like to export all data of a given planning model, or track changes and export delta data only using the delta functionality.
Prerequisites
-
You must have a SAP Analytics Cloud tenant URL.
-
You must have a SAP Analytics Cloud user.
-
You must have an SAP Analytics Cloud for business intelligence, predictive edition, SAP Analytics Cloud for planning, predictive standard edition or SAP Analytics Cloud for planning, predictive professional edition license.
-
The Restricted Export option is disabled in the model preferences. If the Restricted Export option is enabled, the Data Export Service cannot export data. For more information, see Access and Privacy.
-
You must configure OAuth to work with your application. The Data Export Service supports two OAuth authentication flows:
-
2-Legged (Technical Connections): provides unrestricted access to all fact and master data, ideal for technical integrations.
-
3-Legged (Business User Connections): requires users to have access to the model via the Read privileges at the role level. For business user connections, DAC filters are applied with the exception being users who have a role with Full Data Access to a model, for example the admin role.
-
-
You must set up your OAuth Client to work with the Data Export Service. For more information, see Setting Up the OAuth Client for the Data Export Service.
Data Export Service Cloud Data Integration
The Data Export Service is a Cloud Data Integration (CDI) service, ensuring it can easily be integrated with any existing SAP solution which provides a CDI connector
As a CDI service, it provides an Administration service and a Providers service. The Administration service exposes a catalog of all available data providers, whereas the Providers service can expose both the data and metadata of each provider.
Simply put, the Administration service allows users to view and list SAP Analytics Cloud systems (Namespaces) as well as the models available on each system (Providers). The Providers service allows users to view and extract the underlying data for each provider.
A Namespace corresponds with an SAP Analytics Cloud system.
A Provider corresponds to a model or currency table available on an SAP Analytics Cloud system.
Delta Functionality
The delta functionality allows you to extract any data changes such as insertions, deletions and updates, in a planning model. These data changes are also referred to as delta.
This simplifies and reduces the time of your export operations as it avoids full data extraction to retrieve the latest data from the planning model. If you store planning, analytics or forecasting data in an external system for example, there’s no longer need to truncate the table and run a full export. Instead, export the delta and adjust the target table performing upsert and/or delete based on the delta. The delta functionality is supported on both a native SAP Analytics Cloud model, and on an SAP Analytics Cloud model that is stored in an SAP Datasphere space in the context of seamless planning.
The delta functionality works along with a subscription concept, introduced by the Cloud Data Integration specification (CDI). You will need to create a subscription on the model you want to extract the delta from. By creating a subscription, you can retrieve the differences in data over a specified period. These subscriptions track the changes made to a particular model, over a specified time period.
Before sending any data manipulation requests on the Data Export Service, a valid CSRF token is required. For more information on how to get a valid CSRF token, see Get a Valid CSRF Token.
Subscriptions
Subscribing to a model allows you to track data changes.
The tracking starts as soon as you create a subscription to a model and ends when you run a delta export. Within that time frame, every data change is monitored. These points are considered as the start and end dates of your subscription, and the delta is always limited to that specific time window. The start time corresponds to the time when you created the subscription, and the end time is the time when you run the delta export. To extract the delta, you'll need a delta link, which is generated when you create the subscription. Once you get that link, you can extract the delta at any given time.
A subscription can be accessed via a delta link and will also return a delta link to the next subscription when accessed. The delta link points to data that belongs to a specific time frame. When the responses are paginated, each results page contains next and previous page links, except for the last page of the request. When you request the last page, a new delta link is generated and stored in a new subscription that references the old link, creating a subscription chain.
-
FactData: Subscriptions will contain the updated FactData records.
-
FactDataDifference: Subscriptions will contain the difference between the old and new records.
-
FactDataAggregation: Subscriptions will contain the difference between the old and new aggregated records.
You can create subscriptions either via FactData GET request, or a POST request. A new subscription is automatically created when you run the delta export, and starts tracking data changes performed after the previous export.
|
Property Name |
Description |
Remarks |
Supported In Post Request |
|---|---|---|---|
|
NamespaceID |
Technical ID of the namespace |
Key |
Yes |
|
ProviderID |
Technical ID of the provider |
Key |
Yes |
|
SubscriptionID |
Technical ID of the subscription (created by the server) |
Key |
|
|
EntitySetName |
Technical name of the entity set in the provider service |
Optional |
Yes |
|
ExternalID |
Explicitly defined ID (provided by the client via POST request) |
Optional, should be unique per NamespaceID, ProviderID and EntitySetName |
Yes |
|
CurrentDeltaLink |
Current Delta Link |
N/A |
N/A |
|
PreviousSubscriptionID |
The technical ID for the previous subscription in the same chain |
N/A |
N/A |
|
Filter |
Filter statement in OData $filter format |
Optional |
Yes |
|
Selection |
Select statement in OData $select format |
Optional |
Yes |
|
Description |
Description of the subscription |
Optional |
Yes |
|
CreatedBy |
User who created the subscription |
N/A |
N/A |
|
DataAcquisitionUser |
User who created the subscription chain |
N/A |
N/Aa |
|
LastAccessed |
Timestamp of the last extraction |
N/A |
N/A |
|
ChainID |
Technical ID for the chain of same subscriptions |
N/A |
N/A |
|
StartTime |
Time the subscription initially runs |
N/A |
N/A |
|
EndTime |
Time the subscription is extracted, null if not yet extracted |
N/A |
N/A |
|
Timezone |
Timezone the subscription is run, example "UTC" |
N/A |
N/A |
|
EntityCount |
Number of entities in the extraction, -1 if not yet extracted |
N/A |
N/A |
Creating Subscriptions
You can create a subscription for a given model by including the Prefer OData header set to odata.track-changes in a FactData or FactDataAggregation request. By doing so, you inform the service that you want to track changes for this model.
If the response is large, you can navigate to the last page of the response using @odata.nextLink, where you'll find the delta link: @odata.deltaLink. If the response is small, the delta link is directly included in the response. This delta link points to a subscription that has been created for the underlying model.
If you get a paginated response as mentioned above, or if you explicitly specify a page size, make sure to include the Prefer: odata.track-changes header in each @odata.nextLink request.
-
$select: Specifies columns to select. For example, $select=MyColumn1,MyColumn2
-
$filter: Filters the result set according to the filter string. For example: MyColumn1 eq myColumn1.
You can also create a subscription via a POST request. The post request allows you to specify an ExternalID that can be used to reference a subscription chain, add a description about what the subscription is tracking, or to filter or perform selections on the results.
-
FactData or FactDataDifference: All dimensions must be selected, they are mandatory. Measures are optional.
-
FactDataAggregation: At least one dimension column must be selected, which can be any dimension in the model.
Initial Load Window – FactDataAggregation and FactDataDifference Subscriptions
For FactDataAggregation and FactDataDifference subscriptions, calculations are paused during the extraction of the first subscription in a chain (called “initial load”). Pausing calculations ensures data consistency during long-running, paginated extractions. This means that during an initial load, there is a delay in replicating delta data to your target systems. Once the initial load is complete, calculations resume as usual.
For more information, see the API Endpoints and Parameters section below.
Accessing a Delta Via Delta Links
Once you’ve created a subscription, you get access to a delta link so you can retrieve the delta data: {{BASE_URL}}/providers/sac/{{SAC_MODEL_ID}}/FactData?deltaid={{SUBSCRIPTION_ID}}
The response is a json object containing all the update, insert and delete operations performed on a given model in the OData delta format. You’ll also find either a @odata.nextLink or @odata.deltaLink so you can jump to the next delta data page, or access the new delta link.
When you reach the last page of the delta data, the Data Export Service generates a new delta link and appends it to the end of the subscription chain via the @odata.deltaLink value.
Within a subscription, you'll notice a number or records or entities. The Number of Entities, or Number of Records, is the number of records that are contained within a subscription, or the number of changes that have happened to the model between the start time and end time.
Subscription Chains
The subscription chain starts when you create a subscription, either via a POST or GET request. Although there’s only one subscription at the beginning, the chain gets populated automatically by the service with new subscriptions each time you access a delta link, as more delta data gets available. You can think of it as a history of the data changes.
Each time a new subscription is appended to the chain, it maintains the same ChainID as all other subscriptions in that chain, as well as a link to the previous subscription in the chain, corresponding to the PreviousSubscriptionID. The EndTime of the previous subscription is populated with the time of creation of the new subscription in the chain. This way, each subscription in the chain can provide the changes that occurred in the model within the StartTime and EndTime of the subscription. There can be multiple subscription chains on the same model and entity set and they're independent from each other.
If needed, you can create subscriptions with an ExternalID, which corresponds to a reference to a subscription chain, and always points to the last subscription in the chain. If you specify the ExternalID when creating the subscription via a POST request, you can then access the deltas via the ExternalID, rather than via the delta link.
Fact Data Difference
You can create delta difference subscriptions. A delta difference subscription allows you to track the difference between an old and a new measure. For example, if this row:
|
Version |
Date |
Account |
Cost |
|---|---|---|---|
|
Public.Actual |
202401 |
Account1 |
100 |
Was updated to:
|
Version |
Date |
Account |
Cost |
|---|---|---|---|
|
Public.Actual |
202401 |
Account1 |
250 |
Then the measure value in the delta response would be 150.
These subscriptions can be created via GET and POST requests, by specifying the EntitySetName property to FactDataDifference where required.
Fact Data Aggregation
You can create fact data aggregation subscriptions that contain the aggregation of the differences of the measure values. For example, let's say we have the following three records in a model:
|
Version |
Date |
Account |
Product |
Cost |
|---|---|---|---|---|
|
Public.Actual |
202401 |
Account1 |
Product1 |
100 |
|
Public.Actual |
202401 |
Account1 |
Product2 |
100 |
|
Public.Actual |
202401 |
Account1 |
Product3 |
100 |
If we create a subscription selecting the Date, Account and Cost, we get the following record:
|
Date |
Account |
Cost |
|---|---|---|
|
202401 |
Account1 |
300 |
Now, if we change the data in the model to be the following:
|
Version |
Date |
Account |
Product |
Cost |
|---|---|---|---|---|
|
Public.Actual |
202401 |
Account1 |
Product1 |
50 |
|
Public.Actual |
202401 |
Account1 |
Product2 |
100 |
|
Public.Actual |
202401 |
Account1 |
Product4 |
300 |
-
Reduce the Cost of Product1 by 50
-
Leave Product2 unchanged
-
Delete Product3
-
Insert Product4 with a Cost of 300
|
Date |
Account |
Cost |
|---|---|---|
|
202401 |
Account1 |
150 |
-
Product1: New Value (50) - Old Value (100) = -50
-
Product2: New Value (100) - Old Value (100) = 0
-
Product3: New Value (0 as row is deleted) - Old Value (100) = -100
-
Product4: New value (300) - Old Value (0, as it did not exist) = +300
Clean Up Policy
The Data Export Service automatically deletes subscriptions that haven’t been extracted for the past 40 days according to the LastAccessed property, as per the retention policy. This happens automatically to clean up the system regularly. Deleted subscriptions are no longer accessible.
The deletion is performed on a single subscription only and doesn’t affect new subscriptions in the same chain or for the same provider. The retention policy is always on, and you don’t need to active it. The API runs delete operations every day automatically.
You can also decide to delete subscriptions manually following the endpoints mentioned above. This doesn’t affect the Data Export API retention policy. To prevent subscriptions from being deleted, make sure that to extract subscriptions regularly. This automatically updates the LastAccessed time property and postpones the deletion.
Retention Policy
In some edge cases, users of the delta functionality may experience a drop in performance in models with very frequent activity.
Every change on a model with delta functionality enabled is represented as a row in the delta table. Under normal circumstances, the Data Export API cleans up this table incrementally, by deleting data that is older than the oldest subscription on the model.
However, a retention policy applies to models where the activity is very frequent, acting as a safety net. This retention policy deletes the oldest 25% of records, which prevents the model from reaching the 2 billion row limit on HANA Tables.
In such cases, and because the retention policy can take some time to complete, users may see a delay to their delta extractions across all models on their tenant. Delta extractions on other models may also be affected since tenants can only run one data export delta calculation at a time.
Model Security
The Data Export API can be used to extract fact and master data via the corresponding /FactData and /MasterData entity sets.
Based on the authentication type that is used to access the API, the Data Access Control (DAC) filters may restrict certain rows and dimension members that can be extracted.
DAC Filters are dimension level settings which allow modelers to restrict data access to individual values in the model to specific users. When DAC is enabled for a dimension, two new Read and Write columns are added to the dimension table so that the settings can be applied for each individual row, allowing the model owner or admin user to set what user or role can read or write to the specific dimension member.
DAC filters are not implemented for accessing master data. With read privileges for the model, a user can view the members within the model's dimensions, the filters are applied when extracting model fact data.
Authentication Types and Access
-
2-Legged (Technical Connections): provides unrestricted access to all fact and master data, ideal for technical integrations.
-
3-Legged (Business User Connections): requires users to have access to the model via the Read privileges at the role level. For business user connections, DAC filters are applied with the exception being users who have a role with Full Data Access to a model, for example the Admin role.
Data Access Control (DAC) Filters
Once DAC filters are applied to a dimension member row, they affect any 3-Legged data extraction for the model. Let’s take an example of how DAC which is set at the dimension level limits what members a user can export at the model level.
Example
Let's say we have the following dimension table for our model called Product. The dimension is DAC enabled, and it has the Read and Write columns mentioned previously. In this scenario we have limited the Read/Write access to the member BS100 to user Tom and we have given similar access to the member AC200 to the user Jane.
|
ID |
Description |
Read |
Write |
|---|---|---|---|
|
BS100 |
Tyre |
Tom |
Tom |
|
AC200 |
Frame |
Jane |
Jane |
Let's say that Product is a local dimension within a mode. The data foundation for this model looks like the following.
|
Date |
Product |
Product |
Version |
|---|---|---|---|
|
202501 |
BS100 |
22.50 |
public.Actual |
|
202501 |
AC200 |
125.00 |
public.Actual |
{
"@odata.context":"$metadata#FactData",
"value": [
{
"Product": "AC200",
"Version": "public.Actual",
"Price": 125.00,
"Date": "202501",
}
]
}
Due to the DAC filter for the member BS100, Jane is not allowed to read/export the fact data for this member, and it is excluded from the result set of the response. A similar result is also observed when extracting master data.
{
"@odata.context": "$metadata#MasterData",
"value": [
{
"Product____ID": "AC200",
"Version____ID": "public.Actual",
"Price": 125.00,
"Date____CALMONTH": "202501",
.................
}
]
}
Data Locking
Data Locking works in a similar fashion to DAC Filters in which it is a dimension level setting, and it restricts the change of certain data during the planning process. Data locking does not affect or prevent the export of fact or master data via the Data Export API.
{
"@odata.context": "$metadata#ProductMaster",
"value": [
{
"ID": "AC200",
"Description": 125.00,
"dataLockingOwner": "Jane”,
}
]
}
Validation Rules
Model validation rules prevent improper data entry to specific member combinations during the planning process. Validation rules are an SAP Analytics Cloud specific feature which enforces restrictions on the planning table at the story level. Data Export API is not affected by validation rules.
Public Dimension Security
The Data Export API can be used to extract public dimension member data, exposed via the entity set name PublicDimensionData or {{dimensionID}}MasterWithHierarchy.
Authentication Types and Access
-
2-Legged (Technical Connections): provides unrestricted access to dimension data, ideal for technical integrations.
-
3-Legged (Business User Connections): requires the user to have Read privileges on the public dimension. These privileges can be assigned at the role level, offering granular control over who can access specific dimension data. Business users are able to extract all dimension members once they have the necessary privilege.
{
"@odata.context": "metadata#PublicDimensionData",
"value": [
{
"ID": "BS100",
"Description": "Total Assets",
"customPropertyOne": "AST",
"customPropertyTwo": "GXS",
"Language": "EN",
}
]
}
Data Access Control (DAC) Filters
The extraction of DAC filter values (Read and Write columns, manually configured within the modeler) is not supported by the Data Export Service since it is an information only relevant for the SAP Analytics Cloud system.
Inheritance of DAC Values
When a public dimension is added to a model, the model automatically adopts the DAC values set for the dimension members. These filters play a critical role in controlling access to fact data and master data within models via 3-Legged (Business user) connections.
Application of DAC Filters
DAC filters live inside of the dimension table, but the filters are applied specifically to the /FactData and /MasterData associated with dimension members in each model. They regulate who can read or write the data associated with each dimension member.
Example
Let’s look at an example of how DAC, which is set at the dimension level, limits what a user can read from the model level. Consider a public dimension table with specific read/write permissions as follows:
|
ID |
Description |
Read |
Write |
|---|---|---|---|
|
BS100 |
Total Assets |
Tom |
Tom |
|
AC200 |
Liabilities |
Jane |
Jane |
In this instance, if this public dimension is incorporated into a model, Tom is only be able to retrieve fact data or master data associated with the dimension member BS100 from the model, due to DAC filter settings. Similarly, Jane only has access to fact data or master data corresponding to member AC200.
Data Locking
Data locking is a dimension level setting which can restrict the change of model fact data during a certain period of the planning process. Data locks are enabled in the model preferences. When data locking is also enabled for a given dimension, the dimension table generates a new Data Locking Owner column.
|
ID |
Description |
Data Locking Owner |
|---|---|---|
|
BS100 |
Total Assets |
Tom |
|
AC200 |
Liabilities |
Jane |
{
"@odata.context": "metadata#PublicDimensionData",
"value": [
{
"ID": "BS100",
"Description": "Total Assets",
"DataLockingOwner": "Tom",
},
{
"ID": "AC200",
"Description": "Liabilities",
"DataLockingOwner": "Jane",
},
] }
API Endpoints and Parameters
The Data Export Service API offers multiple endpoints through its two services.
Administration Service Requests
|
Endpoint |
Description |
|---|---|
|
Returns an .edmx document containing metatadata. |
|
|
Gets a list of namespaces. |
|
|
Gets information about a specific namespace. |
|
|
Gets a list of providers available on the specified namespace. |
|
|
Creates a new subscription. |
|
|
Lists all subscriptions |
|
|
Deletes a given subscription. |
|
|
Deletes a subscription chain. |
|
|
Deletes all subscriptions per EntitySetName, ProviderID and NamespaceID. |
|
|
Deletes all subscriptions per ProviderID and NamespaceID. |
|
|
Returns a single subscription by specifying the NamespaceID, ProviderID and SubscriptionID. |
|
|
/administration/Providers(NamespaceID='{namespaceID}',ProviderID='{providerID}')/Subscriptions |
Returns a subscription given a namespaceID and providerID. |
Provider Service Requests
|
Endpoint |
Description |
|---|---|
|
Gets the metadata object for the specified provider. |
|
|
Gets the service document specifying the entity set names for the provider. |
|
|
Gets the data from the currency table for the specified provider. |
|
|
Limits the output of the currency table endpoint. |
|
|
Gets the fact data for the provider. Also creates a new subscription if odata.track-changes header tag is included. |
|
|
Gets the master data for the provider. |
|
|
Gets the audit data for the provider. |
|
|
Gets a list of dimension master data endpoints. |
|
|
/providers/{NamespaceID}/{ProviderID}/{DimensionName}MasterWithHierarchy |
Gets a list of dimension master data with hierarchy endpoints. |
|
/providers/{namespaceID}/{providerID}/FactData?deltaid={subscriptionID} |
Gets the delta data for a given subscriptionID. |
|
/providers/{namespaceID}/{providerID}/FactData?externalid={externalID} |
Gets the delta for a subscription given an externalID. |
|
/providers/sac_unit_conversion/StandardUnitConversion/ConversionRates |
Gets the from the unit conversion table for the specified provider. |
|
Gets the data from the conversion rates data for the specified provider. |
|
|
Gets the data from the unit description data for the specified provider. |
Additional Information
|
Endpoint |
Description |
|---|---|
|
Export responses to CSV. |
|
|
Additional supported parameters that you can use to filter out results. |
|
|
How to navigate pagination of results. |
|
|
A list or error codes and how to troubleshoot them. |
API Restrictions
-
The Data Export Service doesn't support live models. Only acquired models and seamless planning are supported.
-
The Data Export Service API doesn't expose data in live external versions.
If a model contains only one version which is external (i.e. uses a live data connection to Google BigQuery or SAP Datasphere), attempting to extract data or metadata will result in an error response.
If you have a model with both external and local versions, only the local SAP Analytics Cloud data will be returned in the Data Export API response
-
You can have a maximum of 500 subscriptions per model by default. Exceeding this will delete the oldest subscription and any data associated with it.
-
You can have a maximum of 10,000 subscriptions per tenant by default. Attempting to exceed this will result in an error and no new subscription being created. You will therefore need to delete subscriptions, or you will not be able to create any.
-
Delta functionality does not support structural changes to a model, such as adding or removing a dimension or measure to a model, or data audit activation/de-activation on a model. In this case all subscriptions for a model will be dropped.
Best Practices
Querying Delta
As a best practice, because all deltas have a unique ID associated to them, we recommend getting a delta using SubscriptionID. Getting a delta via ExternalID might lead to inconsistencies when multiple users try to access the data, as the ExternalID doesn't change and always points to the last subscription not extracted. This means that the ExternalID may point to unexpected subscriptions, as users access the deltas.
For example, users may be accessing deltas daily using an ExternalID. If user A extracts the delta for the subscription for Monday, the ExternalID will then point to the next subscription, in this case the subscription for Tuesday. The next day, user B performs the extraction for Tuesday while user A is out of office. This means the ExternalID once again points to the next subscription, the subscription for Wednesday. If user A returns and is unaware of this, he/she would expect the ExternalID to still point to the subscription for Tuesday and perform an extraction with that expectation. This is however not the case when using SubscriptionIDs.
Transporting Models
-
Delete any existing subscriptions on target tenant.
-
Run model changes either via import or direct changes in the model.
-
Create a new subscription on the model.
-
Reset the subscription on the target system (e.g SAP BW remote subscription).