cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Remove group from team folder, lack of documentation

Remove group from team folder, lack of documentation

1575475
Explorer | Level 3
Go to solution

Hi,

after successfully adding a group to the team folder I've created (thanks again to Greg and Sdrawko) I also tried to remove that very group afterwards using 

/2/sharing/remove_folder_member

with the following json parameter:

{ "leave_a_copy":false, "shared_folder_id":"3032413665", "member": { ".tag":"dropbox_id", "dropbox_id":"g:159b846c7487bd9000000000000011b3" } }

 

After executing the method I receive the following JSON response:

{".tag": "async_job_id", "async_job_id": "dbjid:AADFNCNH28N0hbWG2XEZIoDfOFJCnCE39h6D2rl8mjhqO-GrQXauw9XEhVl1xgyT5ma9Z8h56s8vKddwPaPNhqaB"}

Which seems to be as expected.

 

Unfortunately after listing the team folder groups the group I want to remove is still present at the team folder.

Since there's no documentation to be found on how to fetch the status of the async job using REST calls I've no idea how to proceed.

That link doesn't lead to something useful:

Screenshot 2022-09-29 101822.jpg

The group I want to remove has the following attributes:

Debugging session of 

/2/sharing/list_folder_members

Screenshot 2022-09-29 100502.jpg

(ABAP language doesn't allow field names starting with a dot, so "DOTTAG" here actually refers to ".tag" which is mapped during the JSON deserialization)

 

Adding a group to a team folder is pretty much useless without the possibility to remove the group.

 

I'm afraid to ask for assistance once more 🙂 🙂 🙂

 

Best regards,

Jan

 

1 Accepted Solution

Accepted Solutions

Здравко
Legendary | Level 20
Go to solution

Hi @1575475,

Most probably you are looking for rather something like 'client_modified' 😉 (not 'server_modified'). If not set explicitly, the times are the same ('client_modified' is assumed to be like 'server_modified'). On upload a file, you can set 'client_modified' to equals to your 'SAP internal server clock'. Later you can compare it directly. Using 'server_modified' you can do the opposite task (keep on your SAP server Dropbox specific timestamp and check if something changes on Dropbox).

Hope this helps.

View solution in original post

5 Replies 5

Greg-DB
Dropbox Staff
Go to solution

Apologies this isn't better documented; I'll ask the team to fix that up.

 

When you get an async_job_id back from /2/sharing/remove_folder_member, you should call /2/sharing/check_job_status to see the result of the operation, e.g., if it completed successfully or if it failed and if so why. Please give that a try and let us know if that doesn't seem to be working properly.

1575475
Explorer | Level 3
Go to solution

Hi Greg,

thank you very much. I've implemented an additional method to fetch the async job status which works very well. And, also the group has been successfully removed from the team folder.

 

I've one last (and very important) question, out of above topic:

Is it possible to retrieve the exact DBX time which is used for the "server_modified" timestamps? (Pls. remember, only REST calls via HTTP are possible)

Background:

I want to sync files/folders between SAP and DBX.

Each file/folder has a timestamp in DBX as well as in SAP.

After the initial upload SAP -> DBX, files/folders may be changed in SAP as well as in DBX. 

These timestamps rely on the SAP internal server clock and the DBX clock(?) I guess, DBX will have some central time management?

Anyway, as both clocks will differ, it will be difficult to discover which file/folder is the current (newest) version when comparing these timestamps.

So it'll be essential to compute the difference of SAP clock and DBX clock right before comparison.

 

Currently I upload a dummy file into DBX and fetch the metadata afterwards (server_modified_time), but this looks a tad clumsy 🙂

 

Do you have any idea for a smarter solution?

 

Best regards,

Jan

Здравко
Legendary | Level 20
Go to solution

Hi @1575475,

Most probably you are looking for rather something like 'client_modified' 😉 (not 'server_modified'). If not set explicitly, the times are the same ('client_modified' is assumed to be like 'server_modified'). On upload a file, you can set 'client_modified' to equals to your 'SAP internal server clock'. Later you can compare it directly. Using 'server_modified' you can do the opposite task (keep on your SAP server Dropbox specific timestamp and check if something changes on Dropbox).

Hope this helps.

Greg-DB
Dropbox Staff
Go to solution

@1575475 Dropbox does not offer a way to check or sync with its own clock. I'd suggest you use whatever standard time synchronization service is available to you on your platform (e.g., using NTP). You can find the documentation for the date format that the Dropbox API uses here, and a guide about Detecting Changes here.

1575475
Explorer | Level 3
Go to solution

Hi Sdrawko, hi Greg,

 

since now everything's running fine I'd like to thank you again for your help.

 

Best regards,

Jan

 

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    1575475 Explorer | Level 3
  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    Здравко Legendary | Level 20
What do Dropbox user levels mean?