Skip to content
Athena User Guide
Esc
↑↓navigate↵open⌘Jpreview

Apply an idempotent event settings operation

Any admin key may change the event’s shell settings. Game settings (tick, flag validity, checker timeout, scoring weights, roster deadline) and the schedule are accepted only from the organizer panel’s key, which keeps the event and the Athena account in step; an organizer key is refused with 403 for those fields.

PATCH/api/admin/config
Authorization
AuthorizationBearer token · headerrequired
Request body
requiredapplication/json
operationIdstringrequired
min length 1 · max length 128
expectedVersionintegerrequired
max 9007199254740991
settingsobjectrequired
Show properties
ctfThemestringrequired
min length 1
ctfNamestringrequired
min length 1
ctfDescriptionstringrequired
heroTitlestring | null
Show properties
Any of:
string
string
null
null
startDatestring<date-time>required
matches ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
freezeDatestring<date-time>required
matches ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
endDatestring<date-time>required
matches ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
ctfLogoUrlstring | null
Show properties
Any of:
string
string
null
null
registrationOpenbooleanrequired
default: true
maxTeamSizeinteger | null
Show properties
Any of:
integer
integer
null
null
reportNotificationEmailsstring<email>[]required
max items 10
exportIncludeEmailsbooleanrequired
default: false
marketingobject
Show properties
hostedBystring
prizePoolstring
categoriesstring[]required
default: []
discordUrlstring
writeupsUrlstring
contactUrlstring
rulesstringrequired
default: ""
faqobject[]required
default: []
Show properties
Array of object
questionstringrequired
answerstringrequired
rosterDeadlinestring<date-time>required
matches ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
tickSecondsintegerrequired
min 60 · max 300
flagValidityTicksintegerrequired
min 1 · max 20
checkerTimeoutSecondsintegerrequired
max 9007199254740991
scoringWeightsobjectrequired
Show properties
slaUpnumberrequired
min 0 · default: 3
slaRecoveringnumberrequired
min 0 · default: 1.5
defenceBasenumberrequired
min 0 · default: 2
defenceWeightnumberrequired
min 0 · default: 1
attackBasenumberrequired
min 0 · default: 1
attackWeightnumberrequired
min 0 · default: 1
rankWeightnumberrequired
min 0 · default: 1
rankReductionbooleanrequired
default: false
reductionMinnumberrequired
min 0 · max 1 · default: 0
reductionMaxnumberrequired
min 0 · max 1 · default: 0.8
Responses
200

Success

updatedbooleanrequired
versionnumberrequired
changedKeysstring[]required
operationIdstringrequired
synchronizedbooleanrequired
401

Unauthorized

Any of:
object
errorstringrequired
object
errorstringrequired
403

Forbidden

errorstringrequired
404

Not found

errorstringrequired
409

Conflict

errorstringrequired
422

Validation failed

typestringrequired
onstringrequired
summarystring
messagestring
foundany
propertystring
expectedstring
500

Unhandled server error

errorstringrequired
Try it
Server
Authorization
Bodyapplication/json
Request
curl -X PATCH '/api/admin/config' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "operationId": "string",
  "expectedVersion": 1,
  "settings": {
    "ctfTheme": "string",
    "ctfName": "string",
    "ctfDescription": "string",
    "heroTitle": "string",
    "startDate": "2019-08-24T14:15:22Z",
    "freezeDate": "2019-08-24T14:15:22Z",
    "endDate": "2019-08-24T14:15:22Z",
    "ctfLogoUrl": "string",
    "registrationOpen": true,
    "maxTeamSize": 1,
    "reportNotificationEmails": [
      "user@example.com"
    ],
    "exportIncludeEmails": false,
    "marketing": {
      "hostedBy": "string",
      "prizePool": "string",
      "categories": [],
      "discordUrl": "string",
      "writeupsUrl": "string",
      "contactUrl": "string"
    },
    "rules": "",
    "faq": [],
    "rosterDeadline": "2019-08-24T14:15:22Z",
    "tickSeconds": 60,
    "flagValidityTicks": 1,
    "checkerTimeoutSeconds": 1,
    "scoringWeights": {
      "slaUp": 3,
      "slaRecovering": 1.5,
      "defenceBase": 2,
      "defenceWeight": 1,
      "attackBase": 1,
      "attackWeight": 1,
      "rankWeight": 1,
      "rankReduction": false,
      "reductionMin": 0,
      "reductionMax": 0.8
    }
  }
}'
Response
{
  "updated": true,
  "version": 0,
  "changedKeys": [
    "string"
  ],
  "operationId": "string",
  "synchronized": true
}