cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Share your feedback on the Document Scanning Experience in the Dropbox App right 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: 

Re: Rename folder - Getting async_job_id

Rename folder - Getting async_job_id

toki4004
Explorer | Level 4
Go to solution

I am renaming a folder via https://api.dropboxapi.com/2/files/move_batch_v2 (using that to avoid"lock contention"). And I am getting this returned:

 

 

{".tag": "async_job_id", "async_job_id": "dbjid:AADB5ZMuOs7nIAy6oJ2NYg0MkdhI6nlw_Kb5bfLyb7LxBS1x_e5JfQuktSrgq7kXjKxbPFwHIly3aWR2YWt0BXqt"}

 

 

What is this? I am expecting to see the items in the returend strings. It is renaming it - so there is no error from what I can tell...
EDITED: Looks like it's "This response indicates that the processing is asynchronous. " But how do I get the actual response back?

 

Here is my relevant code (PHP)

 

 

	$entries = array(
        array(
            "from_path" => "/" . $user_path . "/" . $space . "/" . $string_old,
        	"to_path" => "/" . $user_path . "/" . $space . "/" . $string_new
        )
    );

    $params = array(
		"entries" => $entries,
        "autorename" => true
    );

    $ch = curl_init();
    curl_setopt( $ch, CURLOPT_POSTFIELDS, json_encode( $params ) );
    curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
    curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, "POST" );
    curl_setopt( $ch, CURLOPT_HTTPHEADER, $headers );
    curl_setopt( $ch, CURLOPT_URL, 'https://api.dropboxapi.com/2/files/move_batch_v2' );

 

 

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

You can find information on /2/files/move_batch_v2, such as its possible return types, in its documentation here. If you get a async_job_id back, you should use /2/files/move_batch/check_v2 to check the status of the job. You can find the documentation for that here.

View solution in original post

1 Reply 1

Greg-DB
Dropbox Staff
Go to solution

You can find information on /2/files/move_batch_v2, such as its possible return types, in its documentation here. If you get a async_job_id back, you should use /2/files/move_batch/check_v2 to check the status of the job. You can find the documentation for that here.

Need more support?