Request Parameters
Name | Type | Description | Location | Required | Default | Options |
---|---|---|---|---|---|---|
Id | Guid | Ideation Id | Request Body | Required | ||
Name | string | Ideation Name | Request Body | Optional | ||
ApplicationKey | string | Application Key | Request Body | Optional | ||
Description | string | Description | Request Body | Optional | ||
IsEnabled | bool | Enabled | Request Body | Optional | ||
IsModerated | bool | Moderate | Request Body | Optional | ||
MaximumVotesPerIdea | int | The maximum number of votes a user can cast for a given idea. Setting to zero(0) will allow a user to use as many votes as they have available on any idea. This setting is only valid when multiple votes are permitted. | Request Body | Optional | ||
MaximumVotesPerUser | int | The maximum number of votes a user can cast within this ideation. To reset this back to 1 vote per user per idea, set it to 0. | Request Body | Optional | ||
RequiresCategory | bool | Determines whether ideas created in this ideation must specify a category. | Request Body | Optional | ||
AllowMultipleVotes | bool | Determines whether users can vote on their favorite ideas in this ideation. | Request Body | Optional |
Example Requests
C# REST SDK
This example uses the REST SDK to access the Community REST API within a .Net C# application. In the example, USER_NAME
is the user name of the effective user for the request and OAUTH_CLIENT_ID
and OAUTH_SECRET
are the OAuth client ID and secret, respectively, associated to this application as configured in Administration > Integration > OAuth Clients with the "Client Credentials" grant type enabled. See the documentation for the REST SDK for more details about installation, configuration, and usage options.
var host = new ClientCredentialsRestHost("USER_NAME", "https://mysite.com/", "OAUTH_CLIENT_ID", "OAUTH_SECRET"); var response = host.PutToDynamic(2, "ideas/challenge.json", false, new RestPutOptions { PostParameters = new System.Collections.Specialized.NameValueCollection { { "Id", "49fec544-6df7-4a82-872b-f8be586d5e9e" } } });
Widget Javascript
This example uses the rest JavaScript API to access the Community REST API within the Community web UI. When accessing the REST API through the javascript API, the effective user is the current contextual user of the web interface.
jQuery.telligent.evolution.put({ url: jQuery.telligent.evolution.site.getBaseUrl() + 'api.ashx/v2/ideas/challenge.json', data: { 'Id': '49fec544-6df7-4a82-872b-f8be586d5e9e' }, success: function(response) { } });
cURL
This example uses the cURL command-line HTTP utility. ENCODED_TOKEN
in the example is the base64-encoded concatenation of the user's API key (created from the user's profile), a colon (:), and the user's user name. Learn more about using the REST API.
curl -H "Rest-User-Token: ENCODED_TOKEN" -d "Id=49fec544-6df7-4a82-872b-f8be586d5e9e" -H "Rest-Method: PUT" -X POST https://mysite.com/api.ashx/v2/ideas/challenge.xml
Example Responses
XML
<?xml version="1.0" encoding="utf-16"?> <Response> <Challenge> <Id>49fec544-6df7-4a82-872b-f8be586d5e9e</Id> <Group> <Name>name</Name> <Url>url</Url> <AvatarUrl>avatarurl</AvatarUrl> <Id>6</Id> </Group> <ApplicationId>9f5a6721-639d-4e1d-ab6a-ce63b7750f46</ApplicationId> <ApplicationTypeId>fe65240b-044c-4292-9946-f10e0361ecff</ApplicationTypeId> <Name>name</Name> <Description>description</Description> <ApplicationKey>applicationkey</ApplicationKey> <CreatedDate>2012-01-04T00:00:00</CreatedDate> <IsEnabled>true</IsEnabled> <TotalPosts>25</TotalPosts> <LastPostDate>2012-05-02T00:00:00</LastPostDate> <MaximumVotesPerUser>8</MaximumVotesPerUser> <MaximumVotesPerIdea>4</MaximumVotesPerIdea> <RequiresCategory>true</RequiresCategory> <AllowMultipleVotes>true</AllowMultipleVotes> </Challenge> <Errors> <Message>string</Message> <Message>string</Message> </Errors> </Response>
JSON
{ "Challenge": { "Id": "49fec544-6df7-4a82-872b-f8be586d5e9e", "Group": { "Name": "name", "Url": "url", "AvatarUrl": "avatarurl", "Id": 6 }, "ApplicationId": "9f5a6721-639d-4e1d-ab6a-ce63b7750f46", "ApplicationTypeId": "fe65240b-044c-4292-9946-f10e0361ecff", "Name": "name", "Description": "description", "ApplicationKey": "applicationkey", "CreatedDate": "2012-01-04T00:00:00", "IsEnabled": true, "TotalPosts": 25, "LastPostDate": "2012-05-02T00:00:00", "MaximumVotesPerUser": 8, "MaximumVotesPerIdea": 4, "RequiresCategory": true, "AllowMultipleVotes": true }, "Errors": [ "string", "string" ] }