[Urgent]: Data360 API Queries
Hi There,
Need your help in understanding the input parameter for http://dvaswp01f:8080/api/v4/simple-scheduled-tasks API
Here is the flow
- First logged in and got the token
- Then queried all the workspaces
- Then I’m trying to query the schedules dv_prod user’s workspace which we have used to create all the schedules by adding dv_prod Workspace ID as input in the next API
Output
{
"data" : {
"objects" : [ ]
},
"status" : "OK"
}
But I keep getting blank objects . I tried with admin and system as well but still blank objects. I’m not sure which workspace to use to get all our schedules.
-
Instead of drilling down to the workspace, you can drill down to a user's directory (more on how to get this below) to list their schedules. A sample of the end result is below:
/api/v4/simple-scheduled-tasks?container=object:!tenant:defaultTenant~directory:__Root__~directory:__Users__~directory:183eb12b-f124-4ff1-9287-bdbd86be8db2
The user's directory (or rather, the whole locator which contains it) is within the same
/api/v3/workspaces
API call you're already performing. Instead of taking thelocator
field, take theobject.directory
field:...
{ "object": { "id": "991ad7cf-fa40-4b86-9164-e9473cddf01e", "name": "gerard", "directory": "object:!tenant:defaultTenant~directory:__Root__~directory:__Users__~directory:183eb12b-f124-4ff1-9287-bdbd86be8db2", "description": "gerard" }, "locator": "object:!tenant:defaultTenant~workspace:991ad7cf-fa40-4b86-9164-e9473cddf01e" },...Since you already have the token and the workspace APIs up and running, the only change would be to take the
object.directory
field from the workspace API result and use that as yourcontainer
parameter for the/api/v4/simple-scheduled-tasks
call.
Please sign in to leave a comment.
Comments
1 comment