Data Export API_ A tour of the API - SAP Community
Data Export API_ A tour of the API - SAP Community
m
m
Products and Technology Groups Partners Topics Events What's New Get Started
u
ni
t
y
SAP Community Products and Technology Technology Technology Blogs by SAP
Data Export API: A tour of the API
david_stocker
Product and Topic Expert
2023 Jan 11 1:19 PM
10 Kudos 10,767
SAP Managed Tags: SAP Analytics Cloud, SAP Analytics Cloud for planning,
SAP Analytics Cloud, data modeling
This is part of a series on exploring the SAP Analytics Cloud (SAC) data export API.
When the series is complete, it will also be available as a single tutorial mission.
We’ve configured our SAP Analytics Cloud (SAC) tenant to accommodate an application.
Now we’ll assume the mantle of that app and explore the export API. I’ll assume that you
have an API tester and know how to use it. You can use any that you wish, but I’ll be
using Postman for the examples. The process of getting data out of a model involves – at
a minimum - the following steps:
https://community.sap.com/t5/technology-blogs-by-sap/data-export-api-a-tour-of-the-api/ba-p/13567104 1/17
1/7/25, 12:04 PM Data Export API: A tour of the API - SAP Community
4. Fetch the audit, master, and fact data for that model, as desired
Authorization Token
Recall from when you configured your OAuth client in the App Integration tab of tenant
administration, that there was some information that you’d need to use later. Specifically,
you’ll need:
https://community.sap.com/t5/technology-blogs-by-sap/data-export-api-a-tour-of-the-api/ba-p/13567104 2/17
1/7/25, 12:04 PM Data Export API: A tour of the API - SAP Community
In Postman, several REST URL calls are grouped together into a collection and this
collection shares an authorization token. If you look in the authorization tab of your
collection, you can enter this information via copy + paste. For more information on
managing authorization tokens in Postman, you can look in the SAP Help Portal for an
OAuth example and in the Postman Learning Center for more comprehensive
documentation.
https://community.sap.com/t5/technology-blogs-by-sap/data-export-api-a-tour-of-the-api/ba-p/13567104 3/17
1/7/25, 12:04 PM Data Export API: A tour of the API - SAP Community
All of the URLs in the SAC data export API follow a similar pattern of baseURL + service
endpoint. The baseURL is built up as:
https://community.sap.com/t5/technology-blogs-by-sap/data-export-api-a-tour-of-the-api/ba-p/13567104 4/17
1/7/25, 12:04 PM Data Export API: A tour of the API - SAP Community
1 https://<tenantName>.<dataCenter>.sapanalytics.cloud/api/v1/datae
So if you know your tenant name and which data center your tenant is on, it is easy to
construct. For individual services, you’ll append the URL "service endpoint" fragment for
the individual service.
All service URL endpoints use GET, not POST. In practice, this means that you’ll be
building up any parametrization in the URL string itself, instead of a json body.
/administration/Namespaces
/administration/Namespaces(NamespaceID='sac')
/administration/$metadata
/administration/Namespaces(NamespaceID='sac')/Providers
Neither of the first two endpoints returns much of any importance and are there for
OData compliance. There is a single namespace (‘sac’) in the export API, so both return
the same thing; the name and description of this one namespace, in json format.
1 https://<tenant>.<datacenter>.sapanalytics.cloud/api/v1/dataexpor
returns
https://community.sap.com/t5/technology-blogs-by-sap/data-export-api-a-tour-of-the-api/ba-p/13567104 5/17
1/7/25, 12:04 PM Data Export API: A tour of the API - SAP Community
1 {
2 "@odata.context": "https://<tenant>.<datacenter>.sapanalytics
3 "value": [
4 {
5 "NamespaceID": "sac",
6 "Description": "SAC Namespace"
7 }
8 ]
9 }
/administration/$metadata - this endpoint returns the schema definition of the API itself,
in XML format; aka the API's OData EDMX. If you want to view it in an OpenAPI tool,
such as Swagger, you can convert it. We are not going to use it, but it is available as a
machine-readable API definition.
https://community.sap.com/t5/technology-blogs-by-sap/data-export-api-a-tour-of-the-api/ba-p/13567104 6/17
1/7/25, 12:04 PM Data Export API: A tour of the API - SAP Community
1 https://<tenant>.datacenter>.sapanalytics.cloud/api/v1/dataexport
https://community.sap.com/t5/technology-blogs-by-sap/data-export-api-a-tour-of-the-api/ba-p/13567104 7/17
1/7/25, 12:04 PM Data Export API: A tour of the API - SAP Community
There are two service URL endpoints, which return our model metadata
/providers/sac/<ProviderID>/
/providers/sac/<ProviderID>/$metadata
E.g. the URL for the Best Run Juice’s OData service document looks like:
1 https://<tenant>.datacenter>.sapanalytics.cloud/api/v1/dataexport
https://community.sap.com/t5/technology-blogs-by-sap/data-export-api-a-tour-of-the-api/ba-p/13567104 8/17
1/7/25, 12:04 PM Data Export API: A tour of the API - SAP Community
1 {
2 "@odata.context": "$metadata",
3 "value": [
4 {
5 "name": "FactData",
6 "url": "FactData"
7 },
8 {
9 "name": "MasterData",
10 "url": "MasterData"
11 },
12 {
13 "name": "AuditData",
14 "url": "AuditData"
15 },
16 {
17 "name": "Account_BestRunJ_soldMaster",
18 "url": "Account_BestRunJ_soldMaster"
19 },
20 {
21 "name": "Store_3z2g5g06m4Master",
22 "url": "Store_3z2g5g06m4Master"
23 },
24 {
25 "name": "Location_4nm2e04531Master",
26 "url": "Location_4nm2e04531Master"
27 },
28 {
29 "name": "Product_3e315003anMaster",
30 "url": "Product_3e315003anMaster"
31 },
32 {
33 "name": "Sales_Manager__5w3m5d06b5Master",
34 "url": "Sales_Manager__5w3m5d06b5Master"
35 },
36 {
37 "name": "Date_703i1904sdMaster",
38 "url": "Date_703i1904sdMaster"
39 },
40 {
https://community.sap.com/t5/technology-blogs-by-sap/data-export-api-a-tour-of-the-api/ba-p/13567104 9/17
1/7/25, 12:04 PM Data Export API: A tour of the API - SAP Community
41 "name": "Version_BestRunJsold_VMaster",
42 "url": "Version_BestRunJsold_VMaster"
43 }
44 ]
45 }
Generally, these provider specific endpoints all return their full (audit, dimension master
or fact) dataset by default. So the fact table endpoint would return the entire fact table,
dimension master data endpoints would return all master data values, etc. These
endpoints all support the typical OData parameters, such as $select, $filter, $orderby,
$pagesize and $skip, allowing you to shape the returned data json to your needs.
1 https://<tenant>.datacenter>sapanalytics.cloud/api/v1/dataexport/
It still returns a valid json response, but you can see that the audit log (value) is empty:
1 {
2 "@odata.context": "https://<tenant>.<datacenter>.sapanalytics
3 "value": [],
4 "@des.entitiesInPage": "0",
5 "@des.processingTimeInMilliseconds": "1040"
6 }
https://community.sap.com/t5/technology-blogs-by-sap/data-export-api-a-tour-of-the-api/ba-p/13567104 10/17
1/7/25, 12:04 PM Data Export API: A tour of the API - SAP Community
as a 10,000ft view of your model, because it is easy to read, but the EDMX document is
much more informative.
Fact Data
If you wanted the entire fact table from the Best Run Juice sample model, you’d craft
your http call as such:
1 https://<tenant>.datacenter>.sapanalytics.cloud/api/v1/dataexport
But if you wanted only the Quantity Sold account and only fact data related to product ID
PD1, you can append OData filters:
1 https://<tenant>.datacenter>.sapanalytics.cloud/api/v1/dataexport
1 https://<tenant>.datacenter>.sapanalytics.cloud/api/v1/dataexport
This concludes our tour of SAC’s data export API, as of January 2023. We have active
plans for expanding this API, so more endpoints and features will be added. Next time,
we’ll start building a Python wrapper.
https://community.sap.com/t5/technology-blogs-by-sap/data-export-api-a-tour-of-the-api/ba-p/13567104 11/17
1/7/25, 12:04 PM Data Export API: A tour of the API - SAP Community
Labels:
Technology Updates
Tags:
API APIs OData odatav4 SAP Analytics Cloud data export service
2 Comments
harelc
Discoverer
2023 May 24 4:07 PM
0 Kudos
Hi
Harel
thomasboub
Participant
2023 Nov 03 8:45 AM
https://community.sap.com/t5/technology-blogs-by-sap/data-export-api-a-tour-of-the-api/ba-p/13567104 12/17
1/7/25, 12:04 PM Data Export API: A tour of the API - SAP Community
0 Kudos
1 https://<tenant>.datacenter>.sapanalytics.cloud/api/v1/dataexport
but we use a new model and we don't know how to filter a specific measure.
Comment
https://community.sap.com/t5/technology-blogs-by-sap/data-export-api-a-tour-of-the-api/ba-p/13567104 13/17
1/7/25, 12:04 PM Data Export API: A tour of the API - SAP Community
SAP Datasphere تحقيق أقصى استفادة من بيانات األعمال1 SAP MDG Data Quality Management 1
SAP MDG DQM 1 SAP s4hana cloud 1 SAP S4HANA Migration Cockpit 1
Related Content
HANA Sizing Keypoints
in Technology Blogs by Members yesterday
Datasphere THE solution to maintain the business context & considerations for
outbound data movement
in Technology Blogs by SAP a week ago
https://community.sap.com/t5/technology-blogs-by-sap/data-export-api-a-tour-of-the-api/ba-p/13567104 14/17
1/7/25, 12:04 PM Data Export API: A tour of the API - SAP Community
Former Member
ThomasJenewein
Product and Topic Expert
https://community.sap.com/t5/technology-blogs-by-sap/data-export-api-a-tour-of-the-api/ba-p/13567104 15/17
1/7/25, 12:04 PM Data Export API: A tour of the API - SAP Community
christine_donato
Active Participant
25533 60 451
Raja_Gupta 20
thomas_weiss 8
KrishnaSharma7 8
akshatsaxena 7
https://community.sap.com/t5/technology-blogs-by-sap/data-export-api-a-tour-of-the-api/ba-p/13567104 16/17
1/7/25, 12:04 PM Data Export API: A tour of the API - SAP Community
nikita_tabakov 5
rashmi_vanaja 5
Harvey_Yao 4
yogananda 4
AndreaUS 4
AnanthNatarajan 4
View all
Trademark Support
Cookie Preferences
Follow
https://community.sap.com/t5/technology-blogs-by-sap/data-export-api-a-tour-of-the-api/ba-p/13567104 17/17