api/v1/audit/activities/exportActivities

Allows you to get a log of user activities in a CSV file.

Prerequisites

  • You must have a SAP Analytics Cloud tenant URL.

  • You must have a SAP Analytics Cloud user.

  • You must configure the OAuth 2.0 Authorization Code Grant workflow (3-legged OAuth) to work with your application. For more information, see Setting Up Authentication.

Make sure to visit the SAP Business Accelerator Hub to access the API specification and try out the functionality.

GET /v1/audit/activities/exportActivities

Returns the user activities log as a CSV file.

URL Parameters

  • (Optional) csvName: The name of the CSV file that will be generated. If left unspecified, the file will be named activities.csv

    For example, https://<TENANT_URL>/api/v1/audit/activities/exportActivities?csvName=<FileName>.

  • (Optional) pageSize: The number of entries on each page. The minimum number is 1, and the maximum is 100,000. By default, the page size is set to 100,000.

    For example, https://<TENANT_URL>/api/v1/audit/activities/exportActivities?pageSize=100.

  • (Optional) pageIndex: The page number to be retrieved based on the specified page size. The minimum page index is 1. By default, the page index is 1.

    For example, https://<TENANT_URL>/api/v1/audit/activities/exportActivities?pageIndex=10.

  • (Optional) sortKey: The column key that the log will be sorted by. This can be set to: type, fileName, description, userName, status, activity, or timestamp. By default the sort key is set to timestamp.

    For example, https://<TENANT_URL>/api/v1/audit/activities/exportActivities?sortKey=status.

  • (Optional) sortDescending: The number of entries on each page. The minimum: Sets whether the log will be sorted in descending order. Set to FALSE to sort in ascending order.

    For example, https://<TENANT_URL>/api/v1/audit/activities/exportActivities?sortDescending=TRUE.

Successful Response

HTTP Status Code

Returns

200

Successful operation

A CSV file containing user activities will be generated.

POST /v1/audit/activities/exportActivities

Returns a CSV file containing a log of the specified activities.

URL Parameters

  • (Optional) csvName: The name of the CSV file that will be generated. If left unspecified, the file will be named activities.csv

    For example, https://<TENANT_URL>/api/v1/audit/activities/exportActivities?csvName=<FileName>.

  • (Optional) pageSize: The number of entries on each page. The minimum number is 1, and the maximum is 100,000. By default the page size is set to 100,000.

    For example, https://<TENANT_URL>/api/v1/audit/activities/exportActivities?pageSize=100.

  • (Optional) pageIndex: The page number to be retrieved based on the specified page size. The minimum page index is 1. By default the page index is 1.

    For example, https://<TENANT_URL>/api/v1/audit/activities/exportActivities?pageIndex=10.

  • (Optional) sortKey: The column key that the log will be sorted by. This can be set to type, fileName, description, userName, status, activity, or timestamp. By default the sort key is set to timestamp.

    For example, https://<TENANT_URL>/api/v1/audit/activities/exportActivities?sortKey=status.

  • (Optional) sortDescending: Sets whether the log will be sorted in descending order. Set to FALSE to sort in ascending order.

    For example, https://<TENANT_URL>/api/v1/audit/activities/exportActivities?sortDescending=TRUE.

Request Body Parameters:

  • (Optional) searchQuery: A search string to narrow results.

  • (Optional) type: The object type. For example, story. See below for a list of supported object types.

  • (Optional) fileName: The file name assoicated with an activity.

  • (Optional) description: The description of the activity.

  • (Optional) userName: The user who performed the activity.

  • (Optional) status: The status of the activity. For example, succeed.

  • (Optional) activity: The activity type. For example, create.

  • (Optional) from: The oldest timestamp to request.

  • (Optional) till: The newest timestamp to request.

Example request body:

{
    "type": "story",
    "userName": "my_user",
    "activity": "read"
}

Successful Response

HTTP Status Code

Returns

200

Successful operation

A CSV file containing the specified information will be generated.

Error Responses and Troubleshooting

HTTP Status Code

Reason

400

Bad request; please refer to documentation

There is a typo or mistake in your request. Check that the request syntax is correct.

403

User is not permitted to perform the requested operation

There was an authentication issue with the request. This may occur if the user is authenticated by the IdP but does not have a corresponding user in the SAP Analytics Cloud tenant.

To resolve this issue, ensure that a user exists in SAP Analytics Cloud. For more information, see Create Users.

500

A server error has occurred

The response body will be a JSON object with the following properties defined: status, code, and message. The information included with status, code, and message, may help you determine the cause of the server error.

Supported Object Types

This list shows the object types that can be specified using the API and what those object types map to in SAP Analytics Cloud.

When you create a POST request to the exportActivities endpoint, you can add an object type to the request body.

Example request body:

