We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.

Forum Discussion

toki4004's avatar
toki4004
Helpful | Level 5
2 years ago

Rename folder - Getting async_job_id

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' );