Test a storage connection
Connects with the stored settings and credentials and records the outcome on the storage (last_tested_at, last_test_status). For an S3 storage that is reachable it also reads whether the bucket has Object Lock turned on and stores it (object_lock_enabled); a failed Object Lock check does not fail the test and keeps the stored value.
/api/v1/storages/{storage}/test
curl -X POST 'https://app.clokeep.com/api/v1/storages/3/test' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Accept: application/json'<?php
$ch = curl_init('https://app.clokeep.com/api/v1/storages/3/test');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_TOKEN',
'Accept: application/json',
],
]);
$response = curl_exec($ch);
echo $response;
const response = await fetch("https://app.clokeep.com/api/v1/storages/3/test", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json",
},
});
console.log(await response.text());
import requests
response = requests.post(
"https://app.clokeep.com/api/v1/storages/3/test",
headers={
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json",
},
)
print(response.text)
{
"message": "Storage connection test succeeded.",
"storage_id": 3,
"success": true,
"error": null,
"last_tested_at": "2026-11-19T09:30:00+00:00",
"last_test_status": "success",
"object_lock_enabled": true,
"object_lock_error": null
}{
"message": "Unauthenticated."
}{
"message": "This token lacks the required ability."
}{
"message": "No query results for model [App\\Models\\Storage] 3"
}{
"message": "Too Many Attempts."
}Path Parameters
-
storageintegerrequired
The ID of the storage.
Example:
3
Response
200
The outcome of the connection test, also recorded on the storage.
-
messagestring
One of:
Storage connection test succeeded.,Storage connection test failed. -
storage_idinteger
-
successboolean
-
errorstringnullable
Why the test failed, for example
Could not connect to the bucket: access denied.; null when it succeeded. -
last_tested_atstring · date-timenullable
-
last_test_statusstringnullable
One of:
success,failed,null -
object_lock_enabledbooleannullable
The stored Object Lock state after this test: null for SFTP and FTP storages and until an S3 bucket has been checked.
-
object_lock_errorstringnullable
Why the Object Lock check failed, for example
Access Denied; null when it was read or not attempted.
401
The request carries no valid token: the Authorization: Bearer header is missing, or its token is unknown, revoked or past its expiry date. Send a current personal access token.
-
messagestring
Always
Unauthenticated.
403
The token may not do this. The message says why: This token lacks the required ability. (a read token), Your role does not permit this action. (its owner is not an Admin or Operator in the client), This account is disabled., This token is not bound to a client you belong to., or Client suspended.
-
messagestring
What went wrong.
404
Not found
-
messagestring
What went wrong.
429
More than 120 requests a minute for this user. Wait the seconds in Retry-After, then retry.
-
messagestring
What went wrong.