How do I extract the comments from all processes in a space?
To extract all the comments from all processes in a space, you must first get the process IDs and then retrieve the comments for each process ID.
Use the spaces and spaces/{space-id} API to get the list of processes in the space. Then, run the ProcessData API for each process ID.
For example, to retrieve all the comments in the
Process Examples
space:- If you don't know the space ID, use the
/bwl/spaces
API to get it. The URL-encoded value of the space wildcard is%20
.https://server_name/bwl/spaces?name=Process%20Examples
- Use the space ID that was returned,
4ae262
in this example, to get the list of processes in the space.
If you want to include the comments from all subspaces, add thehttps://server_name/bwl/spaces/4ae262
include-subspaces
parameter.
This API returns the details of the space (and all subspaces if you addedhttps://server_name/bwl/spaces/4ae262?include-subspaces=true
include-subspaces
), including the process names and IDs. - Parse the results to extract all the process IDs.
- Run the
processData
API to retrieve the comments for each process ID. For example:/scr/api/ProcessData?processId=240002
- Parse the results to filter out all the items that are not of type COMMENT. The following output
snippet shows a comment:
"241904": { "createdByName": "Jane Doe", "createdByUserId": "23000d", "createdDate": "1412702019985", "isRead": "true", "itemType": "COMMENT", "name": "this is my comment", "ownerId": "240002" },