Description:
Returns a list of sample achievements
Resource URL:
https://<apphost>.competitionlabs.com/api/<your-space-name>/achievements/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>" --header "Content-Type: application/json" --request GET https://app.competitionlabs.com/api/tester/achievements/sample
Response Expand source
{ "data": [ { "jsonClass": "Achievement", "name": "Daily Login", "accountId": "8tznJ24BIQF2eta6-VjU", "description": "Daily login sample", "initialState": 1, "icon": "89znJ24BIQF2eta6-lgG", "ruleSets": [ { "jsonClass": "RuleSet", "priority": 1, "scope": "achievement", "action": "member.achievement", "conditions": [ { "jsonClass": "MainConditionSet", "matchCondition": "All", "mustEvaluateTo": true, "rules": [ { "jsonClass": "MainRule", "fact": "a", "operator": "==", "constant": "true", "subConditions": [ { "jsonClass": "SubConditionSet", "matchCondition": "All", "mustEvaluateTo": true, "subRules": [ { "jsonClass": "SubRule", "fact": "b", "operator": "==", "constant": "false" } ] } ] } ] } ] } ], "deprecated": false, "dependantOn": [], "minimumShouldMatch": 0, "scheduling": { "scheduleType": "Once", "scheduleOccurrencesLimit": 1, "every": [], "startDate": "2019-11-01T16:59:04.583+0000", "onlyAggregateOnActiveDays": false }, "achievementLiveStatus": "Draft", "category": [ "new" ], "memberGroups": [ "new group" ], "metadata": [ { "jsonClass": "Metadata", "key": "k1", "value": "k1v1" }, { "jsonClass": "Metadata", "key": "k1", "value": "k1v2" }, { "jsonClass": "Metadata", "key": "k2", "value": "k2v1" } ], "created": "2019-11-01T16:59:04.583+0000", "id": "9NznJ24BIQF2eta6-lgH", "translations": { "af": [ { "jsonClass": "Translation", "fieldName": "label", "text": "My Prestasie" } ] }, "translatableFields": [ "name", "description" ] } }
ERROR CODES
Code | HTTP Status | Description | Example |
---|---|---|---|
1007 | 404 |
|
Error Response 404 Expand source
{ "errors": [ { "message": "A record with requested id was not found.", "code": 1007, "status": 404 } ] }
Error Response 404 Expand source
{ "errors": [ { "message": "No key found for value - [123345567888edgddfgdrgd]", "code": 1007, "status": 404 } ] }
Error Response 404 Expand source
{ "errors": [ { "message": "No account found for space name - [test]", "code": 1007, "status": 404 } ] } |
401 | The X-API-KEY is missing |
Error Response 401 Expand source
{ "status": 401 } |