Create a new Design Challenge. Besides the information of the challenge itself, you must also specify the rewards for both winning and participating in the challenge, each of which gets an achievement and an emblem reward.
POST /api/v1/design-challenges HTTP/1.1
Content-Type: application/json
Authorization: Bearer ...
{
"name": "Second Challenge",
"ordinal": 2,
"theme": "Second Testing",
"description": "This is also a test challenge!",
"win": {
"achievement": {
"key": "second-win",
"name": "Won Second Challenge",
"description": "Won the Second Challenge!",
"visibilityStart": null,
"visibilityStop": null
},
"emblem": {
"name": "Won Second Challenge",
"description": "Won Second Challenge",
"image": "second-win-emblem.jpg",
"color": "#0000ff"
}
},
"participate": {
"achievement": {
"key": "second-participated",
"name": "Participated in Second Challenge",
"description": "Participated in the Second Challenge!",
"visibilityStart": null,
"visibilityStop": null
},
"emblem": {
"name": "Participated in Second Challenge",
"description": "Participated in Second Challenge",
"image": "second-participated-emblem.jpg",
"color": "#00ff00"
}
}
}
----------------------------------------
HTTP/1.1 201 Created
Location: /design-challenge/5Authentication is required and access is restricted to admins.
NONE
NONE
| Name | Description | Value |
|---|---|---|
| name | the display name | string |
| ordinal | a numerical ordering for challenges | number |
| description | the description | string |
| theme | a short descriptor for the theme of the challenge | string |
| win | the achievement and emblem info for winning the challenge | RewardDefinition |
| participate | the achievement and emblem info for participating in the challenge | RewardDefinition |
| Name | Description | Value |
|---|---|---|
| achievement | achievement definition | AchievementDefinition |
| emblem | emblem definition | EmblemDefinition |
| Name | Description | Value |
|---|---|---|
| key | the key of this achievement | string |
| name | the name of the achievement | string |
| description | the description of the achievement | string |
| visibilityStart | if not null, the time after which this achievement should be generally visible; as a Unix timestamp | number or null |
| visibilityStop | if not null, the time after whcih this achievement should be no longer visible; as a Unix timestamp | number or null |
| Name | Description | Value |
|---|---|---|
| name | the name of the emblem | string |
| description | the description of the emblem | string |
| image | the path to a media bucket image for the emblem | string |
| color | the color of the emblem | string |
Successful responses are code 201 with a Location header containing the newly created ID. Error responses are standard.
NONE