Apiuser Workzone
Apiuser Workzone
PUBLIC
Warning
This document has been generated from the SAP Help Portal and is an incomplete version of the official SAP product
documentation. The information included in custom documentation may not re ect the arrangement of topics in the SAP Help
Portal, and may be missing important aspects and/or correlations to other topics. For this reason, it is not for productive use.
This is custom documentation. For more information, please visit the SAP Help Portal 1
7/23/2024
Note
Returning content-type in a response has now been updated according to common API standards. The user-api
is now returning “content-type = application/json”, which may require an adjustment to HTML5
applications coding such as removing the JSON.parse code, as this will be done automatically.
Sample Code
```
{
"firstname": "John",
"lastname": "Doe",
"email": "[email protected]",
"name": "[email protected]",
"displayName": "John Doe ([email protected])"
}
```
Sample Code
```
{
"firstname": "John",
"lastname": "Doe",
"email": "[email protected]",
"name": "[email protected]"
}
```
Note
The "name" property is the user ID in the identity provider, which in many cases is also the email address.
Con guring the User API Service in the Routing Con guration File
The user API can be implemented by modelling an xs-app.json route using the sap-approuter-userapi service .
This is custom documentation. For more information, please visit the SAP Help Portal 2
7/23/2024
The following example handles both endpoints:
Sample Code
{
"source": "^/user-api(.*)",
"target": "$1",
"service": "sap-approuter-userapi"
}
Sample Code
{
"source": "^/user-api/currentUser$",
"target": "/currentUser",
"service": "sap-approuter-userapi"
}
Related Information
routes
This is custom documentation. For more information, please visit the SAP Help Portal 3