Containers

Lists all containers.

get

API Key Scope: containers / index

Authorizations
Query parameters
limitintegerOptional

The number of items to display for pagination.

offsetintegerOptional

The number of items to skip for pagination.

sort_bystring[]Optional

Sort results by attribute.

Can sort on multiple attributes, separated by |. Order direction can be suffixing the attribute by either :asc (default) or :desc.

idstringOptional

Filter on id

namestringOptional

Filter on name

commentstringOptional

Filter on comment

quota_total_sizestringOptional

Filter on quota total size

quota_on_cachestringOptional

Filter on quota on cache

stat_total_filesstringOptional

Filter on stat total files

stat_total_sizestringOptional

Filter on stat total size

stat_size_on_cachestringOptional

Filter on stat size on cache

guest_rightstringOptional

Filter on guest right

last_updatestringOptional

Filter on last update

Responses
200

List of containers.

application/json
get
/containers
GET /api/v2/containers HTTP/1.1
Host: localhost
Authorization: Basic username:password
Accept: */*
200

List of containers.

{
  "count": 1,
  "containers": [
    {
      "id": 100,
      "name": "my-container",
      "comment": "Read only container for random stuff",
      "push_pool_id": 1,
      "cleaning_pool_id": 1,
      "quota_total_size": 1,
      "quota_on_cache": 1,
      "stat_total_files": 99301,
      "only_on_cache_file_count": 19123,
      "stat_total_size": 6145076462,
      "stat_size_on_cache": 6899417088,
      "only_on_cache_file_size_sum": 3294517012,
      "guest_right": "read",
      "last_update": "2019-08-05T14:24:15.000Z"
    }
  ]
}

Creates a new container.

post

API Key Scope: containers / create

Authorizations
Body
idinteger · int64Read-onlyOptionalExample: 100
namestringOptionalExample: my-container
commentstringOptionalExample: Read only container for random stuff
push_pool_idinteger · int64Optional
cleaning_pool_idinteger · int64Optional
quota_total_sizeinteger · int64Optional
quota_on_cacheinteger · int64Optional
stat_total_filesinteger · int64Read-onlyOptionalExample: 99301
only_on_cache_file_countinteger · int64Read-onlyOptionalExample: 19123
stat_total_sizeinteger · int64Read-onlyOptionalExample: 6145076462
stat_size_on_cacheinteger · int64Read-onlyOptionalExample: 6899417088
only_on_cache_file_size_suminteger · int64Read-onlyOptionalExample: 3294517012
guest_rightstring · enumOptionalExample: readPossible values:
last_updatestring · date-timeRead-onlyOptionalExample: 2019-08-05T14:24:15.000Z
Responses
201

A specific container.

application/json
post
/containers
POST /api/v2/containers HTTP/1.1
Host: localhost
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 171

{
  "name": "my-container",
  "comment": "Read only container for random stuff",
  "push_pool_id": 1,
  "cleaning_pool_id": 1,
  "quota_total_size": 1,
  "quota_on_cache": 1,
  "guest_right": "read"
}
{
  "id": 100,
  "name": "my-container",
  "comment": "Read only container for random stuff",
  "push_pool_id": 1,
  "cleaning_pool_id": 1,
  "quota_total_size": 1,
  "quota_on_cache": 1,
  "stat_total_files": 99301,
  "only_on_cache_file_count": 19123,
  "stat_total_size": 6145076462,
  "stat_size_on_cache": 6899417088,
  "only_on_cache_file_size_sum": 3294517012,
  "guest_right": "read",
  "last_update": "2019-08-05T14:24:15.000Z"
}

Displays a specific container.

get

API Key Scope: containers / show

Authorizations
Path parameters
container_idstringRequired

Numeric ID or name of container.

Responses
200

A specific container.

application/json
get
/containers/{container_id}
GET /api/v2/containers/{container_id} HTTP/1.1
Host: localhost
Authorization: Basic username:password
Accept: */*
{
  "id": 100,
  "name": "my-container",
  "comment": "Read only container for random stuff",
  "push_pool_id": 1,
  "cleaning_pool_id": 1,
  "quota_total_size": 1,
  "quota_on_cache": 1,
  "stat_total_files": 99301,
  "only_on_cache_file_count": 19123,
  "stat_total_size": 6145076462,
  "stat_size_on_cache": 6899417088,
  "only_on_cache_file_size_sum": 3294517012,
  "guest_right": "read",
  "last_update": "2019-08-05T14:24:15.000Z"
}

Updates a specific container.

put

API Key Scope: containers / update

Authorizations
Path parameters
container_idstringRequired

Numeric ID or name of container.

Body
idinteger · int64Read-onlyOptionalExample: 100
namestringOptionalExample: my-container
commentstringOptionalExample: Read only container for random stuff
push_pool_idinteger · int64Optional
cleaning_pool_idinteger · int64Optional
quota_total_sizeinteger · int64Optional
quota_on_cacheinteger · int64Optional
stat_total_filesinteger · int64Read-onlyOptionalExample: 99301
only_on_cache_file_countinteger · int64Read-onlyOptionalExample: 19123
stat_total_sizeinteger · int64Read-onlyOptionalExample: 6145076462
stat_size_on_cacheinteger · int64Read-onlyOptionalExample: 6899417088
only_on_cache_file_size_suminteger · int64Read-onlyOptionalExample: 3294517012
guest_rightstring · enumOptionalExample: readPossible values:
last_updatestring · date-timeRead-onlyOptionalExample: 2019-08-05T14:24:15.000Z
Responses
200

