# s3

Manage S3 access.
Set management node URL:

# GET /s3/users

# Parameters

  • No parameters...

# Endpoint

curl -X GET http://mgmt-node:8080/api/s3/users 

# Response 200

  • uidstring-
  • namestring-
  • emailstring-
  • suspendedboolean-
  • subusersarray-
    • subuserstring-
    • permissionsstring[full-control, read-write, read, write]
  • bucketQuotaobject-
    • enabledboolean-
    • maxSizeKbinteger-
    • maxObjectsinteger-
  • userQuotaobject-
    • enabledboolean-
    • maxSizeKbinteger-
    • maxObjectsinteger-

# Example response

[
  {
    "uid": "string",
    "name": "string",
    "email": "string",
    "suspended": true,
    "subusers": [
      {
        "subuser": "string",
        "permissions": "full-control"
      }
    ],
    "bucketQuota": {
      "enabled": true,
      "maxSizeKb": 0,
      "maxObjects": 0
    },
    "userQuota": {
      "enabled": true,
      "maxSizeKb": 0,
      "maxObjects": 0
    }
  }
]

# POST /s3/users

# Parameters

  • bodyobject-
    • uidstring-
    • namestring-
    • emailstring-

# Endpoint

curl -X POST http://mgmt-node:8080/api/s3/users 

# Example body

{
  "uid": "string",
  "name": "string",
  "email": "string"
}

# GET /s3/users/{uid}/key

# Parameters

  • uidstring-

# Endpoint

curl -X GET http://mgmt-node:8080/api/s3/users/{uid}/key 

# Response 200

  • userstring-
  • accessKeystring-
  • secretKeystring-

# Example response

{
  "user": "string",
  "accessKey": "string",
  "secretKey": "string"
}

# GET /s3/users/{uid}/{subuser}/key

# Parameters

  • uidstring-
  • subuserstring-

# Endpoint

curl -X GET http://mgmt-node:8080/api/s3/users/{uid}/{subuser}/key 

# Response 200

  • userstring-
  • accessKeystring-
  • secretKeystring-

# Example response

{
  "user": "string",
  "accessKey": "string",
  "secretKey": "string"
}

# GET /s3/users/{uid}/cfg-file/download

# Parameters

  • uidstring-

# Endpoint

curl -X GET http://mgmt-node:8080/api/s3/users/{uid}/cfg-file/download 

# Response 200

  • fileNamestring-
  • urlstring-
  • fileContentsstring-

# Example response

{
  "fileName": "string",
  "url": "string",
  "fileContents": "string"
}

# GET /s3/users/{uid}/{subuser}/cfg-file/download

# Parameters

  • uidstring-
  • subuserstring-

# Endpoint

curl -X GET http://mgmt-node:8080/api/s3/users/{uid}/{subuser}/cfg-file/download 

# Response 200

  • fileNamestring-
  • urlstring-
  • fileContentsstring-

# Example response

{
  "fileName": "string",
  "url": "string",
  "fileContents": "string"
}

# POST /s3/users/{uid}

# Parameters

  • uidstring-
  • bodyobject-
    • subuserstring-
    • permissionsstring[full-control, read-write, read, write]

# Endpoint

curl -X POST http://mgmt-node:8080/api/s3/users/{uid} 

# Example body

{
  "subuser": "string",
  "permissions": "full-control"
}

# DELETE /s3/users/{uid}

# Parameters

  • uidstring-

# Endpoint

curl -X DELETE http://mgmt-node:8080/api/s3/users/{uid} 

# PATCH /s3/users/{uid}

# Parameters

  • uidstring-
  • bodyobject-
    • namestring-
    • emailstring-
    • suspendedboolean-

# Endpoint

curl -X PATCH http://mgmt-node:8080/api/s3/users/{uid} 

# Example body

{
  "name": "string",
  "email": "string",
  "suspended": true
}

# DELETE /s3/users/{uid}/{subuser}

# Parameters

  • uidstring-
  • subuserstring-

