GET /api/:space/achievements/icons

Description:

Returns a list of icons that are already uploaded on the CompetitionLabs api

Resource URL:

https://<apphost>.competitionlabs.com/api/<your-space-name>/achievements/icons

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

Additional Query String Parameters

You can use the query parameters along with the generic parameters.


Query parameters 

Parameter
Type
Constraint
Usage
attachmentType
String

Case sensitive

?attachmentType=search_word
bucketName
StringCase sensitive
?bucketName=search_word
fileName
String

Case sensitive. 

For lookup you would use "fileName.raw=search_word" because the field "fileName" is indexed to support more complex searches

?fileName.raw=search_word
mimeType
StringCase sensitive
?mimeType=search_word
extension
StringCase sensitive
?extension=search_word
locationKey
StringCase sensitive
?locationKey=search_word
locationFolder
String
Case sensitive
?locationFolder=search_word
metadata
Array [Object]Complex search applies, allows full search on a complex object of Metadata
?metadata.key=search_word
?metadata.value=search_number
created
DateTimeWorks with simple dates or date and time, eg: created=2016-02-07, created=2018-08-23T14:23:09
?created=search_DateTime
id
StringCase sensitive
?id=search_word

EXAMPLE

Request
curl
--header "X-API-KEY: <your-api-key>"
--header "Content-Type: application/json"
--request GET https://app.competitionlabs.com/api/tester/achievements/icons
Response
{
    "meta": {
        "totalRecordsFound": 1,
        "skip": 0,
        "limit": 20
    },
    "data": [
        {
            "jsonClass": "Attachment",
            "attachmentType": "achievement-icons",
            "bucketName": "local.competitionlabs.com",
            "md5Hash": "QNdceNuZHMdIV2/0OqizjA==",
            "accountId": "QmTaPGUBsZyUBGOR_u9A",
            "fileName": "8.png",
            "mimeType": "image/png",
            "extension": "png",
            "locationKey": "margarita/achievement-icons/8.png",
            "locationFolder": "margarita/achievement-icons",
            "permission": 744,
            "created": "2018-08-15T09:11:56.845+00:00",
            "metadata": [],
            "id": "UWTbPGUBsZyUBGORGu-t"
        }
    ]
}
Request with Query string parameters
curl
--header "X-API-KEY: <your-api-key>"
--header "Content-Type: application/json"
--request GET https://app.competitionlabs.com/api/tester/achievements/icons?md5Hash=QNdceNuZHMdIV2/0OqizjA==&_limit=1
Response for Query string request
{
    "meta": {
        "totalRecordsFound": 1,
        "skip": 0,
        "limit": 1
    },
    "data": [
        {
            "jsonClass": "Attachment",
            "attachmentType": "achievement-icons",
            "bucketName": "local.competitionlabs.com",
            "md5Hash": "QNdceNuZHMdIV2/0OqizjA==",
            "accountId": "QmTaPGUBsZyUBGOR_u9A",
            "fileName": "8.png",
            "mimeType": "image/png",
            "extension": "png",
            "locationKey": "margarita/achievement-icons/8.png",
            "locationFolder": "margarita/achievement-icons",
            "permission": 744,
            "created": "2018-08-15T09:11:56.845+00:00",
            "metadata": [],
            "id": "UWTbPGUBsZyUBGORGu-t"
        }
    ]
}

ERROR CODES

CodeHTTP StatusDescriptionExample
1007404
  • The X-API-KEY is incorrect
  • Incorrect space name
Error Response 404
{
    "errors": [
        {
            "message": "No key found for value - [123345567888edgddfgdrgd]",
            "code": 1007,
            "status": 404
        }
    ]
}
Error Response 404
{
    "errors": [
        {
            "message": "No account found for space name - [test]",
            "code": 1007,
            "status": 404
        }
    ]
}

404

The Request URL is incorrect

Error Response 404
{
    "status": 404
}

401

The X-API-KEY is missing

Error Response 401
{
    "status": 401
}