Important Update: Community URLs redirect issues are partially resolved. Learn More. .

cancel
Showing results for 
Search instead for 
Did you mean: 

Content IDs from RestAPI

FaizanTai
Contributor II

Hello,

 

We are a SaaS customer running 6.5 P2 and are trying to integrate with an intranet site setup for our org. 

 

We are looking to get a list of content IDs for policies based on a filter or report using the RestAPI. Is it possible to make a call to get all content or pull content from a report using the RestAPI?

 

Let me know if you need any clarification.

13 REPLIES 13

Ilya_Khen
Champion III

Nope, you need to use WEB API to get report data.

Are there any plans to update the RestAPI to include this functionality?

 

Also, are there workarounds that we could leverage to get this information through the RESTAPI?

JeffLetterman
Archer Employee
Archer Employee

Please vote up Create REST API functionality to perform record searches or run reports.  

The Web Services API has a couple methods for searching: SearchRecordsByReport and ExecuteSearch.  For help with these methods or constructing the SearchXML, check out these links too:

 

There is not a documented, public API way of doing this.  But using a browser's F12 developer mode, we can see the internal API calls being made when using global search.  

URL: /api/internal/search/globalsearch/Search?$count=true&$skip=0&$top=10&$filter=Keywords eq 'XXXXXX'

Verb: POST

 

To search for "letterman", the URL would be like this:

/api/internal/search/globalsearch/Search?$count=true&$skip=0&$top=10&$filter=Keywords eq 'letterman'

Sample Output

{
"Items": [
{
"ContentId": 240525,
"LevelId": 37,
"ModuleId": 84,
"ApplicationName": "Contacts",
"Created": "2019-02-28T16:31:10.393",
"Modified": "2019-02-28T16:31:10.393",
"Title": "Jeff Letterman",
"Data": [
{
"FieldName": "Name (Full)",
"FieldValue": "Jeff Letterman",
"FieldType": "Text"
},
{
"FieldType": "Text"
},
{
"FieldType": "ValuesList"
},
{
"FieldType": "Text"
},
{
"FieldType": "Text"
},
{
"FieldType": "UsersGroupsList"
}
]
}
],
"NextPageLink": null,
"Count": 1
}

pastedImage_19.png

One thing to note about using the internal API call for global search is...it relies on Archer Search Indexing for search.  This means a newly created/updated record may not get returned until the service has indexed it.

Make sense. It means that WS Execute Search is not relying on indexing and more reliable mechanism to search then?

That is correct.  ExecuteSearch‌ and SearchRecordsByReport‌ use database filtering when searching records.

Great, thanks!