You are browsing the docs for Nexus v1.7.x, 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",
"default": "{default}",
"volume": "{volume}",
"readPermission": "{read_permission}",
"writePermission": "{write_permission}",
"capacity": "{capacity}",
"maxFileSize": {max_file_size}
}
…where
{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
).{capacity}
: Long - the maximum allocated capacity in bytes for storing files using this storage. This field is optional, defaulting to the configuration flagplugins.storage.storages.disk.default-capacity
(None).{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).
Remote disk storage
The Remote disk storage and it remote service implementation are now deprecated and will be removed in an upcoming release.
This storage type relies on a remote HTTP service that exposes basic file operations on an underlying POSIX file-system. This is particularly handy if your organization is running some kind of distributed network storage (such as Ceph, Gluster, GPFS, Lustre, …) that you don’t want to mount directly on the system where Nexus Delta runs.
While there’s no formal specification for this service, you can check out or deploy our own implementation: Nexus remote storage service.
In order to be able to use this storage, the configuration flag plugins.storage.storages.remote-disk.enabled
should be set to true
.
{
"@type": "RemoteDiskStorage",
"default": "{default}",
"endpoint": "{endpoint}",
"credentials": "{credentials}",
"folder": "{folder}",
"readPermission": "{read_permission}",
"writePermission": "{write_permission}",
"maxFileSize": {max_file_size}
}
…where
{default}
: Boolean - the flag to decide whether this storage is going to become the default storage for the target project or not.{endpoint}
: Uri - the endpoint where the storage service is listening to requests. This field is optional, defaulting to the configuration flagplugins.storage.storages.remote-disk.default-endpoint
.{credentials}
: String - the service account access token to authenticate and authorize Nexus Delta client against the storage service. This field is optional, defaulting to the configuration flagplugins.storage.storages.remote-disk.default-credentials
.{folder}
: String - the storage service bucket where files using this storage are going to be saved.{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.remote-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.remote-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.remote-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",
"default": "{default}",
"endpoint": "{endpoint}",
"accessKey": "{access_key}",
"secretKey": "{secret_key}",
"region": "{region}",
"readPermission": "{read_permission}",
"writePermission": "{write_permission}",
"maxFileSize": {max_file_size}
}
…where
{default}
: Boolean - the flag to decide whether this storage is going to become the default storage for the target project or not.{endpoint}
: Uri - the Amazon S3 compatible service endpoint. This field is optional, defaulting to the configuration flagplugins.storage.storages.amazon.default-endpoint
.{access_key}
: String - the Amazon S3 compatible access key. This field is optional, defaulting to the configuration flagplugins.storage.storages.amazon.default-access-key
.{secret_key}
: String - the Amazon S3 compatible secret key. This field is optional, defaulting to the configuration flagplugins.storage.storages.amazon.default-secret-key
.{region}
: String - the Amazon S3 compatible region. This field is optional, defaulting to the S3 default region configuration.{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, tagging, 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/remote" -d \ '{ "@type": "RemoteDiskStorage", "default": false, "folder": "test" }'
- Payload
-
source
{ "@type": "RemoteDiskStorage", "default": false, "folder": "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/_/remote", "@type": [ "Storage", "RemoteDiskStorage" ], "_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/remote/incoming", "_outgoing": "http://localhost:8080/v1/storages/myorg/myproject/remote/outgoing", "_project": "http://localhost:8080/v1/projects/myorg/myproject", "_rev": 1, "_self": "http://localhost:8080/v1/storages/myorg/myproject/remote", "_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/remote?rev=1" -d \ '{ "@type": "RemoteDiskStorage", "default": false, "folder": "test-updated" }'
- Payload
-
source
{ "@type": "RemoteDiskStorage", "default": false, "folder": "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/_/remote", "@type": [ "Storage", "RemoteDiskStorage" ], "_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/remote/incoming", "_outgoing": "http://localhost:8080/v1/storages/myorg/myproject/remote/outgoing", "_project": "http://localhost:8080/v1/projects/myorg/myproject", "_rev": 2, "_self": "http://localhost:8080/v1/storages/myorg/myproject/remote", "_updatedAt": "2021-05-11T12:24:24.242Z", "_updatedBy": "http://localhost:8080/v1/anonymous" }
Tag
Links a storage revision to a specific name.
Tagging a storage is considered to be an update as well.
POST /v1/storages/{org_label}/{project_label}/{storage_id}/tags?rev={previous_rev}
{
"tag": "{name}",
"rev": {rev}
}
… where
{previous_rev}
: Number - the last known revision for the storage.{name}
: String - label given to the storage at specific revision.{rev}
: Number - the revision to link the provided{name}
.
Example
- Request
-
source
curl -X POST \ -H "Content-Type: application/json" \ "http://localhost:8080/v1/storages/myorg/myproject/remote/tags?rev=2" -d \ '{ "tag": "mytag", "rev": 1 }'
- Payload
-
source
{ "tag": "mytag", "rev": 1 }
- 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/_/remote", "@type": [ "Storage", "RemoteDiskStorage" ], "_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/remote/incoming", "_outgoing": "http://localhost:8080/v1/storages/myorg/myproject/remote/outgoing", "_project": "http://localhost:8080/v1/projects/myorg/myproject", "_rev": 3, "_self": "http://localhost:8080/v1/storages/myorg/myproject/remote", "_updatedAt": "2021-05-11T12:28:08.479Z", "_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/remote?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/_/remote", "@type": [ "Storage", "RemoteDiskStorage" ], "_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": true, "_incoming": "http://localhost:8080/v1/storages/myorg/myproject/remote/incoming", "_outgoing": "http://localhost:8080/v1/storages/myorg/myproject/remote/outgoing", "_project": "http://localhost:8080/v1/projects/myorg/myproject", "_rev": 4, "_self": "http://localhost:8080/v1/storages/myorg/myproject/remote", "_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}&tag={tag}
where …
{rev}
: Number - the targeted revision to be fetched. This field is optional and defaults to the latest revision.{tag}
: String - the targeted tag to be fetched. This field is optional.
{rev}
and {tag}
fields cannot be simultaneously present.
Example
- Request
-
source
curl "http://localhost:8080/v1/storages/myorg/myproject/remote"
- 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/_/remote", "@type": [ "Storage", "RemoteDiskStorage" ], "default": false, "endpoint": "http://localhost:8084/v1", "folder": "test-updated", "maxFileSize": 10737418240, "readPermission": "resources/read", "writePermission": "files/write", "_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": true, "_incoming": "http://localhost:8080/v1/storages/myorg/myproject/remote/incoming", "_outgoing": "http://localhost:8080/v1/storages/myorg/myproject/remote/outgoing", "_project": "http://localhost:8080/v1/projects/myorg/myproject", "_rev": 4, "_self": "http://localhost:8080/v1/storages/myorg/myproject/remote", "_updatedAt": "2021-05-11T12:29:27.821Z", "_updatedBy": "http://localhost:8080/v1/anonymous" }
Fetch original payload
GET /v1/storages/{org_label}/{project_label}/{storage_id}/source?rev={rev}&tag={tag}
where …
{rev}
: Number - the targeted revision to be fetched. This field is optional and defaults to the latest revision.{tag}
: String - the targeted tag to be fetched. This field is optional.
{rev}
and {tag}
fields cannot be simultaneously present.
Example
- Request
-
source
curl "http://localhost:8080/v1/storages/myorg/myproject/remote/source"
- Response
-
source
{ "@type": "RemoteDiskStorage", "default": false, "folder": "test-updated" }
Fetch tags
Retrieves all the tags available for the {storage_id}
.
GET /v1/storages/{org_label}/{project_label}/{storage_id}/tags?rev={rev}&tag={tag}
where …
{rev}
: Number - the targeted revision of the tags to be fetched. This field is optional and defaults to the latest revision.{tag}
: String - the targeted tag of the tags to be fetched. This field is optional.
{rev}
and {tag}
fields cannot be simultaneously present.
Example
- Request
-
source
curl "http://localhost:8080/v1/storages/myorg/myproject/remote/tags"
- Response
-
source
{ "@context": "https://bluebrain.github.io/nexus/contexts/tags.json", "tags": [ { "rev": 1, "tag": "mytag" } ] }
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}
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}
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}
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
.
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/_/remote", "@type": [ "Storage", "RemoteDiskStorage" ], "_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": true, "_incoming": "http://localhost:8080/v1/storages/myorg/myproject/remote/incoming", "_outgoing": "http://localhost:8080/v1/storages/myorg/myproject/remote/outgoing", "_project": "http://localhost:8080/v1/projects/myorg/myproject", "_rev": 4, "_self": "http://localhost:8080/v1/storages/myorg/myproject/remote", "_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","_organizationUuid":"ea8c261e-b53f-45ec-8bb8-d7cbce0918cf","_project":"http://localhost:8080/v1/projects/myorg/myproject","_projectUuid":"4e9d83e3-c521-46d9-83d1-f552d9a636d4","_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","_organizationUuid":"ea8c261e-b53f-45ec-8bb8-d7cbce0918cf","_project":"http://localhost:8080/v1/projects/myorg/myproject","_projectUuid":"4e9d83e3-c521-46d9-83d1-f552d9a636d4","_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","_organizationUuid":"ea8c261e-b53f-45ec-8bb8-d7cbce0918cf","_project":"http://localhost:8080/v1/projects/myorg/myproject","_projectUuid":"4e9d83e3-c521-46d9-83d1-f552d9a636d4","_resourceId":"http://localhost:8080/v1/resources/myorg/myproject/_/remote","_rev":1,"_source":{"@type":"RemoteDiskStorage","default":false,"folder":"test"},"_storageId":"http://localhost:8080/v1/resources/myorg/myproject/_/remote","_subject":"http://localhost:8080/v1/anonymous","_types":["https://bluebrain.github.io/nexus/vocabulary/Storage","https://bluebrain.github.io/nexus/vocabulary/RemoteDiskStorage"]} 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","_organizationUuid":"ea8c261e-b53f-45ec-8bb8-d7cbce0918cf","_project":"http://localhost:8080/v1/projects/myorg/myproject","_projectUuid":"4e9d83e3-c521-46d9-83d1-f552d9a636d4","_resourceId":"http://localhost:8080/v1/resources/myorg/myproject/_/remote","_rev":2,"_source":{"@type":"RemoteDiskStorage","default":false,"folder":"test-updated"},"_storageId":"http://localhost:8080/v1/resources/myorg/myproject/_/remote","_subject":"http://localhost:8080/v1/anonymous","_types":["https://bluebrain.github.io/nexus/vocabulary/Storage","https://bluebrain.github.io/nexus/vocabulary/RemoteDiskStorage"]} 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","_organizationUuid":"ea8c261e-b53f-45ec-8bb8-d7cbce0918cf","_project":"http://localhost:8080/v1/projects/myorg/myproject","_projectUuid":"4e9d83e3-c521-46d9-83d1-f552d9a636d4","_resourceId":"http://localhost:8080/v1/resources/myorg/myproject/_/remote","_rev":3,"_storageId":"http://localhost:8080/v1/resources/myorg/myproject/_/remote","_subject":"http://localhost:8080/v1/anonymous","_types":["https://bluebrain.github.io/nexus/vocabulary/Storage","https://bluebrain.github.io/nexus/vocabulary/RemoteDiskStorage"]} 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","_organizationUuid":"ea8c261e-b53f-45ec-8bb8-d7cbce0918cf","_project":"http://localhost:8080/v1/projects/myorg/myproject","_projectUuid":"4e9d83e3-c521-46d9-83d1-f552d9a636d4","_resourceId":"http://localhost:8080/v1/resources/myorg/myproject/_/remote","_rev":4,"_storageId":"http://localhost:8080/v1/resources/myorg/myproject/_/remote","_subject":"http://localhost:8080/v1/anonymous","_types":["https://bluebrain.github.io/nexus/vocabulary/Storage","https://bluebrain.github.io/nexus/vocabulary/RemoteDiskStorage"]} 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 instant of the latest consumed event (
lastProcessedEventDateTime
). - the number of physical files stored on the storage (
files
). - the space used by this file on the given storage (
spaceUsed
).
Example