{"openapi":"3.1.0","info":{"title":"PLANQK User Service API","description":"Part of the PLANQK Platform API.","contact":{"name":"Kipu Quantum GmbH","url":"https://kipu-quantum.com","email":"support@planqk.de"},"version":"1.0"},"servers":[{"url":"https://api.hub.kipu-quantum.com/user-service","description":"Generated server url"}],"paths":{"/me":{"get":{"tags":["User Settings"],"summary":"Returns the user details of the currently logged-in user.","description":"Returns the user details of the currently logged-in user.","operationId":"getUser","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UserDto"}}}},"401":{"description":"Unauthorized"}},"security":[{"oauth2":[]},{"apiKey":[]}]},"put":{"tags":["User Settings"],"summary":"Updates the user details of the currently logged-in user.","description":"Updates the user details of the currently logged-in user.","operationId":"updateUser","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UserDto"}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"}},"security":[{"oauth2":[]},{"apiKey":[]}]},"delete":{"tags":["User Settings"],"summary":"Deletes the currently logged-in user.","description":"Deletes the currently logged-in user.","operationId":"deleteUser","responses":{"204":{"description":"No Content"},"401":{"description":"Unauthorized"}},"security":[{"oauth2":[]},{"apiKey":[]}]}},"/me/access-tokens/default":{"put":{"tags":["User Settings - Personal Access Tokens"],"summary":"Updates the default personal access token of the current user.","description":"Updates the default personal access token of the current user.","operationId":"updateDefaultAccessToken","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DefaultAccessTokenDto"}}}},"401":{"description":"Unauthorized"}},"security":[{"oauth2":[]},{"apiKey":[]}]}},"/me/profile-image":{"post":{"tags":["User Settings"],"summary":"Updates the profile image of the currently logged-in user.","description":"Updates the profile image of the currently logged-in user.","operationId":"updateProfileImage","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}},"required":["file"]}}}},"responses":{"204":{"description":"No Content"},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"}},"security":[{"oauth2":[]},{"apiKey":[]}]}},"/me/access-tokens":{"get":{"tags":["User Settings - Personal Access Tokens"],"summary":"Returns the personal access tokens of the current user.","description":"Returns the personal access tokens of the current user.","operationId":"getAccessTokens","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AccessTokensDto"}}}},"401":{"description":"Unauthorized"}},"security":[{"oauth2":[]},{"apiKey":[]}]},"post":{"tags":["User Settings - Personal Access Tokens"],"summary":"Creates a new personal access token for the current user.","description":"Creates a new personal access token for the current user.","operationId":"createAccessToken","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAccessTokenRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AccessTokenDto"}}}},"401":{"description":"Unauthorized"}},"security":[{"oauth2":[]},{"apiKey":[]}]}},"/authorize":{"post":{"tags":["Authentication"],"summary":"Checks the given personal access token and returns the user details.","description":"Checks the given personal access token and returns the user details.","operationId":"authorizeUser","parameters":[{"name":"X-Auth-Token","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PersonalAccessTokenPrincipal"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}}}},"/users/{id}":{"get":{"tags":["Users"],"summary":"Returns the user details of the user with the given id.","description":"Returns the user details of the user with the given id.","operationId":"getUser_1","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UserOverviewDto"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}}},"head":{"tags":["Users"],"summary":"Checks if a user with the given id exists.","description":"Checks if a user with the given id exists.","operationId":"existsById","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"},"404":{"description":"Not Found"}}}},"/users/{id}/profile-image":{"get":{"tags":["Users"],"summary":"Returns the current profile image of the given user.","description":"Returns the current profile image of the given user.","operationId":"getProfileImage","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string","format":"byte"}}}},"404":{"description":"Not Found"}}}},"/user-registration-status":{"get":{"tags":["User Registration Status"],"summary":"Get the registration status of a user.","description":"Return the registration status of a user by their email address.\nThis endpoint is used to check if a user has completed the registration process or not.\n","operationId":"getUserRegistrationStatus","parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/RegistrationResponse"}}}},"400":{"description":"Bad Request. Email address is required."},"401":{"description":"Unauthorized"}}}},"/search":{"get":{"tags":["Search"],"description":"Search for users based on the given query parameter.","operationId":"searchUsers","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserSearchDto"}}}}},"401":{"description":"Unauthorized"}},"security":[{"oauth2":[]},{"apiKey":[]}]}},"/me/access-tokens/{id}":{"delete":{"tags":["User Settings - Personal Access Tokens"],"summary":"Deletes a personal access token of the current user.","description":"Deletes a personal access token of the current user.","operationId":"deleteAccessToken","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"security":[{"oauth2":[]},{"apiKey":[]}]}}},"components":{"schemas":{"UpdateUserRequest":{"type":"object","properties":{"currentPosition":{"type":"string"},"homepage":{"type":"string"},"about":{"type":"string"}}},"UserDto":{"type":"object","properties":{"id":{"type":"string","example":"123e4567-e89b-12d3-a456-426614174000"},"username":{"type":"string","example":"john@doe.com"},"email":{"type":"string","example":"john@doe.com"},"firstname":{"type":"string","example":"John"},"lastname":{"type":"string","example":"Doe"},"currentPosition":{"type":"string"},"homepage":{"type":"string"},"about":{"type":"string"}}},"DefaultAccessTokenDto":{"type":"object","properties":{"defaultToken":{"type":"string","example":"kqh_plqk_RhtrP2EErcN6DwiNWvP0Ha4U1dcNdWdrViQJhEQ9c5"}}},"CreateAccessTokenRequest":{"type":"object","properties":{"name":{"type":"string","example":"My Access Token","minLength":1},"expiresAt":{"type":"string","example":"2031-01-01","pattern":"^\\d{4}\\-\\d{2}\\-\\d{2}\\s{1}\\d{2}\\:\\d{2}\\:\\d{2}$"}},"required":["name"]},"AccessTokenDto":{"type":"object","properties":{"id":{"type":"string","example":"123e4567-e89b-12d3-a456-426614174000"},"name":{"type":"string","example":"My Access Token","minLength":1},"createdAt":{"type":"string","example":"2021-01-01 00:00:00","pattern":"^\\d{4}\\-\\d{2}\\-\\d{2}\\s{1}\\d{2}\\:\\d{2}\\:\\d{2}$"},"usedAt":{"type":"string","example":"2021-01-01 12:00:00","pattern":"^\\d{4}\\-\\d{2}\\-\\d{2}\\s{1}\\d{2}\\:\\d{2}\\:\\d{2}$"},"expiresAt":{"type":"string","example":"2031-01-01","pattern":"^\\d{4}\\-\\d{2}\\-\\d{2}$"},"value":{"type":"string","description":"Only available after creation."}},"required":["name"]},"PersonalAccessTokenPrincipal":{"type":"object","properties":{"id":{"type":"string"},"accessToken":{"$ref":"#/components/schemas/AccessTokenDto"}}},"UserOverviewDto":{"type":"object","properties":{"id":{"type":"string","example":"123e4567-e89b-12d3-a456-426614174000"},"firstname":{"type":"string","example":"John"},"lastname":{"type":"string","example":"Doe"}}},"RegistrationResponse":{"type":"object","properties":{"status":{"type":"string","enum":["PENDING","APPROVED","REJECTED","NOT_FOUND","EMAIL_NOT_VERIFIED"]},"message":{"type":"string"}}},"UserSearchDto":{"type":"object","properties":{"id":{"type":"string","example":"123e4567-e89b-12d3-a456-426614174000"},"firstname":{"type":"string","example":"John"},"lastname":{"type":"string","example":"Doe"}}},"AccessTokensDto":{"type":"object","properties":{"defaultToken":{"type":"string","example":"kqh_RhtrP2EErcN6DwiNWvP0Ha4U1dcNdWdrViQJhEQ9c5"},"accessTokens":{"type":"array","items":{"$ref":"#/components/schemas/AccessTokenDto"}}}}},"securitySchemes":{"apiKey":{"type":"apiKey","name":"X-Auth-Token","in":"header"},"oauth2":{"type":"oauth2","flows":{"password":{"tokenUrl":"https://login.hub.kipu-quantum.com/realms/planqk/protocol/openid-connect/token","refreshUrl":"https://login.hub.kipu-quantum.com/realms/planqk/protocol/openid-connect/token","scopes":{"profile":""}}}}}}}