Skip to content

User Managment

Account

Various operations can be performed via API for user account management, including login and viewing account information:

Login

Operations on users are processed through our API, for which it is necessary to generate a JWT token to allow the user to identify themselves with our services. The following endpoint allows the generation of an access token from the username and password.

HTTP Request

POST /k8sgpu/v1/user/login/
{
  "username": "foo",
  "password": "foo-s3cr3t-passw0rd"
}
HTTP Response
{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MzIxOTQyMzQsIm5iZiI6MTczMjE3OTgzNCwidXNlcm5hbWUiOiJhZG1pbiJ9.X-fKDhNqkG3NNy0iTVHS1ZbPZ4odeGdeuRNJsnRKel4",
  "expire": "2024-11-21 13:03:54.736403",
  "user": "foo",
  "max_age": 14400
}

Info

The generated token can be used as a simple bearer token until its expiration.

curl --request GET 'https://api.seeweb.it/k8sgpu/v1/' \
--header 'Authorization: Il-Tuo-Token-JWT' \

Account Information

User information can be collected via the following endpoint:

HTTP Request

GET /k8sgpu/v1/user/
HTTP Response
{
  "username": "foo"
}

Change Password

You can change a user's password directly from the API at the following endpoint:

HTTP Request

PUT/PATCH /k8sgpu/v1/user
{
  "password": "my-new-supers3cr3t-passw0rd"
}
HTTP Response
{
  "username": "string"
}