Description:
Returns contest details for the contest identifier specified.
Resource URL:
https://<apphost>.competitionlabs.com/api/<your-space-name>/competitions/<competitionId>/contests/<contestId>
Request Header:
| Key | Value | Required |
|---|---|---|
X-API-KEY | Your unique API key | Yes |
Content-Type | application/json | Yes |
Request URL Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
space | String | Yes | This is the space name which is linked to the account |
competitionId | String | Yes | Competition identifier retrieved from GET Competitions resource |
contestId | String | Yes | Contest identifier retrieved from GET Contests request |
EXAMPLE
Request Expand source
curl
--header "X-API-KEY: <your-api-key>"
--request GET https://app.competitionlabs.com/api/<your-space-name>/competitions/W8A7Y20BVUycDcfqaBav/contests/XsA7Y20BVUycDcfqaBa8
Response Expand source
{
"data": {
"jsonClass": "Contest",
"accountId": "0sn4DmUBkPH_lz9GgxBM",
"competitionId": "W8A7Y20BVUycDcfqaBav",
"number": 0,
"label": "Test",
"description": "",
"termsConditions": "",
"round": 1,
"roundType": "TimeBound",
"entrantsFromContest": [],
"options": {
"numberOfEntrants": {
"jsonClass": "MaxMin",
"minimum": 0
},
"products": [],
"ruleSets": [
{
"jsonClass": "RuleSet",
"priority": 1,
"scope": "contest",
"action": "contests.points.calculated.by",
"conditions": [
{
"jsonClass": "MainConditionSet",
"matchCondition": "All",
"mustEvaluateTo": true,
"rules": [
{
"jsonClass": "MainRule",
"fact": "event.action.type",
"operator": "==",
"constant": "bet"
}
]
}
]
},
{
"jsonClass": "RuleSet",
"priority": 2,
"scope": "contest",
"action": "open.contests",
"conditions": [
{
"jsonClass": "MainConditionSet",
"matchCondition": "All",
"mustEvaluateTo": true,
"rules": [
{
"jsonClass": "MainRule",
"fact": "contests.parents.status",
"operator": "==",
"constant": "$finalised.status"
}
]
}
]
},
{
"jsonClass": "RuleSet",
"priority": 3,
"scope": "contest",
"action": "finish.contests",
"conditions": [
{
"jsonClass": "MainConditionSet",
"matchCondition": "All",
"mustEvaluateTo": true,
"rules": [
{
"jsonClass": "MainRule",
"fact": "contests.active.elapsed",
"operator": ">=",
"constant": "$competitions.scheduled.end"
}
]
}
]
},
{
"jsonClass": "RuleSet",
"priority": 4,
"scope": "contest",
"action": "finalise.contests",
"conditions": [
{
"jsonClass": "MainConditionSet",
"matchCondition": "All",
"mustEvaluateTo": true,
"rules": [
{
"jsonClass": "MainRule",
"fact": "contests.finish.elapsed",
"operator": ">=",
"constant": "1"
}
]
}
]
}
],
"isPublic": true,
"autoStart": true,
"autoStartRetryInterval": 1000,
"autoStop": true,
"autoStopRetryInterval": 1000,
"scheduledDates": {
"jsonClass": "StartEndDate",
"start": "2019-09-24T12:54:00.000+0000",
"end": "2019-09-24T13:54:00.000+0000"
},
"actualDates": {
"jsonClass": "StartEndDate"
},
"optinRequiredForEntrants": false,
"useGlobalEvents": false,
"strategies": {
"jsonClass": "Strategies",
"strategyType": "TotalCumulative",
"rankingStrategy": {
"jsonClass": "RankingStrategy",
"scoreDesc": true,
"timeDesc": false,
"scoreFirst": true,
"ignoreTime": true,
"ignoreScore": false
},
"scoringStrategy": {
"jsonClass": "ScoringStrategy",
"limitUpdatesTo": 0,
"sumBestXOf": 0,
"lastUpdateTimeStamp": 0,
"recordTimeWhenSumReaches": 0.0
}
}
},
"metadata": [],
"created": "2019-09-24T12:25:00.860+0000",
"id": "XsA7Y20BVUycDcfqaBa8",
"translations": {},
"translatableFields": [
"label",
"description",
"termsConditions"
],
"status": "NotStarted",
"statusCode": 0,
"rewards": []
}
}
ERROR CODES
| Code | HTTP Status | Description | Example |
|---|---|---|---|
| 1007 | 404 | A record with requested id was not found |
Error Response 404 Expand source
{
"errors": [
{
"message": "A record with requested id was not found.",
"code": 1007,
"status": 404
}
]
}
|