You are browsing the docs for the snapshot version of Nexus, the latest release is available here
Storages
Storages are rooted in the /v1/storages/{org_label}/{project_label}
collection and are used to describe where files are physically stored.
Each storage belongs to a project
identifier by the label {project_label}
inside an organization
identifier by the label {org_label}
.
To read or modify storages, the caller must have respectively storages/read
or storages/write
permissions on the current path of the project or its ancestors.
Please visit Authentication & authorization section to learn more about it.
Payload
There are several types (or classes) of storages, that represent different kinds of backends.
Local disk storage
This is the most basic storage type. It is backed by the local file-system (i.e. where the Nexus deployment is running) and rooted in an arbitrary path.
Upon project creation, a default disk storage is initialized automatically, so that users can start uploading resource attachments right away. This resource can be accessed using the api mapping alias defaultStorage
.
While typically not necessary, you can manage and create additional disk storages, provided you are aware of the local file-system structure and that Nexus has read and write access to the target folder.
{
"@type": "DiskStorage",
"name": "{name}",
"description": "{description}",
"default": "{default}",
"volume": "{volume}",
"readPermission": "{read_permission}",
"writePermission": "{write_permission}",
"maxFileSize": {max_file_size}
}
…where
{name}
: String - A name for this storage. This field is optional.{description}
: String - A description for this storage. This field is optional.{default}
: Boolean - the flag to decide whether this storage is going to become the default storage for the target project or not.{volume}
: String - the path to the local file-system volume where files using this storage will be stored. This field is optional, defaulting to the configuration flagplugins.storage.storages.disk.default-volume
(/tmp
).{read_permission}
: String - the permission a client must have in order to fetch files using this storage. This field is optional, defaulting to the configuration flagplugins.storage.storages.disk.default-read-permission
(resources/read
).{write_permission}
: String - the permission a client must have in order to create files using this storage. This field is optional, defaulting to the configuration flagplugins.storage.storages.disk.default-write-permission
(files/write
).{max_file_size}
: Long - the maximum allowed size in bytes for files uploaded using this storage. This field is optional, defaulting to the configuration flagplugins.storage.storages.disk.default-max-file-size
(10G).
Amazon S3 compatible storage
This storage type allows the use of an internal or external blob-store that is compatible with the Amazon S3 API.
In order to be able to use this storage, the configuration flag plugins.storage.storages.amazon.enabled
should be set to true
.
{
"@type": "S3Storage",
"name": "{name}",
"description": "{description}",
"bucket": "{name}",
"default": "{default}",
"readPermission": "{read_permission}",
"writePermission": "{write_permission}",
"maxFileSize": {max_file_size}
}
…where
{name}
: String - A name for this storage. This field is optional.{description}
: String - A description for this storage. This field is optional.{bucket}
: String -The AWS S3 bucket this storage points to. This field is optional, defaulting to the configuration flagplugins.storage.storages.amazon.default-endpoint
.{default}
: Boolean - the flag to decide whether this storage is going to become the default storage for the target project or not.{read_permission}
: String - the permission a client must have in order to fetch files using this storage. This field is optional, defaulting to the configuration flagplugins.storage.storages.amazon.default-read-permission
(resources/read
).{write_permission}
: String - the permission a client must have in order to create files using this storage. This field is optional, defaulting to the configuration flagplugins.storage.storages.amazon.default-write-permission
(files/write
).{max_file_size}
: Long - the maximum allowed size in bytes for files uploaded using this storage. This field is optional, defaulting to the configuration flagplugins.storage.storages.amazon.default-max-file-size
(10G).
Indexing
All the API calls modifying a storage (creation, update, deprecation) can specify whether the storage should be indexed synchronously or in the background. This behaviour is controlled using indexing
query param, which can be one of two values:
async
- (default value) the storage will be indexed asynchronouslysync
- the storage will be indexed synchronously and the API call won’t return until the indexing is finished
Create using POST
POST /v1/storages/{org_label}/{project_label}
{...}
Json payload:
- If an
@id
value is found in the payload, it will be used. - If an
@id
value is not found in the payload, one will be generated as follows:base:{UUID}
. Thebase
is theprefix
defined on the storage’s project ({project_label}
).
Example
- Request
-
source
curl -X POST \ -H "Content-Type: application/json" \ "http://localhost:8080/v1/storages/myorg/myproject" -d \ '{ "@id": "https://bluebrain.github.io/nexus/vocabulary/local", "@type": "DiskStorage", "default": false }'
- Payload
-
source
{ "@id": "https://bluebrain.github.io/nexus/vocabulary/local", "@type": "DiskStorage", "default": false }
- Response
-
source
{ "@context": [ "https://bluebrain.github.io/nexus/contexts/storages-metadata.json", "https://bluebrain.github.io/nexus/contexts/metadata.json" ], "@id": "https://bluebrain.github.io/nexus/vocabulary/local", "@type": [ "Storage", "DiskStorage" ], "_algorithm": "SHA-256", "_constrainedBy": "https://bluebrain.github.io/nexus/schemas/storages.json", "_createdAt": "2021-05-11T12:21:19.732Z", "_createdBy": "http://localhost:8080/v1/anonymous", "_deprecated": false, "_incoming": "http://localhost:8080/v1/storages/myorg/myproject/nxv:local/incoming", "_outgoing": "http://localhost:8080/v1/storages/myorg/myproject/nxv:local/outgoing", "_project": "http://localhost:8080/v1/projects/myorg/myproject", "_rev": 1, "_self": "http://localhost:8080/v1/storages/myorg/myproject/nxv:local", "_updatedAt": "2021-05-11T12:21:19.732Z", "_updatedBy": "http://localhost:8080/v1/anonymous" }
Create using PUT
This alternative endpoint to create a storage is useful in case the json payload does not contain an @id
but you want to specify one. The @id will be specified in the last segment of the endpoint URI.
PUT /v1/storages/{org_label}/{project_label}/{storage_id}
{...}
Note that if the payload contains an @id different from the {storage_id}
, the request will fail.
Example
- Request
-
source
curl -X PUT \ -H "Content-Type: application/json" \ "http://localhost:8080/v1/storages/myorg/myproject/s3" -d \ '{ "@type": "S3Storage", "default": false, "bucket": "test" }'
- Payload
-
source
{ "@type": "S3Storage", "default": false, "bucket": "test" }
- Response
-
source
{ "@context": [ "https://bluebrain.github.io/nexus/contexts/storages-metadata.json", "https://bluebrain.github.io/nexus/contexts/metadata.json" ], "@id": "http://localhost:8080/v1/resources/myorg/myproject/_/s3", "@type": [ "Storage", "S3Storage" ], "_constrainedBy": "https://bluebrain.github.io/nexus/schemas/storages.json", "_createdAt": "2021-05-11T12:22:19.195Z", "_createdBy": "http://localhost:8080/v1/anonymous", "_deprecated": false, "_incoming": "http://localhost:8080/v1/storages/myorg/myproject/s3/incoming", "_outgoing": "http://localhost:8080/v1/storages/myorg/myproject/s3/outgoing", "_project": "http://localhost:8080/v1/projects/myorg/myproject", "_rev": 1, "_self": "http://localhost:8080/v1/storages/myorg/myproject/s3", "_updatedAt": "2021-05-11T12:22:19.195Z", "_updatedBy": "http://localhost:8080/v1/anonymous" }
Update
This operation overrides the payload.
In order to ensure a client does not perform any changes to a storage without having had seen the previous revision of the storage, the last revision needs to be passed as a query parameter.
PUT /v1/storages/{org_label}/{project_label}/{storage_id}?rev={previous_rev}
{...}
… where {previous_rev}
is the last known revision number for the storage.
Example
- Request
-
source
curl -X PUT \ -H "Content-Type: application/json" \ "http://localhost:8080/v1/storages/myorg/myproject/s3?rev=1" -d \ '{ "@type": "S3Storage", "default": false, "bucket": "test-updated" }'
- Payload
-
source
{ "@type": "S3Storage", "default": false, "bucket": "test-updated" }
- Response
-
source
{ "@context": [ "https://bluebrain.github.io/nexus/contexts/storages-metadata.json", "https://bluebrain.github.io/nexus/contexts/metadata.json" ], "@id": "http://localhost:8080/v1/resources/myorg/myproject/_/s3", "@type": [ "Storage", "S3Storage" ], "_constrainedBy": "https://bluebrain.github.io/nexus/schemas/storages.json", "_createdAt": "2021-05-11T12:22:19.195Z", "_createdBy": "http://localhost:8080/v1/anonymous", "_deprecated": false, "_incoming": "http://localhost:8080/v1/storages/myorg/myproject/s3/incoming", "_outgoing": "http://localhost:8080/v1/storages/myorg/myproject/s3/outgoing", "_project": "http://localhost:8080/v1/projects/myorg/myproject", "_rev": 2, "_self": "http://localhost:8080/v1/storages/myorg/myproject/s3", "_updatedAt": "2021-05-11T12:24:24.242Z", "_updatedBy": "http://localhost:8080/v1/anonymous" }
Deprecate
Locks the storage, so no further operations can be performed. It will also not be taken into account by the default storage selection mechanism.
Deprecating a storage is considered to be an update as well.
DELETE /v1/storages/{org_label}/{project_label}/{storage_id}?rev={previous_rev}
… where {previous_rev}
is the last known revision number for the storage.
Example
- Request
-
source
curl -X DELETE \ "http://localhost:8080/v1/storages/myorg/myproject/s3?rev=3"
- Response
-
source
{ "@context": [ "https://bluebrain.github.io/nexus/contexts/storages-metadata.json", "https://bluebrain.github.io/nexus/contexts/metadata.json" ], "@id": "http://localhost:8080/v1/resources/myorg/myproject/_/s3", "@type": [ "Storage", "S3Storage" ], "_constrainedBy": "https://bluebrain.github.io/nexus/schemas/storages.json", "_createdAt": "2021-05-11T12:22:19.195Z", "_createdBy": "http://localhost:8080/v1/anonymous", "_deprecated": true, "_incoming": "http://localhost:8080/v1/storages/myorg/myproject/s3/incoming", "_outgoing": "http://localhost:8080/v1/storages/myorg/myproject/s3/outgoing", "_project": "http://localhost:8080/v1/projects/myorg/myproject", "_rev": 4, "_self": "http://localhost:8080/v1/storages/myorg/myproject/s3", "_updatedAt": "2021-05-11T12:29:27.821Z", "_updatedBy": "http://localhost:8080/v1/anonymous" }
Undeprecate
Unlocks the storage, so further operations can be performed. It will again be taken into account by the default storage selection mechanism.
Undeprecating a storage is considered to be an update as well.
PUR /v1/storages/{org_label}/{project_label}/{storage_id}/undeprecate?rev={previous_rev}
… where {previous_rev}
is the last known revision number for the storage.
Example
- Request
-
source
curl -X PUT \ "http://localhost:8080/v1/storages/myorg/myproject/s3?rev=4"
- Response
-
source
{ "@context": [ "https://bluebrain.github.io/nexus/contexts/storages-metadata.json", "https://bluebrain.github.io/nexus/contexts/metadata.json" ], "@id": "http://localhost:8080/v1/resources/myorg/myproject/_/s3", "@type": [ "Storage", "S3Storage" ], "_algorithm": "SHA-256", "_constrainedBy": "https://bluebrain.github.io/nexus/schemas/storages.json", "_createdAt": "2021-05-11T12:22:19.195Z", "_createdBy": "http://localhost:8080/v1/anonymous", "_deprecated": false, "_incoming": "http://localhost:8080/v1/storages/myorg/myproject/s3/incoming", "_outgoing": "http://localhost:8080/v1/storages/myorg/myproject/s3/outgoing", "_project": "http://localhost:8080/v1/projects/myorg/myproject", "_rev": 5, "_self": "http://localhost:8080/v1/storages/myorg/myproject/s3", "_updatedAt": "2021-05-11T12:29:27.821Z", "_updatedBy": "http://localhost:8080/v1/anonymous" }
Fetch
GET /v1/storages/{org_label}/{project_label}/{storage_id}?rev={rev}
where …
{rev}
: Number - the targeted revision to be fetched. This field is optional and defaults to the latest revision.
Example
- Request
-
source
curl "http://localhost:8080/v1/storages/myorg/myproject/s3"
- Response
-
source
{ "@context": [ "https://bluebrain.github.io/nexus/contexts/storages.json", "https://bluebrain.github.io/nexus/contexts/metadata.json" ], "@id": "http://localhost:8080/v1/resources/myorg/myproject/_/s3", "@type": [ "Storage", "S3Storage" ], "default": false, "bucket": "test-updated", "readPermission": "resources/read", "writePermission": "files/write", "_constrainedBy": "https://bluebrain.github.io/nexus/schemas/storages.json", "_createdAt": "2021-05-11T12:22:19.195Z", "_createdBy": "http://localhost:8080/v1/anonymous", "_deprecated": true, "_incoming": "http://localhost:8080/v1/storages/myorg/myproject/s3/incoming", "_outgoing": "http://localhost:8080/v1/storages/myorg/myproject/s3/outgoing", "_project": "http://localhost:8080/v1/projects/myorg/myproject", "_rev": 4, "_self": "http://localhost:8080/v1/storages/myorg/myproject/s3", "_updatedAt": "2021-05-11T12:29:27.821Z", "_updatedBy": "http://localhost:8080/v1/anonymous" }
If the redirect to Fusion feature is enabled and if the Accept
header is set to text/html
, a redirection to the fusion representation of the resource will be returned.
Fetch original payload
GET /v1/storages/{org_label}/{project_label}/{storage_id}/source?rev={rev}
where …
{rev}
: Number - the targeted revision to be fetched. This field is optional and defaults to the latest revision.
Example
- Request
-
source
curl "http://localhost:8080/v1/storages/myorg/myproject/s3/source"
- Response
-
source
{ "@type": "S3Storage", "default": false, "bucket": "test-updated" }
List
There are three available endpoints to list storages in different scopes.
Within a project
GET /v1/storages/{org_label}/{project_label}?from={from}
&size={size}
&deprecated={deprecated}
&rev={rev}
&type={type}
&createdBy={createdBy}
&updatedBy={updatedBy}
&q={search}
&sort={sort}
&aggregations={aggregations}
Within an organization
This operation returns only storages from projects defined in the organisation {org_label}
and where the caller has the resources/read
permission.
GET /v1/storages/{org_label}?from={from}
&size={size}
&deprecated={deprecated}
&rev={rev}
&type={type}
&createdBy={createdBy}
&updatedBy={updatedBy}
&q={search}
&sort={sort}
&aggregations={aggregations}
Within all projects
This operation returns only storages from projects where the caller has the resources/read
permission.
GET /v1/storages?from={from}
&size={size}
&deprecated={deprecated}
&rev={rev}
&type={type}
&createdBy={createdBy}
&updatedBy={updatedBy}
&q={search}
&sort={sort}
&aggregations={aggregations}
Parameter description
{from}
: Number - is the parameter that describes the offset for the current query; defaults to0
{size}
: Number - is the parameter that limits the number of results; defaults to20
{deprecated}
: Boolean - can be used to filter the resulting storages based on their deprecation status{rev}
: Number - can be used to filter the resulting storages based on their revision value{type}
: Iri - can be used to filter the resulting storages based on their@type
value. This parameter can appear multiple times, filtering further the@type
value.{createdBy}
: Iri - can be used to filter the resulting storages based on their creator{updatedBy}
: Iri - can be used to filter the resulting storages based on the person which performed the last update{search}
: String - can be provided to select only the storages in the collection that have attribute values matching (containing) the provided string{sort}
: String - can be used to sort storages based on a payloads’ field. This parameter can appear multiple times to enable sorting by multiple fields. The default is done by_createdBy
and@id
.{aggregations}
: Boolean - iftrue
then the response will only contain aggregations of the@type
and_project
fields; defaults tofalse
. See Aggregations.
Example
- Request
-
source
curl "http://localhost:8080/v1/storages/myorg/myproject"
- Response
-
source
{ "@context": [ "https://bluebrain.github.io/nexus/contexts/metadata.json", "https://bluebrain.github.io/nexus/contexts/search.json", "https://bluebrain.github.io/nexus/contexts/search-metadata.json" ], "_total": 3, "_results": [ { "@id": "https://bluebrain.github.io/nexus/vocabulary/diskStorageDefault", "@type": [ "Storage", "DiskStorage" ], "_algorithm": "SHA-256", "_constrainedBy": "https://bluebrain.github.io/nexus/schemas/storages.json", "_createdAt": "2021-05-11T12:21:05.781Z", "_createdBy": "http://localhost:8080/v1/realms/internal/users/delta", "_deprecated": false, "_incoming": "http://localhost:8080/v1/storages/myorg/myproject/defaultStorage/incoming", "_outgoing": "http://localhost:8080/v1/storages/myorg/myproject/defaultStorage/outgoing", "_project": "http://localhost:8080/v1/projects/myorg/myproject", "_rev": 1, "_self": "http://localhost:8080/v1/storages/myorg/myproject/defaultStorage", "_updatedAt": "2021-05-11T12:21:05.781Z", "_updatedBy": "http://localhost:8080/v1/realms/internal/users/delta" }, { "@id": "https://bluebrain.github.io/nexus/vocabulary/local", "@type": [ "Storage", "DiskStorage" ], "_algorithm": "SHA-256", "_constrainedBy": "https://bluebrain.github.io/nexus/schemas/storages.json", "_createdAt": "2021-05-11T12:21:19.732Z", "_createdBy": "http://localhost:8080/v1/anonymous", "_deprecated": false, "_incoming": "http://localhost:8080/v1/storages/myorg/myproject/nxv:local/incoming", "_outgoing": "http://localhost:8080/v1/storages/myorg/myproject/nxv:local/outgoing", "_project": "http://localhost:8080/v1/projects/myorg/myproject", "_rev": 1, "_self": "http://localhost:8080/v1/storages/myorg/myproject/nxv:local", "_updatedAt": "2021-05-11T12:21:19.732Z", "_updatedBy": "http://localhost:8080/v1/anonymous" }, { "@id": "http://localhost:8080/v1/resources/myorg/myproject/_/s3", "@type": [ "Storage", "S3Storage" ], "_constrainedBy": "https://bluebrain.github.io/nexus/schemas/storages.json", "_createdAt": "2021-05-11T12:22:19.195Z", "_createdBy": "http://localhost:8080/v1/anonymous", "_deprecated": true, "_incoming": "http://localhost:8080/v1/storages/myorg/myproject/s3/incoming", "_outgoing": "http://localhost:8080/v1/storages/myorg/myproject/s3/outgoing", "_project": "http://localhost:8080/v1/projects/myorg/myproject", "_rev": 4, "_self": "http://localhost:8080/v1/storages/myorg/myproject/s3", "_updatedAt": "2021-05-11T12:29:27.821Z", "_updatedBy": "http://localhost:8080/v1/anonymous" } ] }
Server Sent Events
From Delta 1.5, it is possible to fetch SSEs for all storages or just storages in the scope of an organization or a project.
GET /v1/storages/events # for all storage events in the application
GET /v1/storages/{org_label}/events # for storage events in the given organization
GET /v1/storages/{org_label}/{project_label}/events # for storage events in the given project
The caller must have respectively the events/read
permission on /
, {org_label}
and {org_label}/{project_label}
.
{org_label}
: String - the selected organization for which the events are going to be filtered{project_label}
: String - the selected project for which the events are going to be filteredLast-Event-Id
: String - optional HTTP Header that identifies the last consumed resource event. It can be used for cases when a client does not want to retrieve the whole event stream, but to start after a specific event.
The event type for storages SSEs have been changed so that it is easier to distinguish them from other types of resources.
Example
- Request
-
source
curl "http://localhost:8080/v1/storages/events"
- Response
-
source
dmontero:~$ curl "http://localhost:8080/v1/storages/events" data:{"@context":["https://bluebrain.github.io/nexus/contexts/metadata.json","https://bluebrain.github.io/nexus/contexts/storages.json"],"@type":"StorageCreated","_constrainedBy":"https://bluebrain.github.io/nexus/schemas/storages.json","_instant":"2021-05-11T12:21:05.781Z","_project":"http://localhost:8080/v1/projects/myorg/myproject","_resourceId":"https://bluebrain.github.io/nexus/vocabulary/diskStorageDefault","_rev":1,"_source":{"@id":"https://bluebrain.github.io/nexus/vocabulary/diskStorageDefault","@type":"https://bluebrain.github.io/nexus/vocabulary/DiskStorage","default":true},"_storageId":"https://bluebrain.github.io/nexus/vocabulary/diskStorageDefault","_subject":"http://localhost:8080/v1/realms/internal/users/delta","_types":["https://bluebrain.github.io/nexus/vocabulary/Storage","https://bluebrain.github.io/nexus/vocabulary/DiskStorage"]} event:StorageCreated id:5c156db0-b253-11eb-b48a-9d94c78eda08 data:{"@context":["https://bluebrain.github.io/nexus/contexts/metadata.json","https://bluebrain.github.io/nexus/contexts/storages.json"],"@type":"StorageCreated","_constrainedBy":"https://bluebrain.github.io/nexus/schemas/storages.json","_instant":"2021-05-11T12:21:19.732Z","_project":"http://localhost:8080/v1/projects/myorg/myproject","_resourceId":"https://bluebrain.github.io/nexus/vocabulary/local","_rev":1,"_source":{"@id":"https://bluebrain.github.io/nexus/vocabulary/local","@type":"DiskStorage","default":false},"_storageId":"https://bluebrain.github.io/nexus/vocabulary/local","_subject":"http://localhost:8080/v1/anonymous","_types":["https://bluebrain.github.io/nexus/vocabulary/Storage","https://bluebrain.github.io/nexus/vocabulary/DiskStorage"]} event:StorageCreated id:642ccf20-b253-11eb-b48a-9d94c78eda08 data:{"@context":["https://bluebrain.github.io/nexus/contexts/metadata.json","https://bluebrain.github.io/nexus/contexts/storages.json"],"@type":"StorageCreated","_constrainedBy":"https://bluebrain.github.io/nexus/schemas/storages.json","_instant":"2021-05-11T12:22:19.195Z","_project":"http://localhost:8080/v1/projects/myorg/myproject","_resourceId":"http://localhost:8080/v1/resources/myorg/myproject/_/s3","_rev":1,"_source":{"@type":"S3Storage","default":false,"folder":"test"},"_storageId":"http://localhost:8080/v1/resources/myorg/myproject/_/s3","_subject":"http://localhost:8080/v1/anonymous","_types":["https://bluebrain.github.io/nexus/vocabulary/Storage","https://bluebrain.github.io/nexus/vocabulary/S3Storage"]} event:StorageCreated id:879fab30-b253-11eb-b48a-9d94c78eda08 data:{"@context":["https://bluebrain.github.io/nexus/contexts/metadata.json","https://bluebrain.github.io/nexus/contexts/storages.json"],"@type":"StorageUpdated","_constrainedBy":"https://bluebrain.github.io/nexus/schemas/storages.json","_instant":"2021-05-11T12:24:24.242Z","_project":"http://localhost:8080/v1/projects/myorg/myproject","_resourceId":"http://localhost:8080/v1/resources/myorg/myproject/_/s3","_rev":2,"_source":{"@type":"S3Storage","default":false,"folder":"test-updated"},"_storageId":"http://localhost:8080/v1/resources/myorg/myproject/_/s3","_subject":"http://localhost:8080/v1/anonymous","_types":["https://bluebrain.github.io/nexus/vocabulary/Storage","https://bluebrain.github.io/nexus/vocabulary/S3Storage"]} event:StorageUpdated id:d2226030-b253-11eb-b48a-9d94c78eda08 data:{"@context":["https://bluebrain.github.io/nexus/contexts/metadata.json","https://bluebrain.github.io/nexus/contexts/storages.json"],"@type":"StorageTagAdded","tag":"mytag","targetRev":1,"_constrainedBy":"https://bluebrain.github.io/nexus/schemas/storages.json","_instant":"2021-05-11T12:28:08.479Z","_project":"http://localhost:8080/v1/projects/myorg/myproject","_resourceId":"http://localhost:8080/v1/resources/myorg/myproject/_/s3","_rev":3,"_storageId":"http://localhost:8080/v1/resources/myorg/myproject/_/s3","_subject":"http://localhost:8080/v1/anonymous","_types":["https://bluebrain.github.io/nexus/vocabulary/Storage","https://bluebrain.github.io/nexus/vocabulary/S3Storage"]} event:StorageTagAdded id:57ca3a00-b254-11eb-b48a-9d94c78eda08 data:{"@context":["https://bluebrain.github.io/nexus/contexts/metadata.json","https://bluebrain.github.io/nexus/contexts/storages.json"],"@type":"StorageDeprecated","_constrainedBy":"https://bluebrain.github.io/nexus/schemas/storages.json","_instant":"2021-05-11T12:29:27.821Z","_project":"http://localhost:8080/v1/projects/myorg/myproject","_resourceId":"http://localhost:8080/v1/resources/myorg/myproject/_/s3","_rev":4,"_storageId":"http://localhost:8080/v1/resources/myorg/myproject/_/s3","_subject":"http://localhost:8080/v1/anonymous","_types":["https://bluebrain.github.io/nexus/vocabulary/Storage","https://bluebrain.github.io/nexus/vocabulary/S3Storage"]} event:StorageDeprecated id:8714dae0-b254-11eb-b48a-9d94c78eda08
Fetch statistics
This endpoint is experimental and the response structure might change in the future.
GET /v1/storages/{org_label}/{project_label}/{storage_id}/statistics
It returns:
- the number of physical files stored on the storage (
files
). - the space used by this file on the given storage (
spaceUsed
).
Example