Skip to content
Management API Reference

Get user-id to role mappings for JIT access

get/v1/projects/{ref}/database/jit

Mappings of roles a user can assume in the project database

OAuth scopes

  • database:read

The fine-grained token must include the following permissions to access this endpoint:

  • database_jit_read

Path parameters

  • ref
    Required
    string

    Project ref

Response codes

  • 200
  • 401
  • 403
  • 429
  • 500

Response (200)

{
"user_id": "00000000-0000-0000-0000-000000000000",
"user_roles": [
{
"role": "lorem",
"expires_at": 42,
"allowed_networks": {
"allowed_cidrs": [
{
"cidr": "144.144.144.144/14"
}
],
"allowed_cidrs_v6": [
{
"cidr": "::/104"
}
]
},
"branches_only": true
}
]
}