Valid CSRF Token

For a browser-based domain, you must have a valid x-csrf-token before creating a POST, PUT, PATCH, or DELETE request to all APIs, such as the /stories, /scim, or /scim2 endpoints. On the other hand, a direct API domain doesn't require a CSRF token.

You can get a token by sending a GET request to https://<tenant-name>.<region>.sapanalytics.cloud/api/v1/csrf by including the x-csrf-token: fetch header. The csrf token is then returned in the x-csrf-token response header.

Once you get the token, you can use it to send requests to the service. The x-csrf-token:<token> header must be included in the request for a browser-based domain. The x-csrf-token and x-sap-sac-custom-auth headers are not required for a direct API domain.

API Usage

URL

https://<tenant-name>.<region>.sapananlytics.cloud/api/v1/csrf

Request Type

GET

Header

x-csrf-token:<token>

Response

The CSRF token is returned in the x-csrf-token response header. This token can then be included in the POST, PUT, PATCH, or DELETE request in the x-csrf-token:<token> header.