AlgoJudge documentation0.2
REST reference

Roles

GET/roles

Query Parameters

activityId?string
Formatuuid

Response Body

curl -X GET "https://example.com/roles"
[  {    "id": "string",    "name": "string",    "description": "string",    "permissions": [      "string"    ],    "isBuiltIn": true,    "builtInKey": "string",    "activityId": "string",    "activityName": "string",    "grants": 0,    "mappedBy": [      "string"    ]  }]
POST/roles

Request Body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://example.com/roles" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "permissions": [      "string"    ]  }'
{  "id": "string",  "name": "string",  "description": "string",  "permissions": [    "string"  ],  "isBuiltIn": true,  "builtInKey": "string",  "activityId": "string",  "activityName": "string",  "grants": 0,  "mappedBy": [    "string"  ]}
DELETE/roles/{id}

Path Parameters

id*string
Formatuuid

Response Body

curl -X DELETE "https://example.com/roles/497f6eca-6276-4993-bfeb-53cbbbba6f08"
Empty
PUT/roles/{id}

Path Parameters

id*string
Formatuuid

Request Body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X PUT "https://example.com/roles/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "permissions": [      "string"    ]  }'
{  "id": "string",  "name": "string",  "description": "string",  "permissions": [    "string"  ],  "isBuiltIn": true,  "builtInKey": "string",  "activityId": "string",  "activityName": "string",  "grants": 0,  "mappedBy": [    "string"  ]}