You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 38 Next »

API endpoints

Login user to AAS

GET

/user/login

Remarks

  • Basic Auth required
  • This call delivers the JWT token (valid for 24h)

Status codes

  • 200 = Successful
  • 400 = Bad Request
  • 401 = User not authorized to login
  • 404 = User not found
  • 500 = Internal server error

Example call(s)

  • GET https://dev-ddb.fiz-karlsruhe.de/api/2/user/login



Get info about logged-in user

GET

/user/info

Remarks

  • Login with user required

Status codes

  • 200 = Successful
  • 400 = Bad Request
  • 401 = User not authorized to login
  • 404 = User not found
  • 500 = Internal server error

Example call(s)

  • GET https://dev-ddb.fiz-karlsruhe.de/api/2/user/info



Get all user privileges

GET

/user/privileges

Remarks

  • Login with user permission required

Status codes

  • 200 = Successful
  • 400 = Bad Request
  • 401 = User not authorized to login
  • 403 = Authentication temporarily blocked
  • 404 = User not found
  • 423 = User is blacklisted
  • 428 = User has "unconfirmed" status
  • 500 = Internal server error

Example call(s)

  • GET https://dev-ddb.fiz-karlsruhe.de/api/2/user/privileges



Get all organizations of user

GET

/user/organizations

Remarks

  • Login with user permission required

Status codes

  • 200 = Successful
  • 304 = Attribute modified
  • 400 = Bad Request
  • 401 = User not authorized to login
  • 403 = Authentication temporarily blocked
  • 404 = User not found
  • 423 = User is blacklisted
  • 428 = User has "unconfirmed" status
  • 500 = Internal server error

Example call(s)

  • GET https://dev-ddb.fiz-karlsruhe.de/api/2/user/organizations



Create new user

POST

/user

Remarks

  • No Login (anonymous) required

Status codes

  • 200 = Successful
  • 400 = Bad Request
  • 401 = User not authorized to login
  • 409 = Illegal State
  • 500 = Internal server error

Request body

Returns Model User

{
    "nickname": "testuser-ri",
    "email": "testuser-ri@ddb.de",
    "pswd": "testuser-ri"
}

Response body

Response-Body => User
{
    "id": "cb5d9c5810e985e7beda092b22e1e480",
    "nickname": "testuser-ri-1",
    "status": "CONFIRMED",
    "surName": "surname is unknown",
    "email": "testuser-ri-1@ddb.de",
    "created": "2024-01-31T12:13:30",
    "creatorId": "anonymous",
    "modified": "2024-01-31T12:13:30",
    "modifierId": "anonymous"
}

Example call(s)

  • POST https://dev-ddb.fiz-karlsruhe.de/api/2/user



Delete existing user

DELETE

/user/{id}

Remarks

  • Admin permission required

Status codes

  • 204 = User successful deleted
  • 400 = Bad Request
  • 401 = User not authorized to login
  • 404 = User not found
  • 423 = User is blacklisted
  • 428 = User has "unconfirmed" status
  • 500 = Internal server error

  • No labels