Add credentials for an S3 bucket
POST
/s3-credential
const url = 'https://example.com/s3-credential';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"endpoint":"http://candig.docker.internal:9000","bucket":"example","access_key":"example","secret_key":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/s3-credential \ --header 'Content-Type: application/json' \ --data '{ "endpoint": "http://candig.docker.internal:9000", "bucket": "example", "access_key": "example", "secret_key": "example" }'Add credentials for an S3 bucket
Request Body
Section titled “Request Body ” Media type application/json
object
endpoint
required
URL to the endpoint
string
Example
http://candig.docker.internal:9000 bucket
required
Name of the bucket
string
access_key
required
Access key for the bucket
string
secret_key
required
Secret key for the bucket
string
Responses
Section titled “ Responses ”Success
Media type application/json
object
endpoint
required
URL to the endpoint
string
bucket
required
Name of the bucket
string
access_key
required
Access key for the bucket
string
secret_key
required
Secret key for the bucket
string
Example
{ "endpoint": "http://candig.docker.internal:9000"}