POST (Header:PUT) api.ashx/v2/achievement/{id}.{json|xml}
Request Parameters
Name | Type | Location | Description | Required | Default | Options |
---|---|---|---|---|---|---|
AutomationConfiguration | string | Request Body | Querystring encoded configuration values used by the selected automation for this achievement. | Optional | ||
AutomationId | Guid | Request Body | Identifies the ID of the automation used to automatically award/revoke this achievement. | Optional | ||
BadgeIconData | Byte[] | Request Body | Data of the file representing the badge for the Achievement. If BadgeIconName is specified, either BadgeIconData or BadgeIconUploadContext is required. OBSOLETE in 12: Use BadgeIconUploadContext instead. | Optional | ||
BadgeIconName | string | Request Body | Name of the file representing the badge for the Achievement | Optional | ||
BadgeIconUploadContext | string | Request Body | Upload context of the file representing the badge for the Achievement. Either BadgeIconData or BadgeIconUploadContext is required. | Optional | ||
Criteria | string | Request Body | Criteria to earn the Achievement | Optional | ||
Enabled | bool | Request Body | Enabled state of the achievement, whether it can be earned. | Optional | ||
Id | Guid | Request Body | Id of the Achievement | Required | ||
RemoveAutomation | bool | Request Body | Removes the automation used by this achievement. | Optional | ||
Title | string | Request Body | Title of the Achievement | Optional |
Example Requests
Widget Javascript
jQuery.telligent.evolution.put({ url: jQuery.telligent.evolution.site.getBaseUrl() + 'api.ashx/v2/achievement/{id}.json', data: { 'id': '49fec544-6df7-4a82-872b-f8be586d5e9e' } }).then(function(response) { // use response });
Example Responses
JSON
{ "Achievement": { "Id": "49fec544-6df7-4a82-872b-f8be586d5e9e", "Title": "title", "Criteria": "criteria", "BadgeIconUrl": "badgeiconurl", "Enabled": true, "CreatedDate": "2012-01-04T00:00:00", "AutomationId": "9f5a6721-639d-4e1d-ab6a-ce63b7750f46", "AutomationConfiguration": {}, "ContentId": "49fec544-6df7-4a82-872b-f8be586d5e9e", "Url": "/achievements/49fec544-6df7-4a82-872b-f8be586d5e9e", "Application": { "Id": 1, "DateCreated": "2022-05-11T02:22:50.387", "Description": "", "Key": "root", "Name": "Trunk", "ParentGroupId": -1, "Url": "http://trunk.local.computer/", "GroupType": "Joinless", "EnableGroupMessages": true, "EnableContact": false, "TotalMembers": 0, "HasGroups": true, "PendingMembers": 0, "AvatarUrl": "/cfs-file/__key/communityserver-wikis-components-files/00-00-00-13-86/4863.defaulthub.gif", "GroupCount": 3, "ThemeId": "3fc3f824-83d1-4ec4-85ef-92e206116d49", "ApplicationId": "450fe9a1-32b6-4156-98da-c7d518fba6fe", "ContainerId": "450fe9a1-32b6-4156-98da-c7d518fba6fe", "ExtendedAttributes": [], "Warnings": [], "Errors": [] }, "Warnings": [], "Errors": [] }, "Errors": [ "string", "string" ] }
XML
<?xml version="1.0" encoding="utf-16"?> <Response> <Achievement> <Id>49fec544-6df7-4a82-872b-f8be586d5e9e</Id> <Title>title</Title> <Criteria>criteria</Criteria> <BadgeIconUrl>badgeiconurl</BadgeIconUrl> <Enabled>true</Enabled> <CreatedDate>2012-01-04T00:00:00</CreatedDate> <AutomationId>9f5a6721-639d-4e1d-ab6a-ce63b7750f46</AutomationId> </Achievement> <Errors> <Message>string</Message> <Message>string</Message> </Errors> </Response>