Create a new user program permission for a user and a program.
If the user program permission for the program and the user already exists, it will be updated if necessary.
A JSON object containing user program permission information.
Successful operation
Successful operation
Unprocessable Content
{- "user": 2,
- "program": 1,
- "umask": 3
}
{- "success": true,
- "hash": "c1a2e103309a94c4dd416c93eeb9ddf5c8159d1c",
- "data": {
- "hash": "df89ef8ba81411ac75772b0f201ba1043683aaf1",
- "umask": 3,
- "created_time": "2022-08-31T10:52:17.000000Z",
- "modified_time": "2022-08-31T10:52:17.000000Z",
- "modified_user_time": "2022-08-31T10:52:17.000000Z",
- "model": "UserProgramPermission",
- "user": {
- "id": 2,
- "hash": "a13b1b362d914d12bbcf5de981e3a7f53d00a8d0",
- "name": "Uli Hoeneß",
- "first_name": "Uli",
- "last_name": "Hoeneß",
- "position": "CEO",
- "department": "Sausage factory",
- "organization": "Nordantech",
- "email": "knacki@nordantech.com",
- "status": 1,
- "created_time": "2022-06-27T11:01:10.000000Z",
- "modified_time": "2022-08-22T16:10:03.000000Z",
- "modified_user_time": "2022-08-22T16:10:03.000000Z",
- "model": "User",
- "user_hub_permission": {
- "hash": "79cadf502e6f6b8e9b8f70fa4a24159f15efbbd0",
- "umask": 1,
- "created_time": "2022-06-27T11:02:43.000000Z",
- "modified_time": "2022-06-27T11:02:43.000000Z",
- "modified_user_time": "2022-06-27T11:02:43.000000Z",
- "model": "UserHubPermission"
}
}, - "program": {
- "id": 1,
- "hash": "1650600bd010a50897b50572382460965fed588a",
- "name": "Airborne",
- "description": "",
- "targets": "",
- "assumptions": "",
- "miscellaneous": "",
- "paused": false,
- "locked": false,
- "guarded": false,
- "created_time": "2022-06-27T09:48:06.000000Z",
- "modified_time": "2022-08-22T10:09:18.000000Z",
- "modified_user_time": "2022-08-22T10:09:18.000000Z",
- "model": "Program"
}
}, - "timestamp": 1681290391422
}
Get all user program permissions of the authenticated hub.
Successful operation
{- "success": true,
- "hash": "93b46704a379a78beb870a8cc065111ba0dec2d8",
- "data": [
- {
- "hash": "df89ef8ba81411ac75772b0f201ba1043683aaf1",
- "umask": 3,
- "created_time": "2022-08-31T10:52:17.000000Z",
- "modified_time": "2022-08-31T10:52:17.000000Z",
- "modified_user_time": "2022-08-31T10:52:17.000000Z",
- "model": "UserProgramPermission",
- "user": {
- "id": 2,
- "hash": "a13b1b362d914d12bbcf5de981e3a7f53d00a8d0",
- "name": "Uli Hoeneß",
- "first_name": "Uli",
- "last_name": "Hoeneß",
- "position": "CEO",
- "department": "Sausage factory",
- "organization": "Nordantech",
- "email": "knacki@nordantech.com",
- "status": 1,
- "created_time": "2022-06-27T11:01:10.000000Z",
- "modified_time": "2022-08-22T16:10:03.000000Z",
- "modified_user_time": "2022-08-22T16:10:03.000000Z",
- "model": "User",
- "user_hub_permission": {
- "hash": "79cadf502e6f6b8e9b8f70fa4a24159f15efbbd0",
- "umask": 1,
- "created_time": "2022-06-27T11:02:43.000000Z",
- "modified_time": "2022-06-27T11:02:43.000000Z",
- "modified_user_time": "2022-06-27T11:02:43.000000Z",
- "model": "UserHubPermission"
}
}, - "program": {
- "id": 1,
- "hash": "1650600bd010a50897b50572382460965fed588a",
- "name": "Airborne",
- "description": "",
- "targets": "",
- "assumptions": "",
- "miscellaneous": "",
- "paused": false,
- "locked": false,
- "guarded": false,
- "created_time": "2022-06-27T09:48:06.000000Z",
- "modified_time": "2022-08-22T10:09:18.000000Z",
- "modified_user_time": "2022-08-22T10:09:18.000000Z",
- "model": "Program"
}, - "created_user": {
- "id": 1,
- "hash": "8db560a23013ff54838d45e59a3f3f39f6720c86",
- "name": "Olli Kahn",
- "first_name": "Olli",
- "last_name": "Kahn",
- "position": "CEO",
- "department": "Engine room",
- "organization": "Nordantech",
- "email": "titan@nordantech.com",
- "status": 1,
- "created_time": "2022-05-04T16:51:37.000000Z",
- "modified_time": "2022-05-23T12:18:17.000000Z",
- "modified_user_time": "2022-05-23T12:18:17.000000Z",
- "model": "User"
}, - "modified_user": {
- "id": 1,
- "hash": "8db560a23013ff54838d45e59a3f3f39f6720c86",
- "name": "Olli Kahn",
- "first_name": "Olli",
- "last_name": "Kahn",
- "position": "CEO",
- "department": "Engine room",
- "organization": "Nordantech",
- "email": "titan@nordantech.com",
- "status": 1,
- "created_time": "2022-05-04T16:51:37.000000Z",
- "modified_time": "2022-05-23T12:18:17.000000Z",
- "modified_user_time": "2022-05-23T12:18:17.000000Z",
- "model": "User"
}
}, - {
- "hash": "a760eb5d1e1c09056a9c2e7d85ba3e15b57c6e78",
- "umask": 3,
- "created_time": "2022-08-08T15:29:58.000000Z",
- "modified_time": "2022-08-08T15:30:02.000000Z",
- "modified_user_time": "2022-08-08T15:30:02.000000Z",
- "model": "UserProgramPermission",
- "user": {
- "id": 2,
- "hash": "a13b1b362d914d12bbcf5de981e3a7f53d00a8d0",
- "name": "Uli Hoeneß",
- "first_name": "Uli",
- "last_name": "Hoeneß",
- "position": "CEO",
- "department": "Sausage factory",
- "organization": "Nordantech",
- "email": "knacki@nordantech.com",
- "status": 1,
- "created_time": "2022-06-27T11:01:10.000000Z",
- "modified_time": "2022-08-22T16:10:03.000000Z",
- "modified_user_time": "2022-08-22T16:10:03.000000Z",
- "model": "User",
- "user_hub_permission": {
- "hash": "79cadf502e6f6b8e9b8f70fa4a24159f15efbbd0",
- "umask": 1,
- "created_time": "2022-06-27T11:02:43.000000Z",
- "modified_time": "2022-06-27T11:02:43.000000Z",
- "modified_user_time": "2022-06-27T11:02:43.000000Z",
- "model": "UserHubPermission"
}
}, - "program": {
- "id": 15,
- "hash": "5319a62f26b5efb629f5b12457398c194b79d26f",
- "name": "Relegation 2022/23",
- "description": "",
- "targets": "",
- "assumptions": "",
- "miscellaneous": "",
- "paused": false,
- "locked": false,
- "guarded": false,
- "created_time": "2022-07-05T10:44:51.000000Z",
- "modified_time": "2022-08-22T10:09:18.000000Z",
- "modified_user_time": "2022-08-08T14:31:27.000000Z",
- "model": "Program"
}, - "created_user": {
- "id": 1,
- "hash": "8db560a23013ff54838d45e59a3f3f39f6720c86",
- "name": "Olli Kahn",
- "first_name": "Olli",
- "last_name": "Kahn",
- "position": "CEO",
- "department": "Engine room",
- "organization": "Nordantech",
- "email": "titan@nordantech.com",
- "status": 1,
- "created_time": "2022-05-04T16:51:37.000000Z",
- "modified_time": "2022-05-23T12:18:17.000000Z",
- "modified_user_time": "2022-05-23T12:18:17.000000Z",
- "model": "User"
}, - "modified_user": {
- "id": 1,
- "hash": "8db560a23013ff54838d45e59a3f3f39f6720c86",
- "name": "Olli Kahn",
- "first_name": "Olli",
- "last_name": "Kahn",
- "position": "CEO",
- "department": "Engine room",
- "organization": "Nordantech",
- "email": "titan@nordantech.com",
- "status": 1,
- "created_time": "2022-05-04T16:51:37.000000Z",
- "modified_time": "2022-05-23T12:18:17.000000Z",
- "modified_user_time": "2022-05-23T12:18:17.000000Z",
- "model": "User"
}
}
], - "meta": {
- "page": 1,
- "first": 1,
- "last": 2,
- "total": 2,
- "limit": 1000,
- "pages": 1
}, - "timestamp": 1661943619024
}
Get a user program permission.
Successful operation
Not Found
{- "success": true,
- "hash": "0f46af90f62a62a4ad4d200323285cadf10ad05a",
- "data": {
- "hash": "df89ef8ba81411ac75772b0f201ba1043683aaf1",
- "umask": 3,
- "created_time": "2022-08-31T10:52:17.000000Z",
- "modified_time": "2022-08-31T10:52:17.000000Z",
- "modified_user_time": "2022-08-31T10:52:17.000000Z",
- "model": "UserProgramPermission",
- "user": {
- "id": 2,
- "hash": "a13b1b362d914d12bbcf5de981e3a7f53d00a8d0",
- "name": "Uli Hoeneß",
- "first_name": "Uli",
- "last_name": "Hoeneß",
- "position": "CEO",
- "department": "Sausage factory",
- "organization": "Nordantech",
- "email": "knacki@nordantech.com",
- "status": 1,
- "created_time": "2022-06-27T11:01:10.000000Z",
- "modified_time": "2022-08-22T16:10:03.000000Z",
- "modified_user_time": "2022-08-22T16:10:03.000000Z",
- "model": "User",
- "user_hub_permission": {
- "hash": "79cadf502e6f6b8e9b8f70fa4a24159f15efbbd0",
- "umask": 1,
- "created_time": "2022-06-27T11:02:43.000000Z",
- "modified_time": "2022-06-27T11:02:43.000000Z",
- "modified_user_time": "2022-06-27T11:02:43.000000Z",
- "model": "UserHubPermission"
}
}, - "program": {
- "id": 1,
- "hash": "1650600bd010a50897b50572382460965fed588a",
- "name": "Airborne",
- "description": "",
- "targets": "",
- "assumptions": "",
- "miscellaneous": "",
- "paused": false,
- "locked": false,
- "guarded": false,
- "created_time": "2022-06-27T09:48:06.000000Z",
- "modified_time": "2022-08-22T10:09:18.000000Z",
- "modified_user_time": "2022-08-22T10:09:18.000000Z",
- "model": "Program"
}, - "created_user": {
- "id": 1,
- "hash": "8db560a23013ff54838d45e59a3f3f39f6720c86",
- "name": "Olli Kahn",
- "first_name": "Olli",
- "last_name": "Kahn",
- "position": "CEO",
- "department": "Engine room",
- "organization": "Nordantech",
- "email": "titan@nordantech.com",
- "status": 1,
- "created_time": "2022-05-04T16:51:37.000000Z",
- "modified_time": "2022-05-23T12:18:17.000000Z",
- "modified_user_time": "2022-05-23T12:18:17.000000Z",
- "model": "User"
}, - "modified_user": {
- "id": 1,
- "hash": "8db560a23013ff54838d45e59a3f3f39f6720c86",
- "name": "Olli Kahn",
- "first_name": "Olli",
- "last_name": "Kahn",
- "position": "CEO",
- "department": "Engine room",
- "organization": "Nordantech",
- "email": "titan@nordantech.com",
- "status": 1,
- "created_time": "2022-05-04T16:51:37.000000Z",
- "modified_time": "2022-05-23T12:18:17.000000Z",
- "modified_user_time": "2022-05-23T12:18:17.000000Z",
- "model": "User"
}
}, - "timestamp": 1661944594652
}
Update a user program permission.
Successful operation
Not Found
Unprocessable Content
{- "umask": 0
}
{- "success": true,
- "hash": "5f8fad644fefebde571df8c7e145d3e53affe9d7",
- "data": {
- "hash": "df89ef8ba81411ac75772b0f201ba1043683aaf1",
- "umask": 0,
- "created_time": "2022-08-31T10:52:17.000000Z",
- "modified_time": "2022-08-31T11:19:11.000000Z",
- "modified_user_time": "2022-08-31T11:19:11.000000Z",
- "model": "UserProgramPermission",
- "modified_user": {
- "id": 1,
- "hash": "8db560a23013ff54838d45e59a3f3f39f6720c86",
- "name": "Olli Kahn",
- "first_name": "Olli",
- "last_name": "Kahn",
- "position": "CEO",
- "department": "Engine room",
- "organization": "Nordantech",
- "email": "titan@nordantech.com",
- "status": 1,
- "created_time": "2022-05-04T16:51:37.000000Z",
- "modified_time": "2022-05-23T12:18:17.000000Z",
- "modified_user_time": "2022-05-23T12:18:17.000000Z",
- "model": "User"
}
}, - "timestamp": 1661944751534
}
Delete a user program permission.
Successful operation
Not Found
{- "success": true,
- "hash": "8739602554c7f3241958e3cc9b57fdecb474d508",
- "data": { },
- "timestamp": 1661945038165
}