POST api.ashx/v2/search.{json|xml}
CREATE a search result - add a document to the index.
Scopes
Search › Modify Search Results search.results.modify
Request Parameters
Name | Type | Location | Description | Required | Default | Options |
---|---|---|---|---|---|---|
ApplicationId | Guid? | The GUID representing the application. | Optional | |||
Category | string | Category | Optional | |||
Collapse | string | Collapse | Optional | |||
ContainerId | Guid? | The GUID representing the container. | Optional | |||
Content | string | Content | Required | |||
ContentId | string | Unique Id for the content type | Required | |||
ContentType | string | Content Type | Required | |||
ContentUrl | string | Content Url | Required | |||
CreatedBy | string | Optional username for the user who created the content | Optional | |||
CustomFields | RestSearchFields | Custom Fields | Optional | |||
Date | DateTime | Date | Required | |||
EditedBy | string | Optional username for the user who last edited the content | Optional | |||
GroupId | int? | Group Id | Optional | |||
GuidId | Guid? | The GUID representing the content. | Optional | |||
IsApplication | bool? | Is Application | Optional | |||
IsContainer | bool? | Is Container | Optional | |||
IsContent | bool? | Is Content | Optional | |||
Rating | double? | Rating is a real number from 0 to 100 maintaining one decimal place: 000.0 | Optional | |||
Roles | string | List of role ids, separated by commas, that have permission to view the item. | Required | |||
SectionId | int? | Section Id | Optional | |||
Tags | string | List of tags, separated by commas | Optional | |||
ThreadId | int? | Thread Id | Optional | |||
Title | string | Title | Required | |||
UserId | int? | UserId or Username is required when specifying a user. | Optional | |||
Username | string | Either UserId or Username is required when specifying a user. | Optional | |||
WikiId | int? | Wiki Id | Optional |
Example Requests
Widget Javascript
jQuery.telligent.evolution.post({ url: jQuery.telligent.evolution.site.getBaseUrl() + 'api.ashx/v2/search.json', data: { 'Content': 'content', 'ContentId': 'contentid', 'ContentType': 'contenttype', 'ContentUrl': 'contenturl', 'Date': '2012-01-04T00:00:00', 'Roles': 'roles', 'Title': 'title' } }).then(function(response) { // use response });
Example Responses
JSON
{ "DocumentId": "documentid", "Info": [ "string", "string" ], "Warnings": [ "string", "string" ], "Errors": [ "string", "string" ] }
XML
<?xml version="1.0" encoding="utf-16"?> <Response> <Info> <Message>string</Message> <Message>string</Message> </Info> <Warnings> <Message>string</Message> <Message>string</Message> </Warnings> <Errors> <Message>string</Message> <Message>string</Message> </Errors> <DocumentId>documentid</DocumentId> </Response>