How to list the documents in Project workspace using Content server REST API

Options

we are unable to get list of subitems under project workspace. we have tried in below ways we can only able to list sub projects.
1 ) api/v1/nodes//nodes
2) api/v1/volumes//nodes
it is expected type id but we are not able to find type id for project(personal workspace type id=142 , enterprise workspace is 141)

Comments

  • Hi Apparao,

    Project Workspace does not get created automatically like the personal and enterprise workspaces. You will need to create one and get the ID then run GET

    http://{CSSERVERNAME}/{SERVICENAME}/cs.exe/api/v1/nodes/-113641/nodes

    Notice the minus sign infront of the ID

    Hope that helps

  • Contents of containers with an associated volume cannot be listed by the usual URL: /nodes/:id/nodes. Other such containers are Binders or Cases from the Template Workspaces module, for example.

    Projects contain subprojects as direct children and project content (documents, folder, etc.) in the volume associated to the project node. Arguably it would make more sense returning the project content (documents, folder, etc.) from the children listing request (/nodes/:id/nodes) and return the subprojects, which are rather project relations, by a special resource like /nodes/:id/projects, but we didn't find a consensus in team about such generic browsing functinality. The current REST API behaviour is the same as you remember from LAPI - use the negative node ID to get the actual contents: /nodes/-:id/nodes.

    The only way how to learn if the container has an associated volume or not by the REST API is issuing an extra request:

    1. (Optionally) check if the node type can have an associated volume using the technical documentation. Folders (type 0) cannot have one, for example. If you are not sure about yours, proceed by the step 2.
    2. Try getting the node information by /nodes/-:id (mind the negative node ID)
    3. If the request fails with the 400 HTTP status code, the container has no associated volume and you can list the children as usual. If the request succeeds, you should use the negative node ID to list the children, because all containers I know about store their children in the associated volume, if they have one. I mean that kind of children, that you need in the most usual scenarios, like your project content browsing.

    This may change in the future, because some CS REST API extensions try to be helpful by returning the content of the associated volume even for the positive node IDs. Business Workspaces from the xECM module, for example.

    Containers from the Template Workspaces module might be fixed by a future patch.

  • thank you for all your support, I have tried with the minus sign but we have not installed the OT-09-2014 PATCH.
    after patch installed it working fine with project it with minus sign.

  • Thanks for letting us now! I cannot remember if there was an intentional task for this, but good to know that the 2014.09 + REST API patch is the first version where it works.

  • Hello All,

    I have a similar scenario where I am trying to use BROWSE function for a folder in livelink. Below is the URL. I am getting error 500 when i run it.I tried using the Minus sign before nodeid , but its not helping.

    http://csinstName/doc/livelink/api/v1/nodes/219602/nodes

    Your feedback would be appreciated

  • 500 means an internal server error. If you got an empty response body, I am afraid that you would have to inspect the log files and/or debug on the server.