CS REST API

Options

Hi,

Is there a way to get all nodes with the same subType from every where in Content Server?

Thanks.

Tagged:

Comments

  • Two things:
    1) You'd probably have to extend the REST API to do this in Oscript.
    2) This is potentially dangerous in a large system due to the sheer size of the result set you may well return. Let's just say your system contains 10 million folders and 7 million documents (I know of one client exactly like this). If you did such an API call, and requested all items of type 0, your result set would be 10 million (every folder in the system). Even with pagination employed, the SQL would still need to be executed and I can see there being a cost to this - even though you are only going to iterate say the first 100 results, then reset and get the next 100 and so on.

    Where such a query might be eventually allowed is if the API exposed LiveReports or WebReports although for the reasons discussed above, I can see this being potentially a dangerous thing. Perhaps someone from OT DEV can weigh in as well.

    -Hugh

  • Thanks for reply,

    1 - It is very helpful if some HowTo exists to demonstrate how can we extend the REST API Module.

    2 - For this reason i thougth to use REST API Module to reduce the risk and accelerate the Requests for a large count of documents. Like this Request to set which page and subType.

    /nodes?page=<page number>&where_type=<subtype>
    

    Mohamed Ltaief

  • Look for the CS XML Search API in the OT KC. You can enable the subtype as a searchable region on the server - I'm not sure about its name - and use it in queries then. The CS Search REST API hasn't been released yet, but the CS XML Search API is kind of RESTful already...