GET /api/:space/competitions/:id/brackets

Description:

Returns a competitions list of contents for the ID specified in bracket format.

Resource URL:

https://<apphost>.competitionlabs.com/api/<your-space-name>/competitions/<competitionId>/brackets

Request header

KeyValueRequired
X-API-KEY
Your unique API keyYes
Content-Type
application/jsonYes

Request URL parameter

Parameter
Type
Required
Description
space
StringYesThis is the space name which is linked to the account
id
StringYesCompetition identifier retrieved from GET Competitions resource.

EXAMPLE

Request
curl
--header "X-API-KEY: <your-api-key>"
--request GET https://app.competitionlabs.com/api/<your-space-name>/competitions/6U71m2oBN4riPfvG12jT/brackets
Response
{
	"data": {
        "jsonClass": "Brackets",
        "competitionId": "6U71m2oBN4riPfvG12jT",
        "rounds": 2,
        "contests": [
            {
                "jsonClass": "Contest",
                "accountId": "FuyNjGYBZ-qHKtWicfwh",
                "competitionId": "6U71m2oBN4riPfvG12jT",
                "number": 0,
                "label": "test1",
                "description": "",
                "termsConditions": "",
                "round": 1,
                "roundType": "TimeBound",
                "entrantsFromContest": [],
                "options": {
                    "numberOfEntrants": {
                        "jsonClass": "MaxMin",
                        "minimum": 1
                    },
                    "products": [],
                    "ruleSets": [],
                    "isPublic": true,
                    "autoStart": true,
                    "autoStartRetryInterval": 1000,
                    "autoStop": true,
                    "autoStopRetryInterval": 1000,
                    "scheduledDates": {
                        "jsonClass": "StartEndDate",
                        "start": "2019-05-09T10:08:00.000+00:00",
                        "end": "2019-05-09T11:08:00.000+00:00"
                    },
                    "actualDates": {
                        "jsonClass": "StartEndDate",
                        "start": "2019-05-09T10:08:11.736+00:00",
                        "end": "2019-05-09T11:08:11.788+00:00"
                    },
                    "optinRequiredForEntrants": false,
                    "useGlobalEvents": false
                },
                "metadata": [],
                "created": "2019-05-09T09:39:13.751+00:00",
                "id": "7k72m2oBN4riPfvGCGjX",
                "translations": {},
                "status": "Finalised",
                "statusCode": 6,
                "translatableFields": [
                    "label",
                    "description",
                    "termsConditions"
                ],
                "rewards": [
                    []
                ]
            },
            {
                "jsonClass": "Contest",
                "accountId": "FuyNjGYBZ-qHKtWicfwh",
                "competitionId": "6U71m2oBN4riPfvG12jT",
                "number": 0,
                "label": "test2",
                "description": "",
                "termsConditions": "",
                "round": 2,
                "roundType": "TimeBound",
                "entrantsFromContest": [],
                "options": {
                    "numberOfEntrants": {
                        "jsonClass": "MaxMin",
                        "minimum": 1
                    },
                    "products": [],
                    "ruleSets": [],
                    "isPublic": true,
                    "autoStart": true,
                    "autoStartRetryInterval": 1000,
                    "autoStop": true,
                    "autoStopRetryInterval": 1000,
                    "scheduledDates": {
                        "jsonClass": "StartEndDate",
                        "start": "2019-05-09T10:08:00.000+00:00",
                        "end": "2019-05-09T11:08:00.000+00:00"
                    },
                    "actualDates": {
                        "jsonClass": "StartEndDate",
                        "start": "2019-05-09T10:08:11.730+00:00",
                        "end": "2019-05-09T11:08:11.797+00:00"
                    },
                    "optinRequiredForEntrants": false,
                    "useGlobalEvents": false
                },
                "metadata": [],
                "created": "2019-05-09T09:39:23.573+00:00",
                "id": "8U72m2oBN4riPfvGL2g1",
                "translations": {},
                "status": "Finalised",
                "statusCode": 6,
                "translatableFields": [
                    "label",
                    "description",
                    "termsConditions"
                ],
                "rewards": [
                    []
                ]
            }
        ]
    }
}

ERROR CODES

CodeHTTP StatusDescriptionExample
1007404A record with requested id was not found.
Error Response 404
{
    "errors": [
        {
            "message": "A record with requested id was not found.",
            "code": 1007,
            "status": 404
        }
    ]
}

404The Request URL is incorrect
Error Response 404
{
    "status": 404
}