Get user
GET
/api/v1/users/{username}
const url = 'https://osctrl.net/api/v1/users/example';const options = {method: 'GET', headers: {Authorization: '<Authorization>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://osctrl.net/api/v1/users/example \ --header 'Authorization: <Authorization>'Returns an API user by username.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”username
required
string
Username
Responses
Section titled “Responses”OK
Media typeapplication/json
object
admin
boolean
auth_source
AuthSource is empty for the password-login path (the default) and “oidc” for users JIT-provisioned through the federated callback. Surfaced so the SPA Users page can show an “OIDC” badge alongside the existing admin/service labels.
string
created_at
string
email
string
environment_id
integer
fullname
string
id
integer
service
boolean
token_expire
string
updated_at
string
username
string
uuid
string
Examplegenerated
{ "admin": true, "auth_source": "example", "created_at": "example", "email": "example", "environment_id": 1, "fullname": "example", "id": 1, "service": true, "token_expire": "example", "updated_at": "example", "username": "example", "uuid": "example"}Bad request
Media typeapplication/json
object
code
string
error
string
Examplegenerated
{ "code": "example", "error": "example"}Unauthorized
Media typeapplication/json
object
code
string
error
string
Examplegenerated
{ "code": "example", "error": "example"}Forbidden
Media typeapplication/json
object
code
string
error
string
Examplegenerated
{ "code": "example", "error": "example"}Not found
Media typeapplication/json
object
code
string
error
string
Examplegenerated
{ "code": "example", "error": "example"}Conflict
Media typeapplication/json
object
code
string
error
string
Examplegenerated
{ "code": "example", "error": "example"}Too many requests
Media typeapplication/json
object
code
string
error
string
Examplegenerated
{ "code": "example", "error": "example"}Internal server error
Media typeapplication/json
object
code
string
error
string
Examplegenerated
{ "code": "example", "error": "example"}Service unavailable
Media typeapplication/json
object
code
string
error
string
Examplegenerated
{ "code": "example", "error": "example"}