Request Parameters
Name | Type | Description | Location | Required | Default | Options |
---|---|---|---|---|---|---|
PageIndex | int | Page index to retrieve | Query String | Optional | 0 | |
PageSize | int | Page size to retrieve | Query String | Optional | 20 | |
IdeaId | Guid | Filter votes to specific idea | Query String | Optional | ||
UserId | int | Filter votes to a specific user | Query String | Optional | ||
Value | bool | Filter for Up (true) or Down (false) votes | Query String | 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.GetToDynamic(2, "ideas/votes.json", false);
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.get({ url: jQuery.telligent.evolution.site.getBaseUrl() + 'api.ashx/v2/ideas/votes.json', 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" -X GET https://mysite.com/api.ashx/v2/ideas/votes.xml
Example Responses
XML
<?xml version="1.0" encoding="utf-16"?> <Response> <Vote PageSize="2" PageIndex="0" TotalCount="2"> <Vote> <Idea> <Id>49fec544-6df7-4a82-872b-f8be586d5e9e</Id> <ContentId>9f5a6721-639d-4e1d-ab6a-ce63b7750f46</ContentId> <ContentTypeId>fe65240b-044c-4292-9946-f10e0361ecff</ContentTypeId> <Challenge> <Id>2d525bad-c4df-470d-a193-a1c6d66e5c3e</Id> <Group> <Name>name</Name> <Url>url</Url> <AvatarUrl>avatarurl</AvatarUrl> <Id>6</Id> </Group> <ApplicationId>bd519379-b61f-4e2f-b0f9-c0f28c5cceb1</ApplicationId> <ApplicationTypeId>9ba1ec43-dc34-4e27-a579-4a0855144e2f</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> <Name>name</Name> <Description>description</Description> <Status> <Key>key</Key> <Name>name</Name> <Description>description</Description> <SortOrder>7</SortOrder> <IsDefault>true</IsDefault> <IsClosed>true</IsClosed> <ReleasesVotes>true</ReleasesVotes> <ScoreValue>0</ScoreValue> </Status> <StatusNotes>statusnotes</StatusNotes> <StatusAuthorUser> <DisplayName>displayname</DisplayName> <Username>username</Username> <ProfileUrl>profileurl</ProfileUrl> <AvatarUrl>avatarurl</AvatarUrl> <UserId>27</UserId> </StatusAuthorUser> <StatusDate>2012-06-04T00:00:00</StatusDate> <AuthorUser> <DisplayName>displayname</DisplayName> <Username>username</Username> <ProfileUrl>profileurl</ProfileUrl> <AvatarUrl>avatarurl</AvatarUrl> <UserId>32</UserId> </AuthorUser> <CreatedDate>2011-05-28T00:00:00</CreatedDate> <LastUpdatedDate>2011-12-09T00:00:00</LastUpdatedDate> <IsEnabled>true</IsEnabled> <Url>url</Url> <Category> <IdeationId>e3715662-2528-4ba1-84a7-bfcd9d548f80</IdeationId> <Id>52</Id> <Name>name</Name> </Category> <TotalVotes>19</TotalVotes> <YesVotes>112</YesVotes> <NoVotes>61</NoVotes> <Score>18</Score> <CurrentStatus> <Id>76</Id> <Idea> <Id>6cdcf200-3bad-476d-af45-97b52545c337</Id> <ContentId>b04540ec-eb38-4fa1-b7bb-e3fde05401b4</ContentId> <ContentTypeId>44df201a-07e6-42eb-96c7-8ce7ce35aab6</ContentTypeId> <Challenge> <Id>49fec544-6df7-4a82-872b-f8be586d5e9e</Id> <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-03-29T00:00:00</CreatedDate> <IsEnabled>true</IsEnabled> <TotalPosts>6</TotalPosts> <LastPostDate /> <MaximumVotesPerUser /> <MaximumVotesPerIdea /> <RequiresCategory>true</RequiresCategory> <AllowMultipleVotes>true</AllowMultipleVotes> </Challenge> <Name>name</Name> <Description>description</Description> <Status> <Key>key</Key> <Name>name</Name> <Description>description</Description> <SortOrder>25</SortOrder> <IsDefault>true</IsDefault> <IsClosed>true</IsClosed> <ReleasesVotes>true</ReleasesVotes> <ScoreValue>0</ScoreValue> </Status> <StatusNotes>statusnotes</StatusNotes> <StatusAuthorUser> <DisplayName>displayname</DisplayName> <Username>username</Username> <ProfileUrl>profileurl</ProfileUrl> <AvatarUrl>avatarurl</AvatarUrl> <UserId>8</UserId> </StatusAuthorUser> <StatusDate>2012-04-19T00:00:00</StatusDate> <AuthorUser> <DisplayName>displayname</DisplayName> <Username>username</Username> <ProfileUrl>profileurl</ProfileUrl> <AvatarUrl>avatarurl</AvatarUrl> <UserId>4</UserId> </AuthorUser> <CreatedDate>2012-01-16T00:00:00</CreatedDate> <LastUpdatedDate>2012-01-04T00:00:00</LastUpdatedDate> <IsEnabled>true</IsEnabled> <Url>url</Url> <Category> <IdeationId /> <Id /> <Name>name</Name> </Category> <TotalVotes>7</TotalVotes> <YesVotes>27</YesVotes> <NoVotes>32</NoVotes> <Score>52</Score> <CurrentStatus> <Id>19</Id> <CreatedDate /> <Note>note</Note> </CurrentStatus> </Idea> <Status> <Key>key</Key> <Name>name</Name> <Description>description</Description> <SortOrder>112</SortOrder> <IsDefault>true</IsDefault> <IsClosed>true</IsClosed> <ReleasesVotes>true</ReleasesVotes> <ScoreValue>0</ScoreValue> </Status> <Author> <DisplayName>displayname</DisplayName> <Username>username</Username> <ProfileUrl>profileurl</ProfileUrl> <AvatarUrl>avatarurl</AvatarUrl> <UserId>61</UserId> </Author> <CreatedDate>2012-05-02T00:00:00</CreatedDate> <Note>note</Note> </CurrentStatus> </Idea> <User> <DisplayName>displayname</DisplayName> <Username>username</Username> <ProfileUrl>profileurl</ProfileUrl> <AvatarUrl>avatarurl</AvatarUrl> <UserId>18</UserId> </User> <Value>true</Value> <TotalVotes>76</TotalVotes> </Vote> <Vote> <Idea> <Id>2d525bad-c4df-470d-a193-a1c6d66e5c3e</Id> <ContentId>bd519379-b61f-4e2f-b0f9-c0f28c5cceb1</ContentId> <ContentTypeId>9ba1ec43-dc34-4e27-a579-4a0855144e2f</ContentTypeId> <Challenge> <Id>e3715662-2528-4ba1-84a7-bfcd9d548f80</Id> <Group> <Name>name</Name> <Url>url</Url> <AvatarUrl>avatarurl</AvatarUrl> <Id>6</Id> </Group> <ApplicationId>6cdcf200-3bad-476d-af45-97b52545c337</ApplicationId> <ApplicationTypeId>b04540ec-eb38-4fa1-b7bb-e3fde05401b4</ApplicationTypeId> <Name>name</Name> <Description>description</Description> <ApplicationKey>applicationkey</ApplicationKey> <CreatedDate>2012-06-04T00:00:00</CreatedDate> <IsEnabled>true</IsEnabled> <TotalPosts>25</TotalPosts> <LastPostDate>2011-05-28T00:00:00</LastPostDate> <MaximumVotesPerUser>8</MaximumVotesPerUser> <MaximumVotesPerIdea>4</MaximumVotesPerIdea> <RequiresCategory>true</RequiresCategory> <AllowMultipleVotes>true</AllowMultipleVotes> </Challenge> <Name>name</Name> <Description>description</Description> <Status> <Key>key</Key> <Name>name</Name> <Description>description</Description> <SortOrder>7</SortOrder> <IsDefault>true</IsDefault> <IsClosed>true</IsClosed> <ReleasesVotes>true</ReleasesVotes> <ScoreValue>0</ScoreValue> </Status> <StatusNotes>statusnotes</StatusNotes> <StatusAuthorUser> <DisplayName>displayname</DisplayName> <Username>username</Username> <ProfileUrl>profileurl</ProfileUrl> <AvatarUrl>avatarurl</AvatarUrl> <UserId>27</UserId> </StatusAuthorUser> <StatusDate>2011-12-09T00:00:00</StatusDate> <AuthorUser> <DisplayName>displayname</DisplayName> <Username>username</Username> <ProfileUrl>profileurl</ProfileUrl> <AvatarUrl>avatarurl</AvatarUrl> <UserId>32</UserId> </AuthorUser> <CreatedDate>2012-03-29T00:00:00</CreatedDate> <LastUpdatedDate>2012-04-19T00:00:00</LastUpdatedDate> <IsEnabled>true</IsEnabled> <Url>url</Url> <Category> <IdeationId>44df201a-07e6-42eb-96c7-8ce7ce35aab6</IdeationId> <Id>52</Id> <Name>name</Name> </Category> <TotalVotes>19</TotalVotes> <YesVotes>112</YesVotes> <NoVotes>61</NoVotes> <Score>18</Score> <CurrentStatus> <Id>76</Id> <Idea> <Id>49fec544-6df7-4a82-872b-f8be586d5e9e</Id> <ContentId>9f5a6721-639d-4e1d-ab6a-ce63b7750f46</ContentId> <ContentTypeId>fe65240b-044c-4292-9946-f10e0361ecff</ContentTypeId> <Challenge> <Id>2d525bad-c4df-470d-a193-a1c6d66e5c3e</Id> <ApplicationId>bd519379-b61f-4e2f-b0f9-c0f28c5cceb1</ApplicationId> <ApplicationTypeId>9ba1ec43-dc34-4e27-a579-4a0855144e2f</ApplicationTypeId> <Name>name</Name> <Description>description</Description> <ApplicationKey>applicationkey</ApplicationKey> <CreatedDate>2012-01-16T00:00:00</CreatedDate> <IsEnabled>true</IsEnabled> <TotalPosts>6</TotalPosts> <LastPostDate /> <MaximumVotesPerUser /> <MaximumVotesPerIdea /> <RequiresCategory>true</RequiresCategory> <AllowMultipleVotes>true</AllowMultipleVotes> </Challenge> <Name>name</Name> <Description>description</Description> <Status> <Key>key</Key> <Name>name</Name> <Description>description</Description> <SortOrder>25</SortOrder> <IsDefault>true</IsDefault> <IsClosed>true</IsClosed> <ReleasesVotes>true</ReleasesVotes> <ScoreValue>0</ScoreValue> </Status> <StatusNotes>statusnotes</StatusNotes> <StatusAuthorUser> <DisplayName>displayname</DisplayName> <Username>username</Username> <ProfileUrl>profileurl</ProfileUrl> <AvatarUrl>avatarurl</AvatarUrl> <UserId>8</UserId> </StatusAuthorUser> <StatusDate>2012-01-04T00:00:00</StatusDate> <AuthorUser> <DisplayName>displayname</DisplayName> <Username>username</Username> <ProfileUrl>profileurl</ProfileUrl> <AvatarUrl>avatarurl</AvatarUrl> <UserId>4</UserId> </AuthorUser> <CreatedDate>2012-05-02T00:00:00</CreatedDate> <LastUpdatedDate>2012-06-04T00:00:00</LastUpdatedDate> <IsEnabled>true</IsEnabled> <Url>url</Url> <Category> <IdeationId /> <Id /> <Name>name</Name> </Category> <TotalVotes>7</TotalVotes> <YesVotes>27</YesVotes> <NoVotes>32</NoVotes> <Score>52</Score> <CurrentStatus> <Id>19</Id> <CreatedDate /> <Note>note</Note> </CurrentStatus> </Idea> <Status> <Key>key</Key> <Name>name</Name> <Description>description</Description> <SortOrder>112</SortOrder> <IsDefault>true</IsDefault> <IsClosed>true</IsClosed> <ReleasesVotes>true</ReleasesVotes> <ScoreValue>0</ScoreValue> </Status> <Author> <DisplayName>displayname</DisplayName> <Username>username</Username> <ProfileUrl>profileurl</ProfileUrl> <AvatarUrl>avatarurl</AvatarUrl> <UserId>61</UserId> </Author> <CreatedDate>2011-05-28T00:00:00</CreatedDate> <Note>note</Note> </CurrentStatus> </Idea> <User> <DisplayName>displayname</DisplayName> <Username>username</Username> <ProfileUrl>profileurl</ProfileUrl> <AvatarUrl>avatarurl</AvatarUrl> <UserId>18</UserId> </User> <Value>true</Value> <TotalVotes>76</TotalVotes> </Vote> </Vote> <Errors> <Message>string</Message> <Message>string</Message> </Errors> </Response>
JSON
{ "PageSize": 2, "PageIndex": 0, "TotalCount": 2, "Vote": [ { "Idea": { "Id": "49fec544-6df7-4a82-872b-f8be586d5e9e", "ContentId": "9f5a6721-639d-4e1d-ab6a-ce63b7750f46", "ContentTypeId": "fe65240b-044c-4292-9946-f10e0361ecff", "Challenge": { "Id": "2d525bad-c4df-470d-a193-a1c6d66e5c3e", "Group": { "Name": "name", "Url": "url", "AvatarUrl": "avatarurl", "Id": 6 }, "ApplicationId": "bd519379-b61f-4e2f-b0f9-c0f28c5cceb1", "ApplicationTypeId": "9ba1ec43-dc34-4e27-a579-4a0855144e2f", "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 }, "Name": "name", "Description": "description", "Status": { "Key": "key", "Name": "name", "Description": "description", "SortOrder": 7, "IsDefault": true, "IsClosed": true, "ReleasesVotes": true, "ScoreValue": 0 }, "StatusNotes": "statusnotes", "StatusAuthorUser": { "DisplayName": "displayname", "Username": "username", "ProfileUrl": "profileurl", "AvatarUrl": "avatarurl", "UserId": 27 }, "StatusDate": "2012-06-04T00:00:00", "AuthorUser": { "DisplayName": "displayname", "Username": "username", "ProfileUrl": "profileurl", "AvatarUrl": "avatarurl", "UserId": 32 }, "CreatedDate": "2011-05-28T00:00:00", "LastUpdatedDate": "2011-12-09T00:00:00", "IsEnabled": true, "Url": "url", "Category": { "IdeationId": "e3715662-2528-4ba1-84a7-bfcd9d548f80", "Id": 52, "Name": "name" }, "TotalVotes": 19, "YesVotes": 112, "NoVotes": 61, "Score": 18, "CurrentStatus": { "Id": 76, "Idea": { "Id": "6cdcf200-3bad-476d-af45-97b52545c337", "ContentId": "b04540ec-eb38-4fa1-b7bb-e3fde05401b4", "ContentTypeId": "44df201a-07e6-42eb-96c7-8ce7ce35aab6", "Challenge": { "Id": "49fec544-6df7-4a82-872b-f8be586d5e9e", "Group": null, "ApplicationId": "9f5a6721-639d-4e1d-ab6a-ce63b7750f46", "ApplicationTypeId": "fe65240b-044c-4292-9946-f10e0361ecff", "Name": "name", "Description": "description", "ApplicationKey": "applicationkey", "CreatedDate": "2012-03-29T00:00:00", "IsEnabled": true, "TotalPosts": 6, "LastPostDate": null, "MaximumVotesPerUser": null, "MaximumVotesPerIdea": null, "RequiresCategory": true, "AllowMultipleVotes": true }, "Name": "name", "Description": "description", "Status": { "Key": "key", "Name": "name", "Description": "description", "SortOrder": 25, "IsDefault": true, "IsClosed": true, "ReleasesVotes": true, "ScoreValue": 0 }, "StatusNotes": "statusnotes", "StatusAuthorUser": { "DisplayName": "displayname", "Username": "username", "ProfileUrl": "profileurl", "AvatarUrl": "avatarurl", "UserId": 8 }, "StatusDate": "2012-04-19T00:00:00", "AuthorUser": { "DisplayName": "displayname", "Username": "username", "ProfileUrl": "profileurl", "AvatarUrl": "avatarurl", "UserId": 4 }, "CreatedDate": "2012-01-16T00:00:00", "LastUpdatedDate": "2012-01-04T00:00:00", "IsEnabled": true, "Url": "url", "Category": { "IdeationId": null, "Id": null, "Name": "name" }, "TotalVotes": 7, "YesVotes": 27, "NoVotes": 32, "Score": 52, "CurrentStatus": { "Id": 19, "Idea": null, "Status": null, "Author": null, "CreatedDate": null, "Note": "note" } }, "Status": { "Key": "key", "Name": "name", "Description": "description", "SortOrder": 112, "IsDefault": true, "IsClosed": true, "ReleasesVotes": true, "ScoreValue": 0 }, "Author": { "DisplayName": "displayname", "Username": "username", "ProfileUrl": "profileurl", "AvatarUrl": "avatarurl", "UserId": 61 }, "CreatedDate": "2012-05-02T00:00:00", "Note": "note" } }, "User": { "DisplayName": "displayname", "Username": "username", "ProfileUrl": "profileurl", "AvatarUrl": "avatarurl", "UserId": 18 }, "Value": true, "TotalVotes": 76 }, { "Idea": { "Id": "2d525bad-c4df-470d-a193-a1c6d66e5c3e", "ContentId": "bd519379-b61f-4e2f-b0f9-c0f28c5cceb1", "ContentTypeId": "9ba1ec43-dc34-4e27-a579-4a0855144e2f", "Challenge": { "Id": "e3715662-2528-4ba1-84a7-bfcd9d548f80", "Group": { "Name": "name", "Url": "url", "AvatarUrl": "avatarurl", "Id": 6 }, "ApplicationId": "6cdcf200-3bad-476d-af45-97b52545c337", "ApplicationTypeId": "b04540ec-eb38-4fa1-b7bb-e3fde05401b4", "Name": "name", "Description": "description", "ApplicationKey": "applicationkey", "CreatedDate": "2012-06-04T00:00:00", "IsEnabled": true, "TotalPosts": 25, "LastPostDate": "2011-05-28T00:00:00", "MaximumVotesPerUser": 8, "MaximumVotesPerIdea": 4, "RequiresCategory": true, "AllowMultipleVotes": true }, "Name": "name", "Description": "description", "Status": { "Key": "key", "Name": "name", "Description": "description", "SortOrder": 7, "IsDefault": true, "IsClosed": true, "ReleasesVotes": true, "ScoreValue": 0 }, "StatusNotes": "statusnotes", "StatusAuthorUser": { "DisplayName": "displayname", "Username": "username", "ProfileUrl": "profileurl", "AvatarUrl": "avatarurl", "UserId": 27 }, "StatusDate": "2011-12-09T00:00:00", "AuthorUser": { "DisplayName": "displayname", "Username": "username", "ProfileUrl": "profileurl", "AvatarUrl": "avatarurl", "UserId": 32 }, "CreatedDate": "2012-03-29T00:00:00", "LastUpdatedDate": "2012-04-19T00:00:00", "IsEnabled": true, "Url": "url", "Category": { "IdeationId": "44df201a-07e6-42eb-96c7-8ce7ce35aab6", "Id": 52, "Name": "name" }, "TotalVotes": 19, "YesVotes": 112, "NoVotes": 61, "Score": 18, "CurrentStatus": { "Id": 76, "Idea": { "Id": "49fec544-6df7-4a82-872b-f8be586d5e9e", "ContentId": "9f5a6721-639d-4e1d-ab6a-ce63b7750f46", "ContentTypeId": "fe65240b-044c-4292-9946-f10e0361ecff", "Challenge": { "Id": "2d525bad-c4df-470d-a193-a1c6d66e5c3e", "Group": null, "ApplicationId": "bd519379-b61f-4e2f-b0f9-c0f28c5cceb1", "ApplicationTypeId": "9ba1ec43-dc34-4e27-a579-4a0855144e2f", "Name": "name", "Description": "description", "ApplicationKey": "applicationkey", "CreatedDate": "2012-01-16T00:00:00", "IsEnabled": true, "TotalPosts": 6, "LastPostDate": null, "MaximumVotesPerUser": null, "MaximumVotesPerIdea": null, "RequiresCategory": true, "AllowMultipleVotes": true }, "Name": "name", "Description": "description", "Status": { "Key": "key", "Name": "name", "Description": "description", "SortOrder": 25, "IsDefault": true, "IsClosed": true, "ReleasesVotes": true, "ScoreValue": 0 }, "StatusNotes": "statusnotes", "StatusAuthorUser": { "DisplayName": "displayname", "Username": "username", "ProfileUrl": "profileurl", "AvatarUrl": "avatarurl", "UserId": 8 }, "StatusDate": "2012-01-04T00:00:00", "AuthorUser": { "DisplayName": "displayname", "Username": "username", "ProfileUrl": "profileurl", "AvatarUrl": "avatarurl", "UserId": 4 }, "CreatedDate": "2012-05-02T00:00:00", "LastUpdatedDate": "2012-06-04T00:00:00", "IsEnabled": true, "Url": "url", "Category": { "IdeationId": null, "Id": null, "Name": "name" }, "TotalVotes": 7, "YesVotes": 27, "NoVotes": 32, "Score": 52, "CurrentStatus": { "Id": 19, "Idea": null, "Status": null, "Author": null, "CreatedDate": null, "Note": "note" } }, "Status": { "Key": "key", "Name": "name", "Description": "description", "SortOrder": 112, "IsDefault": true, "IsClosed": true, "ReleasesVotes": true, "ScoreValue": 0 }, "Author": { "DisplayName": "displayname", "Username": "username", "ProfileUrl": "profileurl", "AvatarUrl": "avatarurl", "UserId": 61 }, "CreatedDate": "2011-05-28T00:00:00", "Note": "note" } }, "User": { "DisplayName": "displayname", "Username": "username", "ProfileUrl": "profileurl", "AvatarUrl": "avatarurl", "UserId": 18 }, "Value": true, "TotalVotes": 76 } ], "Errors": [ "string", "string" ] }