SmaCH
SmaCH API

The current account


Get the current account's profile

GET
https://api.smach.science
/me/profile

Names, language and email of the account behind the token, read from the directory.

Get the current account's profile › Responses

200

The profile

The current account's own profile
firstName
​string · minLength: 0 · maxLength: 255 · required

Given name

lastName
​string · minLength: 0 · maxLength: 255 · required

Family name

email
​string · readOnly

Email, also the username

locale
​string · pattern: [a-z]{2,3}(-[A-Z]{2}…

Language of the emails and the login page


Update the current account's profile

PUT
https://api.smach.science
/me/profile

Changes the names and the language of the account behind the token. The email, the state and the roles of the account cannot be changed here; the password is changed on the Keycloak page, never through this API. The next token carries the new names.

Update the current account's profile › Request Body

The current account's own profile
firstName
​string · minLength: 0 · maxLength: 255 · required

Given name

lastName
​string · minLength: 0 · maxLength: 255 · required

Family name

email
​string · readOnly

Email, also the username

locale
​string · pattern: [a-z]{2,3}(-[A-Z]{2}…

Language of the emails and the login page

Update the current account's profile › Responses

The updated profile

The current account's own profile
firstName
​string · minLength: 0 · maxLength: 255 · required

Given name

lastName
​string · minLength: 0 · maxLength: 255 · required

Family name

email
​string · readOnly

Email, also the username

locale
​string · pattern: [a-z]{2,3}(-[A-Z]{2}…

Language of the emails and the login page


Get the current account

GET
https://api.smach.science
/me

The account behind the token, its organizations and the role held in each. Everything is read from the token itself, so the answer costs no directory lookup and reflects exactly what the token grants.

Get the current account › Responses

200

The current account

The account behind the current token
id
​string

Account identifier

email
​string

Account email, also its username

role
​string · enum

Realm-wide role, empty when the account holds none

Enum values:
super-admin
administrator
viewer
​string

Organizations the account belongs to, alias to display name

​string

Role held per organization, absent where none is held