Skip to content

Building a Client

mcmahj45 edited this page Jul 24, 2026 · 2 revisions

Building a Participating Client

A participating client is a system that submits results to DRES during an evaluation run. This page explains how to get started.


What a Client Needs to Do

At minimum, a client must:

  1. Authenticate — log in with a participant user account to obtain a session token
  2. Submit results — POST answers to the submission endpoint during an active task
  3. Handle responses — check whether submissions were accepted, rejected, or are awaiting judgement

Optionally, a client can also send interaction and result logs.


Submission Endpoint

See the Submission page for the full API reference including request format, answer types, and response codes.


Client Examples

The DRES Client Examples repository provides working examples of participating clients in several languages:

  • Java
  • Kotlin
  • C#
  • TypeScript / Angular

Each example uses the DRES OpenAPI client specification with the OpenAPI Generator to generate the HTTP client code automatically. This means you do not need to write the HTTP calls yourself — only the application logic that decides what to submit.

Getting Started with the Examples

  1. Clone the Client Examples repository
  2. Choose the example in your preferred language
  3. Follow the README.md in that language's folder
  4. The generated client code handles authentication, session management, and the submission request format

Authentication

Log in via:

POST http(s)://{server}/api/v2/login

with a JSON body:

{
  "username": "your-username",
  "password": "your-password"
}

The response contains a session token which must be included in subsequent requests, either via the session cookie or the ?session= query parameter.


Checking the Active Evaluation

To find the evaluation ID your team is currently competing in:

GET http(s)://{server}/api/v2/client/evaluation/list

This returns the list of evaluations your user has access to. The id field from each entry in this response is what you pass as {evaluationId} to the submission endpoint.

To get information about the currently active task (name, duration, time remaining):

GET http(s)://{server}/api/v2/client/evaluation/currentTask/{evaluationId}

Clone this wiki locally