Description:
Returns achievement information for the specified achievement identifier
Resource URL:
https://<apphost>.competitionlabs.com/api/<your-space-name>/achievements/<achievementId>
Key | Value | Required |
---|
X-API-KEY | Your unique API key | Yes |
Content-Type | application/json | Yes |
Request URL parameter
| | | |
---|
space | String | Yes | This is the space name which is linked to the account |
id | String | Yes | Achievement identifier retrieved from GET Achievements resource |
EXAMPLE
curl
--header "X-API-KEY: <your-api-key>"
--header "Content-Type: application/json"
--request GET https://app.competitionlabs.com/api/tester/achievements/vj4bYWUBeag0_3vrTqkW
{
"data": {
"jsonClass": "Achievement",
"name": "test",
"accountId": "QmTaPGUBsZyUBGOR_u9A",
"description": "test",
"initialState": 0,
"icon": "TWTbPGUBsZyUBGORFe_T",
"ruleSets": [
{
"jsonClass": "RuleSet",
"priority": 1,
"scope": "achievement",
"action": "member.achievement",
"conditions": [
{
"jsonClass": "MainConditionSet",
"matchCondition": "All",
"mustEvaluateTo": true,
"rules": [
{
"jsonClass": "MainRule",
"fact": "event.count",
"operator": ">=",
"constant": "0",
"id": "2rPvzGUBOmEkXOJniWMX"
}
]
}
]
}
],
"deprecated": false,
"dependantOn": [],
"minimumShouldMatch": 0,
"scheduling": {
"scheduleType": "Once",
"every": [],
"scheduleOccurrencesLimit": 1,
"startDate": "2018-08-22T10:06:00.000+00:00",
"onlyAggregateOnActiveDays": false
},
"achievementLiveStatus": "Test",
"category": [],
"memberGroups": [],
"metadata": [],
"created": "2018-08-22T10:08:24.086+00:00",
"id": "vj4bYWUBeag0_3vrTqkW",
"translations": {},
"translatableFields": [
"name",
"description"
]
}
}
ERROR CODES
Code | HTTP Status | Description | Example |
---|
1007 | 404 | - A record with requested id was not found
- The X-API-KEY is incorrect
- Incorrect space name
|
{
"errors": [
{
"message": "A record with requested id [NswEVGcB4wBRS3KFW0GFa] for achievements was not found.",
"code": 1007,
"status": 404
}
]
}
{
"errors": [
{
"message": "No key found for value - [123345567888edgddfgdrgd]",
"code": 1007,
"status": 404
}
]
}
{
"errors": [
{
"message": "No account found for space name - [test]",
"code": 1007,
"status": 404
}
]
}
|
| 404 | The Request URL is incorrect | |
| 401 | The X-API-KEY is missing | |