{
    "type": "story",
    "userName": "my_user",
    "activity": "read"
}
The type can be set to one of the items in this list. Each type maps to an object in SAP Analytics Cloud. If you log on to SAP Analytics Cloud, you can see that the list of objects matches the filters available on the Start of the navigation path Security Next navigation step  ActivitiesEnd of the navigation path page.

Type

Object in SAP Analytics Cloud

AUDIT

SAP Analytics Cloud Activity Log

HCPDATASOURCE

SAP Cloud Platform Datasource

OAUTH_CLIENT

OAuth Client

SCHEDULE

Schedule Publication

SCOPEROLEUSERASSIGN

Scope Role User Assignment

DWC_SPACEFILE

Space Files

DWC_SPACES

Spaces

STORY

Story

NLQ_DICTIONARY

Synonym Dictionary

SYSTEMFILE

System Files

SYSTEMINFO

System Information

TEAM

Team

PROFILETEMPLATE

Templates

THEMING

Theme

TRANSLATION

Translation

UPLOADEDFILE

Uploaded Files

USER

User

RELATIONSHIP

Validation Rule

VISUALIZATION

Visualization

SAC_SPACES

Workspace

WRANGLINGOBJECT

Wrangling Object

DWC_DAC

SAP Datasphere Control

DWC_DATAINTEGRATION

SAP Datasphere Integration

DWC_CONSUMPTION

SAP Datasphere Consumption

DWC_CONSUME_MODEL

SAP Datasphere Consumption Model

DWC_DATABUILDER

SAP Datasphere Builder

DWC_FACT_MODEL

SAP Datasphere Fact Model

DWC_FOLDER

SAP Datasphere Folder

DWC_GENERAL

SAP Datasphere General

DWC_REMOTECONNECTION

SAP Datasphere Remote Connection

DATASET

Dataset

DELETEDFILE

Deleted Files

PRESENTATION_V2

Digital Boardroom

DIMENSION

Dimension

DISCUSSION

Discussion

EXPLORER

Explorer

APPBOOKMARK

Global Bookmark

INSIGHT

Insight

KPI

KPI

KPIDRIVERTREE

KPI Driver Tree

LIFECYCLE

Lifecycle

CUBE

Model

MULTIACTIONS

Multi Actions

OTHERDATASOURCE

Other Datasources

CONTENTOWNERSHIP

Ownership of Content

FEELINGLUCKY

Personal Data Acquisition

PLANNINGCUBE

Planning Model

POINTOFINTEREST

Point of Interest

PREDICTIVESCENARIO

Predictive Scenario

APPBOOKMARK_PRI_COPY

Private Bookmark (Others)

APPBOOKMARK_PRIVATE

Private Bookmark (Personal)

PRIVATEFILE

Private Files

PRIVATEINSIGHT

Private Insight

PUBLISH_CONTENT

Publish Content

REMOTEDATASET

Remote Dataset

REMOTEMODELCREATION

Remote Model Creation

DATACHANGEINSIGHTS

Remote Repository Snapshot

PROFILE

Role

RUNTIMENOTIFICATION

Runtime Notification

ODC_GLOSSARY_ELEMENT

Catalog Glossary Object

ODC_KPI

Catalog KPI Template

ODC_PROFILING

Catalog Profiling

OCD_USER_PROPERTY

Catalog Tag Hierarchy

COMMENT

Comment

EXTERNALCONNECTION

Connection

EXTERNALCONTENT

Content Link

CONTENT_NETWORK

Content Network

CONTENT_EPM_OBJECT

Content Sample Object

RATE

Currency

CUSTOMWIDGET

Custom Widget

DASHBOARD

Dashboard

PLANNINGSEQUENCE

Data Action

PLANMONITOR_ADMIN

Data Action Monitor Administration

DATAANALYZER

Data Analyzer

DATAAUDIT

Data Change Log

DATALOCKING

Data Locking

DATAREPOSITORY

Data Repository

DWC_AUTH_SCENARIO

SAP Datasphere Authorization Scenario

DWC_BUSINESSBUILDER

SAP Datasphere Business Builder

DWC_BUSINESSCATALOG

SAP Datasphere Business Catalog

DWC_BUSINESS_ENTITY

SAP Datasphere Business Entity

ALLOCATOINPROCESS

Allocation Process (Edited)

ALLOCATIONSTEP

Allocation Step

ANALYTICCUBE

Analytic Model

EOSASSET

Analytic Hub Assets

EOSSTRUCTURE

Analytic Hub Structures

APPLICATIONS

Applications

AUTOMATEDDISCOVERIES

Automated Discoveries

BASIC_EPM_OBJECT

Basic Sample Object (Edited)

BYOK_ADMINISTRATOR

Bring Your Own Key (BYOK) Administrator

CALENDAR

Calendar Admin

CALENDAR_EVENT

Calendar Event

CATALOG_ADMIN

Catalog Admin

ODC_ASSET

Catalog Asset

ODC_CONTENT

Catalog Content

ODC_EXTRACTION

Catalog Extraction

ODC_GLOSSARY

Catalog Glossary