# Endpoint

curl -X DELETE http://mgmt-node:8080/api/s3/users/{uid}/{subuser} 

# PATCH /s3/users/{uid}/{subuser}

# Parameters

  • uidstring-
  • subuserstring-
  • bodyobject-
    • permissionsstring[full-control, read-write, read, write]

# Endpoint

curl -X PATCH http://mgmt-node:8080/api/s3/users/{uid}/{subuser} 

# Example body

{
  "permissions": "full-control"
}

# PUT /s3/users/{uid}/quota

Set a quota for this user.

# Parameters

  • uidstring-
  • bodyobject-
    • enabledboolean-
    • maxSizeKbinteger-
    • maxObjectsinteger-

# Endpoint

curl -X PUT http://mgmt-node:8080/api/s3/users/{uid}/quota 

# Example body

{
  "enabled": true,
  "maxSizeKb": 0,
  "maxObjects": 0
}

# PUT /s3/users/{uid}/bucket-quota

Set a quota for all buckets owned by this user.

# Parameters

  • uidstring-
  • bodyobject-
    • enabledboolean-
    • maxSizeKbinteger-
    • maxObjectsinteger-

# Endpoint

curl -X PUT http://mgmt-node:8080/api/s3/users/{uid}/bucket-quota 

# Example body

{
  "enabled": true,
  "maxSizeKb": 0,
  "maxObjects": 0
}

# GET /s3/buckets

# Parameters

  • No parameters...

# Endpoint

curl -X GET http://mgmt-node:8080/api/s3/buckets 

# Response 200

  • bucketstring-
  • placementRulestring-
  • idstring-
  • ownerstring-
  • modifiedinteger-
  • usageobjectData usage by zone.
  • quotaobject-
    • enabledboolean-
    • maxSizeKbinteger-
    • maxObjectsinteger-
  • usageSumobject-
    • sizeKbinteger-
    • sizeKbActualinteger-
    • numObjectsnumber-

# Example response

[
  {
    "bucket": "string",
    "placementRule": "string",
    "id": "string",
    "owner": "string",
    "modified": 0,
    "usage": {},
    "quota": {
      "enabled": true,
      "maxSizeKb": 0,
      "maxObjects": 0
    },
    "usageSum": {
      "sizeKb": 0,
      "sizeKbActual": 0,
      "numObjects": 
    }
  }
]

# GET /s3/buckets/{bucketName}

# Parameters

  • bucketNamestring-

# Endpoint

curl -X GET http://mgmt-node:8080/api/s3/buckets/{bucketName} 

# Response 200

  • corsarray-
    • idstring-
    • allowedMethodsarray-
    • allowedOriginsarray-
    • maxAgeSecondsinteger-
    • exposedHeadersarray-
    • allowedHeadersarray-
  • aclarray-
    • granteestring[ALL_USERS, AUTHENTICATED_USERS, SINGLE_USER, LOG_DELIVERY]
    • userIdstringOnly meaningful if grantee == SINGLE_USER.
    • displayNamestringInformational. Not used when setting ACLs.
    • permissionstring[FullControl, Read, Write, ReadAcp, WriteAcp]

# Example response

{
  "cors": [
    {
      "id": "string",
      "allowedMethods": [
        "GET"
      ],
      "allowedOrigins": [
        "string"
      ],
      "maxAgeSeconds": 0,
      "exposedHeaders": [
        "string"
      ],
      "allowedHeaders": [
        "string"
      ]
    }
  ],
  "acl": [
    {
      "grantee": "ALL_USERS",
      "userId": "string",
      "displayName": "string",
      "permission": "FullControl"
    }
  ]
}

# PUT /s3/buckets/{bucketName}

# Parameters

  • bucketNamestring-
  • bodyobjectRequest to create or update an S3 bucket.
    • ownerstringChange owner to this uid.
    • aclarray-
      • granteestring[ALL_USERS, AUTHENTICATED_USERS, SINGLE_USER, LOG_DELIVERY]
      • userIdstringOnly meaningful if grantee == SINGLE_USER.
      • displayNamestringInformational. Not used when setting ACLs.
      • permissionstring[FullControl, Read, Write, ReadAcp, WriteAcp]

