Dokumentacja AlgoJudge0.1
REST reference

Runner

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.
POST/runner/register

Request Body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://example.com/runner/register" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "publicKey": "string",    "problemTypes": [      "string"    ]  }'
{  "runnerId": "string",  "fingerprint": "string",  "state": "string"}
POST/runner/auth/challenge

Request Body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://example.com/runner/auth/challenge" \  -H "Content-Type: application/json" \  -d '{    "fingerprint": "string"  }'
{  "nonce": "string",  "expiresAt": "string"}
POST/runner/auth/token

Request Body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://example.com/runner/auth/token" \  -H "Content-Type: application/json" \  -d '{    "fingerprint": "string",    "nonce": "string",    "signature": "string"  }'
{  "token": "string",  "expiresAt": "string"}
POST/runner/jobs/claim

Request Body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://example.com/runner/jobs/claim" \  -H "Content-Type: application/json" \  -d '{}'
{  "jobId": "string",  "submissionId": "string",  "attempt": 0,  "leaseToken": "string",  "leaseExpiresAt": "string",  "problemType": "string",  "problemVersionId": "string",  "packageFileId": "string",  "packageSha256": "string",  "files": [    {      "name": "string",      "fileName": "string",      "language": "string",      "fileId": "string",      "sha256": "string",      "sizeBytes": 0    }  ],  "props": null,  "problemVersionProps": null,  "config": null}
POST/runner/trials/claim

Request Body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://example.com/runner/trials/claim" \  -H "Content-Type: application/json" \  -d '{}'
{  "trialId": "string",  "leaseToken": "string",  "leaseExpiresAt": "string",  "problemType": "string",  "packageFileId": "string",  "packageSha256": "string"}
POST/runner/trials/{trialId}/report

Path Parameters

trialId*string
Formatuuid

Request Body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://example.com/runner/trials/497f6eca-6276-4993-bfeb-53cbbbba6f08/report" \  -H "Content-Type: application/json" \  -d '{    "leaseToken": "string"  }'
{  "trialId": "string",  "state": "string",  "duplicate": true}
POST/runner/trials/{trialId}/lease

Path Parameters

trialId*string
Formatuuid

Request Body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://example.com/runner/trials/497f6eca-6276-4993-bfeb-53cbbbba6f08/lease" \  -H "Content-Type: application/json" \  -d '{    "leaseToken": "string"  }'
{  "trialId": "string",  "leaseToken": "string",  "leaseExpiresAt": "string"}
POST/runner/jobs/{jobId}/report

Path Parameters

jobId*string
Formatuuid

Request Body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://example.com/runner/jobs/497f6eca-6276-4993-bfeb-53cbbbba6f08/report" \  -H "Content-Type: application/json" \  -d '{    "leaseToken": "string"  }'
{  "resultId": "string",  "state": "string",  "duplicate": true}
POST/runner/heartbeat

Response Body

curl -X POST "https://example.com/runner/heartbeat"
Empty
POST/runner/jobs/{jobId}/lease

Path Parameters

jobId*string
Formatuuid

Request Body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://example.com/runner/jobs/497f6eca-6276-4993-bfeb-53cbbbba6f08/lease" \  -H "Content-Type: application/json" \  -d '{    "leaseToken": "string"  }'
{  "jobId": "string",  "leaseToken": "string",  "leaseExpiresAt": "string"}
POST/runner/jobs/{jobId}/release

Path Parameters

jobId*string
Formatuuid

Request Body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://example.com/runner/jobs/497f6eca-6276-4993-bfeb-53cbbbba6f08/release" \  -H "Content-Type: application/json" \  -d '{    "leaseToken": "string"  }'
Empty
POST/runner/jobs/{jobId}/progress

Path Parameters

jobId*string
Formatuuid

Request Body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://example.com/runner/jobs/497f6eca-6276-4993-bfeb-53cbbbba6f08/progress" \  -H "Content-Type: application/json" \  -d '{    "leaseToken": "string"  }'
Empty
GET/runner/files/{id}

Path Parameters

id*string
Formatuuid

Response Body

curl -X GET "https://example.com/runner/files/497f6eca-6276-4993-bfeb-53cbbbba6f08"
Empty
POST/runner/files

Request Body

multipart/form-data

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://example.com/runner/files" \  -F file="string" \  -F sha256="string"
{  "id": "string",  "name": "string",  "mimeType": "string",  "sizeBytes": 0,  "sha256": "string",  "createdAt": "string"}
POST/runner/jobs/{jobId}/files

Path Parameters

jobId*string
Formatuuid

Request Body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://example.com/runner/jobs/497f6eca-6276-4993-bfeb-53cbbbba6f08/files" \  -H "Content-Type: application/json" \  -d '{    "leaseToken": "string",    "fileId": "string",    "name": "string"  }'
Empty
POST/runner/files/attach

Request Body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://example.com/runner/files/attach" \  -H "Content-Type: application/json" \  -d '{    "fileId": "string",    "name": "string"  }'
Empty