Description:
Returns a list of sample competitions.
Resource URL:
https://<apphost>.competitionlabs.com/api/<you-space-name>/competitions/sample
Request header
| Key | Value | Required |
|---|---|---|
X-API-KEY | Your unique API key | Yes |
Content-Type | application/json | Yes |
Request URL parameter
Parameter | Type | Required | Description |
|---|---|---|---|
space | String | Yes | This is the space name which is linked to the account |
EXAMPLE
Request Expand source
curl --header "X-API-KEY: <your-api-key>" --request GET https://app.competitionlabs.com/api/<your-space-name>/competitions/sample
Response Expand source
{
"data": {
"jsonClass": "Competition",
"accountId": "z8AqWm0BVUycDcfqYxSk",
"competitionType": "Leaderboard",
"entrantMemberType": "Individual",
"allowMultipleEntriesPerRound": true,
"numberOfRounds": 1,
"numberOfGroupStages": 1,
"label": "My Comp",
"description": "A comp",
"termsConditions": "terms and conditions",
"options": {
"numberOfEntrants": {
"jsonClass": "MaxMin",
"maximum": 1000,
"minimum": 1
},
"products": [
{
"jsonClass": "Product",
"name": "Pokeable",
"productType": "Cards",
"accountId": "z8AqWm0BVUycDcfqYxSk",
"description": "1st product created.",
"adjustmentFactor": 4.12,
"productRefId": "ex-product-ref-sample-id-0",
"actionAdjustmentFactors": [
{
"ruleActionHelper": {
"jsonClass": "RuleActionHelper",
"name": "Daily Login",
"key": "daily-login",
"description": "daily login bonus",
"accountId": "z8AqWm0BVUycDcfqYxSk",
"system": true,
"unitOfMeasureType": "Time",
"metadata": [
{
"jsonClass": "Metadata",
"key": "k1",
"value": "k1v1"
},
{
"jsonClass": "Metadata",
"key": "k1",
"value": "k1v2"
},
{
"jsonClass": "Metadata",
"key": "k2",
"value": "k2v1"
}
],
"created": "2019-09-22T18:09:50.611+0000",
"id": "0sAqWm0BVUycDcfqZBQT"
},
"adjustmentFactor": 1.0
}
],
"productGroups": [
"Slot games"
],
"metadata": [
{
"jsonClass": "Metadata",
"key": "k1",
"value": "k1v1"
},
{
"jsonClass": "Metadata",
"key": "k1",
"value": "k1v2"
},
{
"jsonClass": "Metadata",
"key": "k2",
"value": "k2v1"
}
],
"created": "2019-09-22T18:09:50.611+0000",
"id": "08AqWm0BVUycDcfqZBQT"
}
],
"ruleSets": [
{
"jsonClass": "RuleSet",
"priority": 1,
"scope": "Competition",
"action": "start.competitions",
"conditions": [
{
"jsonClass": "MainConditionSet",
"matchCondition": "All",
"mustEvaluateTo": true,
"rules": [
{
"jsonClass": "MainRule",
"fact": "number.of.entrants.accepted",
"operator": ">=",
"constant": "1"
},
{
"jsonClass": "MainRule",
"fact": "competitions.status",
"operator": "==",
"constant": "3"
}
]
}
]
}
],
"isPublic": true,
"autoStart": true,
"autoStartRetryInterval": 60000,
"autoStop": true,
"autoStopRetryInterval": 60000,
"scheduledDates": {
"jsonClass": "StartEndDate",
"start": "2019-09-24T03:32:18.539+0000",
"end": "2019-09-24T05:32:18.539+0000"
},
"limitEntrantsTo": [
"vip"
],
"includeEntrantsWhere": {
"filters": [],
"must": [
"vip"
],
"shouldMatchAtLeast": 1
},
"optinRequiredForEntrants": true,
"useGlobalEvents": true
},
"metadata": [
{
"jsonClass": "Metadata",
"key": "k1",
"value": "k1v1"
},
{
"jsonClass": "Metadata",
"key": "k1",
"value": "k1v2"
},
{
"jsonClass": "Metadata",
"key": "k2",
"value": "k2v1"
}
],
"created": "2019-09-24T03:32:18.539+0000",
"id": "NMBTYW0BVUycDcfqsxbr",
"translations": {
"aa": [
{
"jsonClass": "Translation",
"fieldName": "a",
"text": "b"
}
]
},
"translatableFields": [
"label",
"description",
"termsConditions"
]
}
}
ERROR CODES
| Code | HTTP Status | Description | Example |
|---|---|---|---|
| 1007 | 404 | Competition with CL-compId not found for the accountId |
Error Response 404 Expand source
{
"errors": [
{
"message": "Competition with CL-compId: samples not found for the account: QmTaPGUBsZyUBGOR_u9A.",
"code": 1007,
"status": 404
}
]
}
|