Dokumentacja AlgoJudge0.1
REST reference

Users

Ta strona jest po angielsku

Polskie tłumaczenie obejmuje sekcje Instalacja i utrzymanie i Korzystanie z AlgoJudge. Pozostałe sekcje są materiałem technicznym i pozostają po angielsku.
GET/users

Query Parameters

q?string

Response Body

curl -X GET "https://example.com/users"
[  {    "id": "string",    "username": "string",    "name": "string",    "email": "string"  }]
POST/users

Request Body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://example.com/users" \  -H "Content-Type: application/json" \  -d '{    "username": "string"  }'
{  "userId": "string",  "username": "string",  "password": "string"}
GET/users/managed

Query Parameters

page?integer
Formatint32
pageSize?integer
Formatint32
search?string
includeBlocked?boolean
temporaryOnly?boolean

Response Body

curl -X GET "https://example.com/users/managed"
{  "items": [    {      "id": "string",      "username": "string",      "firstName": "string",      "lastName": "string",      "email": "string",      "emailConfirmed": true,      "approvedAt": "string",      "note": "string",      "tags": [        "string"      ],      "isTemporary": true,      "expiresAt": "string",      "blockedAt": "string",      "blockedReason": "string",      "createdAt": "string",      "lastSeenAt": "string",      "grantCount": 0    }  ],  "total": 0,  "page": 0,  "pageSize": 0}
POST/users/temporary

Request Body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://example.com/users/temporary" \  -H "Content-Type: application/json" \  -d '{    "prefix": "string",    "count": 0  }'
[  {    "userId": "string",    "username": "string",    "password": "string"  }]
PUT/users/{id}

Path Parameters

id*string

Request Body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X PUT "https://example.com/users/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "string",  "username": "string",  "firstName": "string",  "lastName": "string",  "email": "string",  "emailConfirmed": true,  "approvedAt": "string",  "note": "string",  "tags": [    "string"  ],  "isTemporary": true,  "expiresAt": "string",  "blockedAt": "string",  "blockedReason": "string",  "createdAt": "string",  "lastSeenAt": "string",  "grantCount": 0}
POST/users/{id}/blocked

Path Parameters

id*string

Request Body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://example.com/users/string/blocked" \  -H "Content-Type: application/json" \  -d '{    "blocked": true  }'
{  "id": "string",  "username": "string",  "firstName": "string",  "lastName": "string",  "email": "string",  "emailConfirmed": true,  "approvedAt": "string",  "note": "string",  "tags": [    "string"  ],  "isTemporary": true,  "expiresAt": "string",  "blockedAt": "string",  "blockedReason": "string",  "createdAt": "string",  "lastSeenAt": "string",  "grantCount": 0}
POST/users/{id}/merge-preview

Path Parameters

id*string

Request Body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://example.com/users/string/merge-preview" \  -H "Content-Type: application/json" \  -d '{    "targetUserId": "string"  }'
{  "sourceUserId": "string",  "sourceLogin": "string",  "sourceName": "string",  "sourceIsTemporary": true,  "targetUserId": "string",  "targetLogin": "string",  "targetName": "string",  "submissions": 0,  "questions": 0,  "activities": 0,  "activityNames": [    "string"  ],  "blockers": [    "string"  ]}
POST/users/{id}/merge

Path Parameters

id*string

Request Body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://example.com/users/string/merge" \  -H "Content-Type: application/json" \  -d '{    "targetUserId": "string"  }'
{  "id": "string",  "sourceUserId": "string",  "targetUserId": "string",  "mergedAt": "string",  "mergedByUserId": "string",  "anonymiseAfter": "string",  "sourceAnonymisedAt": "string",  "undoneAt": "string",  "canUndo": true}
POST/users/merges/{mergeId}/undo

Path Parameters

mergeId*string
Formatuuid

Response Body

curl -X POST "https://example.com/users/merges/497f6eca-6276-4993-bfeb-53cbbbba6f08/undo"
{  "id": "string",  "sourceUserId": "string",  "targetUserId": "string",  "mergedAt": "string",  "mergedByUserId": "string",  "anonymiseAfter": "string",  "sourceAnonymisedAt": "string",  "undoneAt": "string",  "canUndo": true}
POST/users/{id}/approve

Path Parameters

id*string

Response Body

curl -X POST "https://example.com/users/string/approve"
{  "id": "string",  "username": "string",  "firstName": "string",  "lastName": "string",  "email": "string",  "emailConfirmed": true,  "approvedAt": "string",  "note": "string",  "tags": [    "string"  ],  "isTemporary": true,  "expiresAt": "string",  "blockedAt": "string",  "blockedReason": "string",  "createdAt": "string",  "lastSeenAt": "string",  "grantCount": 0}
POST/users/{id}/password

Path Parameters

id*string

Response Body

curl -X POST "https://example.com/users/string/password"
{  "userId": "string",  "username": "string",  "password": "string"}
GET/users/{userId}/sessions

Path Parameters

userId*string

Response Body

curl -X GET "https://example.com/users/string/sessions"
[  {    "id": "string",    "connections": 0,    "startedAt": "string",    "lastRequestAt": "string",    "lastRequestPath": "string",    "ipAddress": "string",    "userAgent": "string",    "expiresAt": "string",    "isCurrent": true  }]