Get a Valid CSRF Token
Before being able to create new subscriptions via POST requests or delete subscription chains, make sure you have a valid CSRF token first.
You can get a token by sending a GET request to <tenant-url>/api/v1/csrf, or any GET request to the Data Export Service (e.g <tenant-url>/api/v1/dataexport/administration/Namespaces). The request must include 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 POST or DELETE requests to the Data Export Service. The x-csrf-token:<token> header must be included in the request.
API Usage
|
CSRF Token Header |
|
|
URL |
<tenant-url>/api/v1/csrf |
|
Request Type |
GET |
|
Header Name |
x-csrf-token: fetch |
|
Auth Header |
|
|
Header Name |
x-sap-sac-custom-auth |
|
Header Value |
true |
Response
The CSRF token is returned in the x-csrf-token response header. This token can then be included in the POST request in the x-csrf-token:<token> header.