Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Page Properties
hiddentrue
idDONE

Product Version2021 Spring
Report Note
AssigneeBratislav

Resources & Remarks


Modification History

NameDateProduct VersionAction
Antje10 FEB 20212.5Page created.
Antje15 FEB 20212020 WinterrDOC
Agnieszka17 FEB 20212020 WinterrLANG
Antje28 MAY 20212021 Summerversion update - all endpoints refactured


...

Excerpt

The USERSERVICE API allows accessing and managing custom user information, settings and content.


Note
titleThis is a draft documentation of an alpha version of the API!

The API is available with the 2020 Winter release as an alpha version. It will be restructured, extended, and published for external clients in the yuuvis® Momentum 2021 Spring release, based on users' and customers' feedback we receive during development.


If the path parameter userId is specified in a request URL, the corresponding endpoint operates on the data of the user specified by this ID. In order to work with the data of the currently authorized user, the path alias /me can be used instead of /users/{userId}. For example, a GET /api/me request leads to the same result as calling the GET /api/users/{userId} endpoint.

...

Info

This API requires Keycloak as identity provider for yuuvis® Momentum.

In order to use the endpoints, a valid JWT token is required which is provided after successful authentication with valid credentials.

All endpoints are available via the Swagger-UI https://<host>/userservice/swagger-ui.html.


/userservice/api/users/{userId}/contents/userservice/api/users/{userId}/contents/userservice/api/users/{userId}/contents/{contentId}HEAD users{userId}contents//userservice/api/users/{userId}/contents/{contentId}POST
as of 2021 SummerPOST

Stores a new binary content passed in the request body with the specified contentId for the logged-in user. If the specified contentId already exists for the logged-in user, the corresponding existing content will be overwritten with the new content provided. 

/userservice/api/

users/{userId}/contents/{contentId}/userservice/api/users/{userId}/contents

user/content/{contentId}

DELETE

Deletes the existing binary content that is stored under the specified contentId for the logged-in user, or returns a 404 error if the specified contentId does not exist for the logged-in user.

/userservice/api/

users/{userId}/contents/{contentId}/userservice/api/users/{userId}/contents/{

user/content/{contentId}

/userservice/api/usersGET

Retrieves information on the currently logged-in user, such as first name, last name and username.

/userservice/api/

users/{userId}/userservice/api/users/{userId}/userservice/api/users/{userId}/settings/userservice/api/users/{userId}/settings

whoami

/userservice/api/users/{userId}/settings/{settingId}/userservice/api/users/{userId}/settings/{settingId

Retrieves the settings a user has stored under settingsId if it exists for the logged-in user.

/userservice/api/user/settings/{settingsId}

Stores a new set of settings under the settingsId for the logged-in user. If a set of settings with the provided settingsId already exists for the logged-in user, it will be overwritten.

Sets of setting are always JSON files, unlike content which can be any binary content file.

/userservice/api/

users

user/

{userId}/

settings/{

settingId

settingsId}

DELETE

Deletes an existing set of settings that is stored under the settingsId for the logged-in user, or returns a 404 error if settingsId does not exist for the logged-in user.

/userservice/api/

users

user/

{userId}/

settings/{

settingId}/userservice/api/users/{userId}/settings/{settingId

settingsId}

HTTP Method
as of product version
PurposeResponse FormatDescription

DELETE userservice/api/users/{userId}/contents
nopaneltrue

User

Contents - Manage custom content (for example, profile pictures)
GET
as of 2021 Summer
getContentsJSON
Insert excerpt
GET userservice/api/users/{userId}/contentsGET userservice/api/users/{userId}/contents
nopaneltrue
DELETE
as of 2021 Summer
deleteAllContentHTTP status code
Insert excerpt
DELETE userservice/api/users/{userId}/contents

Content

GET
as of 2021 Summer

getContent

Binary data
Insert excerpt
GET userservice/api/users/{userId}/contents/{contentId}GET userservice/api/users/{userId}/contents/{contentId}
nopaneltrue

HEAD
as of 2021 Summer

getContentInfoHTTP status code
Insert excerpt

Retrieves an existing binary content specified by the contentId under which the logged-in user has saved the content earlier. The binary content is provided in the response body whereas the mime type of the content is returned in the HTTP header.

/userservice/api/

user/

content/

{contentId}

HEAD /userservice/api/users/{userId}/contents/{contentId}
nopaneltrue
setContentHTTP status code
Insert excerpt
POST /userservice/api/users/{userId}/contents/{contentId}
nopaneltrue

DELETE
as of 2021 Summer

deleteContentHTTP status code
Insert excerpt
DELETE /userservice/api/users/{userId}/contents/{contentId}
nopaneltrue

User Info

- Access to detailed user information (for example, first name, last name and email)

GET
as of 2021 Summer
getUsersgetUserJSON
Insert excerpt
GET userservice/api/usersGET userservice/api/users
nopaneltrue
GET
as of 2021 Summer
getUserJSON
Insert excerpt
GET /userservice/api/users/{userId}
nopaneltrue

User Settings - Manage custom settings (for example, layout settings)

GET
as of 2021 Summer
getSettingsJSON
Insert excerpt
GET /userservice/api/users/{userId}/settingsGET /userservice/api/users/{userId}/settings
nopaneltrue
DELETE
as of 2021 Summer
deleteAllSettingsHTTP status code
Insert excerpt
DELETE /userservice/api/users/{userId}/settingsDELETE /userservice/api/users/{userId}/settings
nopaneltrue

User Settings

GET
as of 2021 Summer
getSettingJSON
Insert excerpt
GET userservice/api/users/{userId}/settings/{settingId}GET userservice/api/users/{userId}/settings/{settingId}
nopaneltrue
HEAD
as of 2021 Summer
getSettingInfoHTTP status code
Insert excerpt
HEAD userservice/api/users/{userId}/settings/{settingId}HEAD userservice/api/users/{userId}/settings/{settingId}
nopaneltrue
POST
as of 2021 Summer
setSettingHTTP status code
Insert excerpt
POST userservice/api/users/{userId}/settings/{settingId}POST userservice/api/users/{userId}/settings/{settingId}
nopaneltrue
DELETE
as of 2021 Summer
deleteSettingHTTP status code
Insert excerpt
DELETE userservice/api/users/{userId}/settings/{settingId}
nopaneltrue