# Endpoint

curl -X PUT http://mgmt-node:8080/api/s3/buckets/{bucketName} 

# Example body

{
  "owner": "string",
  "acl": [
    {
      "grantee": "ALL_USERS",
      "userId": "string",
      "displayName": "string",
      "permission": "FullControl"
    }
  ]
}

# Response 200

  • statusCodeinteger-
  • idinteger-
  • startedBystring-
  • startedAtinteger-
  • doneboolean-
  • namestring-
  • statestring[WAITING, RUNNING, FINISHED, FAILED, CANCELED]
  • objectstring-
  • outputstring-

# Example response

{
  "statusCode": 0,
  "id": 0,
  "startedBy": "string",
  "startedAt": 0,
  "done": true,
  "name": "string",
  "state": "WAITING",
  "object": "string",
  "output": "string"
}

# DELETE /s3/buckets/{bucketName}

# Parameters

  • bucketNamestring-
  • bodyobject-
    • namestring-
    • deleteDataboolean-
    • thisWillDeleteDatastring-

# Endpoint

curl -X DELETE http://mgmt-node:8080/api/s3/buckets/{bucketName} 

# Example body

{
  "name": "string",
  "deleteData": true,
  "thisWillDeleteData": "string"
}

# Response 200

  • statusCodeinteger-
  • idinteger-
  • startedBystring-
  • startedAtinteger-
  • doneboolean-
  • namestring-
  • statestring[WAITING, RUNNING, FINISHED, FAILED, CANCELED]
  • objectstring-
  • outputstring-

# Example response

{
  "statusCode": 0,
  "id": 0,
  "startedBy": "string",
  "startedAt": 0,
  "done": true,
  "name": "string",
  "state": "WAITING",
  "object": "string",
  "output": "string"
}

# PATCH /s3/buckets/{bucketName}

# Parameters

  • bucketNamestring-
  • bodyobjectRequest to create or update an S3 bucket.
    • ownerstringChange owner to this uid.
    • aclarray-
      • granteestring[ALL_USERS, AUTHENTICATED_USERS, SINGLE_USER, LOG_DELIVERY]
      • userIdstringOnly meaningful if grantee == SINGLE_USER.
      • displayNamestringInformational. Not used when setting ACLs.
      • permissionstring[FullControl, Read, Write, ReadAcp, WriteAcp]

# Endpoint

curl -X PATCH http://mgmt-node:8080/api/s3/buckets/{bucketName} 

# Example body

{
  "owner": "string",
  "acl": [
    {
      "grantee": "ALL_USERS",
      "userId": "string",
      "displayName": "string",
      "permission": "FullControl"
    }
  ]
}

# GET /s3/buckets/{bucketName}/objects

# Parameters

  • bucketNamestring-
  • maxinteger-
  • prefixstring-
  • continuationTokenstring-
  • flatViewboolean-

# Endpoint

curl -X GET http://mgmt-node:8080/api/s3/buckets/{bucketName}/objects 

# Response 200

  • prefixesarray-
  • objectsarray-
    • bucketNamestring-
    • keystring-
    • sizeinteger-
    • lastModifiedstring-
    • storageClassstring-
    • ownerobject-
      • displayNamestring-
      • idstring-
    • etagstring-
  • continuationTokenstring-

# Example response

{
  "prefixes": [
    "string"
  ],
  "objects": [
    {
      "bucketName": "string",
      "key": "string",
      "size": 0,
      "lastModified": "string",
      "storageClass": "string",
      "owner": {
        "displayName": "string",
        "id": "string"
      },
      "etag": "string"
    }
  ],
  "continuationToken": "string"
}

# DELETE /s3/buckets/{bucketName}/objects

Delete an object by name.

