GET /api/:space/competitions
Description:
Returns a list of Competitions.
This assumes that competitions have first been created using the web console otherwise no data will be returned and the value of the "totalRecordsFound" variable in metadata will be 0.
GET responses can be filtered out based on the competition parameters to narrow down the results. CompetitionLabs provides a fully queryable API.
Resource URL:
https://<apphost>.competitionlabs.com/api/<your-space-name>/competitions
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 |
Additional Query String Parameters
You can use the query parameters along with the generic parameters.
Query parameters
Parameter | Type | Constraint | Usage |
---|---|---|---|
competitionType | String | Case sensitive | ?competitionType=search_word (you can find the Enum list in the Competitions model) |
entrantMemberType | String | Case sensitive | ?entrantMemberType=search_word (you can find the Enum list in the Competitions model) |
numberOfRounds | Integer | Numbers only | ?numberOfRounds=search_number |
label | String | Case insensitive. For lookup you would use "label.raw=search_word" because the field "label" is indexed to support more complex searches | ?label.raw=search_word |
description | String | Case sensitive | ?description=search_word |
termsConditions | String | Case sensitive | ?termsConditions=search_word |
options | Object | Complex search applies, allows full search on a complex object of Option | ?options.numberOfEntrants.minimum=search_number |
metadata | Array [Object] | Complex search applies, allows full search on a complex object of Metadata | ?metadata.key=search_word |
status | String | Case sensitive | ?status=search_word (you can find the Enum list in the Competitions model) |
statusCode | Integer | Numbers only | ?statusCode=search_number (you can find the Enum list in the Competitions model) |
created | DateTime | Works with simple dates or date and time, eg: created=2016-02-07, created=2018-08-23T14:23:09 | ?created=search_DateTime |
id | String | Case sensitive | ?id=search_string |
Code | HTTP Status | Description | Example |
---|---|---|---|
404 | The Request URL is incorrect |