User program permission

The user program permission.

Create a user program permission

Create a new user program permission for a user and a program.

SecurityJWT
Request
Request Body schema: application/json

A JSON object containing user program permission information.

user_id
required
integer >= 1

The user of the new user program permission.

Without a user id the request will always return a 403 Forbidden response.

program_id
required
integer >= 1

The program of the new user program permission.

Without a program id the request will always return a 403 Forbidden response.

umask
required
integer

The permission level of the new user program permission.

  • 0 - None
  • 1 - Read
  • 2 - Write
  • 3 - Admin
Enum: 0 1 2 3
Responses
201

Successful operation

422

Unprocessable Content

post/userprogrampermission
Request samples
application/json
{
  • "user_id": 2,
  • "program_id": 1,
  • "umask": 3
}
Response samples
application/json
{
  • "success": true,
  • "hash": "0f46af90f62a62a4ad4d200323285cadf10ad05a",
  • "data": {
    },
  • "timestamp": 1661943137551
}

Get all user program permissions

Get all user program permissions of the authenticated hub.

SecurityJWT
Request
query Parameters
program
string or integer

Filter the user program permission list for a program.

Responses
200

Successful operation

404

Not Found

get/userprogrampermission
Request samples
Response samples
application/json
{
  • "success": true,
  • "hash": "93b46704a379a78beb870a8cc065111ba0dec2d8",
  • "data": [
    ],
  • "timestamp": 1661943619024
}

Get a user program permission

Get a user program permission.

SecurityJWT
Request
path Parameters
userprogrampermission
required
string

The hash of the user program permission.

Responses
200

Successful operation

404

Not Found

get/userprogrampermission/{userprogrampermission}
Request samples
Response samples
application/json
{
  • "success": true,
  • "hash": "0f46af90f62a62a4ad4d200323285cadf10ad05a",
  • "data": {
    },
  • "timestamp": 1661944594652
}

Update a user program permission

Update a user program permission.

SecurityJWT
Request
path Parameters
userprogrampermission
required
string

The hash of the user program permission.

Request Body schema: application/json

A JSON object containing user program permission information

umask
integer

The user program permission umask.

  • 0 - None
  • 1 - Read
  • 2 - Write
  • 3 - Admin
Enum: 0 1 2 3
Responses
200

Successful operation

404

Not Found

422

Unprocessable Content

put/userprogrampermission/{userprogrampermission}
Request samples
application/json
{
  • "umask": 0
}
Response samples
application/json
{
  • "success": true,
  • "hash": "5f8fad644fefebde571df8c7e145d3e53affe9d7",
  • "data": {
    },
  • "timestamp": 1661944751534
}

Delete a user program permission

Delete a user program permission.

SecurityJWT
Request
path Parameters
userprogrampermission
required
string

The hash of the user program permission.

Responses
200

Successful operation

404

Not Found

delete/userprogrampermission/{userprogrampermission}
Request samples
Response samples
application/json
{
  • "success": true,
  • "hash": "8739602554c7f3241958e3cc9b57fdecb474d508",
  • "data": [ ],
  • "timestamp": 1661945038165
}