Skip to content

Authorize a program for a user

POST
/user/{user_id}/dac_authorization
curl --request POST \
--url https://example.com/user/example/dac_authorization \
--header 'Content-Type: application/json' \
--data '{ "program_id": "example", "start_date": "example", "end_date": "example" }'

Authorize a program for a user (or update a program auth for a user)

user_id
required
string
Media type application/json
One of:
object
program_id
required
string
start_date
required
string
/^\d{4}-\d{2}-\d{2}$/
end_date
required
string
/^\d{4}-\d{2}-\d{2}$/
Example generated
{
"program_id": "example",
"start_date": "example",
"end_date": "example"
}

Success

Media type application/json

Describes an authorized user and the programs the user is authorized to view

object
userinfo

Describes an authenticated user

object
sample_jwt

A sample jwt for this user from their IDP

string
user_name
required

Unique id of user, from CANDIG_USER_KEY field

string
site_roles
Array<string>
program_authorizations
object
team_member

List of programs that the user is a team member of

Array<string>
program_curator

List of programs that the user is a curator of

Array<string>
dac_authorizations

List of programs that this user is authorized to view

Array<object>
object
program_id
required
string
start_date
required
string
/^\d{4}-\d{2}-\d{2}$/
end_date
required
string
/^\d{4}-\d{2}-\d{2}$/
Example generated
{
"userinfo": {
"sample_jwt": "example",
"user_name": "example"
},
"site_roles": [
"example"
],
"program_authorizations": {
"team_member": [
"example"
],
"program_curator": [
"example"
],
"dac_authorizations": [
{
"program_id": "example",
"start_date": "example",
"end_date": "example"
}
]
}
}