REST API v3: DELETE profile lock
To unlock a profile from a specific selection, you can send an HTTP DELETE request to the following URL:
https://api.copernica.com/v3/profile/$id/lock
The $id
in the URL must be replaced with the numerical identifier of the profile from which you want to remove a lock. The identifier of the selection (view) from which the profile should be unlocked, must be provided in the body of the request.
Required parameters
This method requires the following parameters:
- $id: The ID of the profile from which a lock should be removed (in the URL).
- view: The ID of the selection from which the profile should be unlocked (in the request body).
Request body
The body of the DELETE request must contain the view
parameter with the ID of the selection.
{
"view": 12345
}
PHP example
The following PHP script demonstrates how to use this API method:
// required scripts
require_once('CopernicaRestAPI.php');
// change this to your access token
$api = new CopernicaRestAPI("your-access-token", 3); // Assuming v3 for this example
// data for the request, including the ID of the selection
$data = array(
'view' => $viewID // ID of the selection from which the profile should be unlocked
);
// execute the request
// $profileID is the ID of the profile
$api->delete("profile/{$profileID}/lock", $data);
// On a successful operation, the API will return an X-Unlocked header
// and an HTTP 204 No Content or 200 OK status.
This example requires the REST API class.