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

Edit a challenge's own fields

PATCH/api/admin/challenges/{id}
Path parameters
idstringrequired
Request body
requiredapplication/json
titlestring
min length 1 · max length 200
categoryIdstring
min length 1
difficultyIdstring
min length 1
descriptionstring
min length 1
pointsinteger
min 1 · max 9007199254740991
maxAttemptsinteger | null
Show properties
Any of:
integer
integer
null
null
userSolvesVisibleboolean
scoringTypestring
Allowed:statictime_basedsolve_rate
initialPointsinteger | null
Show properties
Any of:
integer
integer
null
null
minimumPointsinteger
min 0 · max 9007199254740991
decayFactorinteger
min 0 · max 100
containerSpecobject | null
Show properties
Any of:
object
sizestring
Allowed:smlxl
servicesobject[]required
min items 1 · max items 5
Show properties
Array of object
namestringrequired
matches ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$
imagestringrequired
min length 1
commandstring[]
max items 64
environmentobject
portsobject[]
max items 2
Show properties
Array of object
portintegerrequired
min 1 · max 65535
kindstringrequired
Allowed:webtcp
null
null
Responses
200

Response for status 200

Any of:
object
idstringrequired
titlestringrequired
statusstringrequired
Allowed:hiddenshownlocked
releaseAtstring<date-time> | nullrequired
Show properties
Any of:
string<date-time>
string<date-time>
null
null
pointsnumberrequired
scoringTypestringrequired
Allowed:statictime_basedsolve_rate
initialPointsnumber | nullrequired
Show properties
Any of:
number
number
null
null
minimumPointsnumber | nullrequired
Show properties
Any of:
number
number
null
null
decayFactornumber | nullrequired
Show properties
Any of:
number
number
null
null
dynamicFlagbooleanrequired
containerSpecobject | nullrequired
Show properties
Any of:
object
sizestring
Allowed:smlxl
servicesobject[]required
min items 1 · max items 5
Show properties
Array of object
namestringrequired
matches ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$
imagestringrequired
min length 1
commandstring[]
max items 64
environmentobject
portsobject[]
max items 2
Show properties
Array of object
portintegerrequired
min 1 · max 65535
kindstringrequired
Allowed:webtcp
null
null
null
null
400

Response for status 400

errorstringrequired
401

Unauthorized

errorstringrequired
404

Response for status 404

errorstringrequired
422

Validation failed

typestringrequired
onstringrequired
summarystring
messagestring
foundany
propertystring
expectedstring
429

Response for status 429

errorstringrequired
500

Unhandled server error

errorstringrequired
Try it
Server
Parameters
Bodyapplication/json
Request
curl -X PATCH '/api/admin/challenges/string' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "title": "string",
  "categoryId": "string",
  "difficultyId": "string",
  "description": "string",
  "points": 1,
  "maxAttempts": 0,
  "userSolvesVisible": true,
  "scoringType": "static",
  "initialPoints": 1,
  "minimumPoints": 0,
  "decayFactor": 0,
  "containerSpec": {
    "size": "s",
    "services": [
      {
        "name": "string",
        "image": "string",
        "command": [
          "string"
        ],
        "environment": {
          "property1": "string",
          "property2": "string"
        },
        "ports": [
          {
            "port": 1,
            "kind": "web"
          }
        ]
      }
    ]
  }
}'
Response
{
  "id": "string",
  "title": "string",
  "status": "hidden",
  "releaseAt": "2019-08-24T14:15:22Z",
  "points": 0,
  "scoringType": "static",
  "initialPoints": 0,
  "minimumPoints": 0,
  "decayFactor": 0,
  "dynamicFlag": true,
  "containerSpec": {
    "size": "s",
    "services": [
      {
        "name": "string",
        "image": "string",
        "command": [
          "string"
        ],
        "environment": {
          "property1": "string",
          "property2": "string"
        },
        "ports": [
          {
            "port": 1,
            "kind": "web"
          }
        ]
      }
    ]
  }
}