# Parameters

  • bucketNamestring-
  • keystring-

# Endpoint

curl -X DELETE http://mgmt-node:8080/api/s3/buckets/{bucketName}/objects 

# GET /s3/buckets/{bucketName}/objects/metadata

Get metadata of an object.

# Parameters

  • bucketNamestring-
  • keystring-

# Endpoint

curl -X GET http://mgmt-node:8080/api/s3/buckets/{bucketName}/objects/metadata 

# Response 200

  • rawobject-
  • lastModifiedinteger-
  • contentTypestring-
  • etagstring-
  • sizeinteger-
  • userMetadataobject-
  • versionIdstring-
  • contentDispositionstring-
  • cacheControlstring-
  • expirationTimeinteger-
  • expirationTimeRuleIdstring-
  • contentEncodingstring-
  • contentLanguagestring-
  • contentMD5string-
  • httpExpiresDateinteger-

# Example response

{
  "raw": {},
  "lastModified": 0,
  "contentType": "string",
  "etag": "string",
  "size": 0,
  "userMetadata": {},
  "versionId": "string",
  "contentDisposition": "string",
  "cacheControl": "string",
  "expirationTime": 0,
  "expirationTimeRuleId": "string",
  "contentEncoding": "string",
  "contentLanguage": "string",
  "contentMD5": "string",
  "httpExpiresDate": 0
}

# PUT /s3/buckets/{bucketName}/objects/metadata

Override object metadata.

# Parameters

  • bucketNamestring-
  • keystring-
  • bodyobject-
    • rawobject-
    • lastModifiedinteger-
    • contentTypestring-
    • etagstring-
    • sizeinteger-
    • userMetadataobject-
    • versionIdstring-
    • contentDispositionstring-
    • cacheControlstring-
    • expirationTimeinteger-
    • expirationTimeRuleIdstring-
    • contentEncodingstring-
    • contentLanguagestring-
    • contentMD5string-
    • httpExpiresDateinteger-

# Endpoint

curl -X PUT http://mgmt-node:8080/api/s3/buckets/{bucketName}/objects/metadata 

# Example body

{
  "raw": {},
  "lastModified": 0,
  "contentType": "string",
  "etag": "string",
  "size": 0,
  "userMetadata": {},
  "versionId": "string",
  "contentDisposition": "string",
  "cacheControl": "string",
  "expirationTime": 0,
  "expirationTimeRuleId": "string",
  "contentEncoding": "string",
  "contentLanguage": "string",
  "contentMD5": "string",
  "httpExpiresDate": 0
}

# GET /s3/buckets/{bucketName}/download

Download an object.

# Parameters

  • bucketNamestring-
  • keystring-

# Endpoint

curl -X GET http://mgmt-node:8080/api/s3/buckets/{bucketName}/download 

# Response 200

  • fileNamestring-
  • urlstring-
  • fileContentsstring-

# Example response

{
  "fileName": "string",
  "url": "string",
  "fileContents": "string"
}

# PUT /s3/buckets/{bucketName}/upload

Upload an object.

# Parameters

  • bucketNamestring-
  • keystring-
  • filefile-
  • sizeintegerRequired to write large files directly into Ceph, uploads without this field must be buffered in RAM

# Endpoint

curl -X PUT http://mgmt-node:8080/api/s3/buckets/{bucketName}/upload 

# PUT /s3/buckets/{bucketName}/objects/copy

Copy an object.

# Parameters

  • bucketNamestring-
  • keystring-
  • dstBucketNamestring-
  • dstKeystring-

# Endpoint

curl -X PUT http://mgmt-node:8080/api/s3/buckets/{bucketName}/objects/copy 

# PUT /s3/buckets/{bucketName}/objects/move

Move an object.

# Parameters

  • bucketNamestring-
  • keystring-
  • dstBucketNamestring-
  • dstKeystring-

# Endpoint

curl -X PUT http://mgmt-node:8080/api/s3/buckets/{bucketName}/objects/move