A specific container.

application/json
put
/containers/{container_id}
PUT /api/v2/containers/{container_id} HTTP/1.1
Host: localhost
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 171

{
  "name": "my-container",
  "comment": "Read only container for random stuff",
  "push_pool_id": 1,
  "cleaning_pool_id": 1,
  "quota_total_size": 1,
  "quota_on_cache": 1,
  "guest_right": "read"
}
{
  "id": 100,
  "name": "my-container",
  "comment": "Read only container for random stuff",
  "push_pool_id": 1,
  "cleaning_pool_id": 1,
  "quota_total_size": 1,
  "quota_on_cache": 1,
  "stat_total_files": 99301,
  "only_on_cache_file_count": 19123,
  "stat_total_size": 6145076462,
  "stat_size_on_cache": 6899417088,
  "only_on_cache_file_size_sum": 3294517012,
  "guest_right": "read",
  "last_update": "2019-08-05T14:24:15.000Z"
}

Destroys a specific container.

delete

API Key Scope: containers / destroy

Authorizations
Path parameters
container_idstringRequired

Numeric ID or name of container.

Responses
204

Container destroyed.

No content

delete
/containers/{container_id}
DELETE /api/v2/containers/{container_id} HTTP/1.1
Host: localhost
Authorization: Basic username:password
Accept: */*
204

Container destroyed.

No content

Lists all privilege on the container.

get

API Key Scope: container_privileges / index

Authorizations
Path parameters
container_idstringRequired

Numeric ID or name of container.

Query parameters
limitintegerOptional

The number of items to display for pagination.

offsetintegerOptional

The number of items to skip for pagination.

sort_bystring[]Optional

Sort results by attribute.

Can sort on multiple attributes, separated by |. Order direction can be suffixing the attribute by either :asc (default) or :desc.

idstringOptional

Filter on id

namestringOptional

Filter on name

privilegestringOptional

Filter on privilege

typestringOptional

Filter on type

Responses
200

List of container privileges.

application/json
get
/containers/{container_id}/container_privileges
GET /api/v2/containers/{container_id}/container_privileges HTTP/1.1
Host: localhost
Authorization: Basic username:password
Accept: */*
200

List of container privileges.

{
  "count": 1,
  "container_privileges": [
    {
      "id": 1,
      "name": "admin",
      "privilege": "read_write",
      "type": "user"
    }
  ]
}

Creates a new privilege on the container.

post

API Key Scope: container_privileges / create

Authorizations
Path parameters
container_idstringRequired

Numeric ID or name of container.

Body
idinteger · int64Read-onlyOptionalExample: 1
namestringOptionalExample: admin
privilegestring · enumOptionalExample: read_writePossible values:
typestring · enumOptionalExample: userPossible values:
Responses
201

A specific container privilege.

application/json
post
/containers/{container_id}/container_privileges
POST /api/v2/containers/{container_id}/container_privileges HTTP/1.1
Host: localhost
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 55

{
  "name": "admin",
  "privilege": "read_write",
  "type": "user"
}
{
  "id": 1,
  "name": "admin",
  "privilege": "read_write",
  "type": "user"
}

Displays a specific privilege.

get

API Key Scope: container_privileges / show

Authorizations
Path parameters
container_idstringRequired

Numeric ID or name of container.

container_privilege_idintegerRequired

Numeric ID of container privilege.

Responses
200

A specific container privilege.

application/json
get
/containers/{container_id}/container_privileges/{container_privilege_id}
GET /api/v2/containers/{container_id}/container_privileges/{container_privilege_id} HTTP/1.1
Host: localhost
Authorization: Basic username:password
Accept: */*
{
  "id": 1,
  "name": "admin",
  "privilege": "read_write",
  "type": "user"
}

Updates a specific privilege.

put

API Key Scope: container_privileges / update

Authorizations
Path parameters
container_idstringRequired

Numeric ID or name of container.

container_privilege_idintegerRequired

Numeric ID of container privilege.

Body
idinteger · int64Read-onlyOptionalExample: 1
namestringOptionalExample: admin
privilegestring · enumOptionalExample: read_writePossible values:
typestring · enumOptionalExample: userPossible values:
Responses
200

A specific container privilege.

application/json
put
/containers/{container_id}/container_privileges/{container_privilege_id}
PUT /api/v2/containers/{container_id}/container_privileges/{container_privilege_id} HTTP/1.1
Host: localhost
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 55

{
  "name": "admin",
  "privilege": "read_write",
  "type": "user"
}
{
  "id": 1,
  "name": "admin",
  "privilege": "read_write",
  "type": "user"
}

Destroys a specific privilege.

delete

API Key Scope: container_privileges / destroy

Authorizations
Path parameters
container_idstringRequired

Numeric ID or name of container.

container_privilege_idintegerRequired

Numeric ID of container privilege.

Responses
204

Container privilege destroyed.

No content

delete
/containers/{container_id}/container_privileges/{container_privilege_id}
DELETE /api/v2/containers/{container_id}/container_privileges/{container_privilege_id} HTTP/1.1
Host: localhost
Authorization: Basic username:password
Accept: */*
204

Container privilege destroyed.

No content

Last updated

Was this helpful?