From f32ff19cb194a690efc4ebe2fa3e3282d7dcb95d Mon Sep 17 00:00:00 2001 From: imsdu Date: Thu, 22 Aug 2024 12:38:46 +0000 Subject: [PATCH] deploy: 6bff577f41ce473d4832d74336185b15c42f52c5 --- paradox.json | 2 +- snapshot/contexts/suites.json | 5 +- .../assets/files/delegate-create-post.json | 40 +++ .../api/assets/files/delegate-create-post.sh | 8 + .../assets/files/delegate-validate-post.json | 5 + .../assets/files/delegate-validate-post.sh | 15 ++ .../delta/api/assets/files/register-post.json | 34 +++ .../delta/api/assets/files/register-post.sh | 15 ++ snapshot/docs/delta/api/assets/version.json | 4 +- snapshot/docs/delta/api/files-api.html | 248 +++++++++++++++++- snapshot/docs/delta/api/resources-api.html | 7 +- snapshot/docs/delta/api/schemas-api.html | 4 +- snapshot/docs/delta/api/search-api.html | 3 +- snapshot/docs/delta/api/storages-api.html | 14 + snapshot/docs/delta/api/version.html | 4 +- .../running-nexus/configuration/index.html | 18 ++ .../running-nexus/docker/docker-compose.yaml | 7 +- .../getting-started/running-nexus/index.html | 8 +- snapshot/paradox.json | 2 +- snapshot/search/search_index.json | 2 +- v1.5.x/paradox.json | 2 +- v1.6.x/paradox.json | 2 +- v1.7.x/paradox.json | 2 +- v1.8.x/paradox.json | 2 +- 24 files changed, 416 insertions(+), 37 deletions(-) create mode 100644 snapshot/docs/delta/api/assets/files/delegate-create-post.json create mode 100644 snapshot/docs/delta/api/assets/files/delegate-create-post.sh create mode 100644 snapshot/docs/delta/api/assets/files/delegate-validate-post.json create mode 100644 snapshot/docs/delta/api/assets/files/delegate-validate-post.sh create mode 100644 snapshot/docs/delta/api/assets/files/register-post.json create mode 100644 snapshot/docs/delta/api/assets/files/register-post.sh diff --git a/paradox.json b/paradox.json index 726644cff7..a4cc5e6841 100644 --- a/paradox.json +++ b/paradox.json @@ -1,4 +1,4 @@ { "name" : "docs", - "version" : "0.0.0+1-b5255b37+20240522-1510-SNAPSHOT" + "version" : "0.0.0+1-b5255b37+20240822-1238-SNAPSHOT" } \ No newline at end of file diff --git a/snapshot/contexts/suites.json b/snapshot/contexts/suites.json index c11843c15b..636144d6c6 100644 --- a/snapshot/contexts/suites.json +++ b/snapshot/contexts/suites.json @@ -1,7 +1,10 @@ { "@context": { "@vocab": "https://bluebrain.github.io/nexus/vocabulary/", - "name": "https://schema.org/name" + "name": "https://schema.org/name", + "projects": { + "@container": "@list" + } }, "@id": "https://bluebrain.github.io/nexus/contexts/suites.json" } \ No newline at end of file diff --git a/snapshot/docs/delta/api/assets/files/delegate-create-post.json b/snapshot/docs/delta/api/assets/files/delegate-create-post.json new file mode 100644 index 0000000000..9846620dad --- /dev/null +++ b/snapshot/docs/delta/api/assets/files/delegate-create-post.json @@ -0,0 +1,40 @@ +{ + "@context" : [ + "https://bluebrain.github.io/nexus/contexts/files.json", + "https://bluebrain.github.io/nexus/contexts/metadata.json" + ], + "@id" : "http://delta:8080/v1/resources/fcp5xcw67hittxm/loeu5kgu48i8tw7/_/1205b629-2a73-4891-abff-140a64e9c391", + "@type" : "File", + "description" : "a description of the file", + "name" : "My File", + "_bytes" : 29625, + "_constrainedBy" : "https://bluebrain.github.io/nexus/schemas/files.json", + "_createdAt" : "2024-06-14T12:53:38.516222Z", + "_createdBy" : "http://delta:8080/v1/realms/test-pmcfwjobxkuvebro/users/fwhbqlnnhqncpsqk", + "_deprecated" : false, + "_digest" : { + "_algorithm" : "SHA-256", + "_value" : "05bf442810213b9e5fecd5242eefeff1f3d207913861c96658c75ccf58997e87" + }, + "_filename" : "myfile.png", + "_incoming" : "http://delta:8080/v1/files/fcp5xcw67hittxm/loeu5kgu48i8tw7/http:%2F%2Fdelta:8080%2Fv1%2Fresources%2Ffcp5xcw67hittxm%2Floeu5kgu48i8tw7%2F_%2F1205b629-2a73-4891-abff-140a64e9c391/incoming", + "_keywords" : { + "key1" : "value1", + "key2" : "value2" + }, + "_location" : "myprefix/fcp5xcw67hittxm/loeu5kgu48i8tw7/files/f/f/9/5/3/4/c/2/ngbeydtjyibvcanj", + "_mediaType" : "image/png", + "_origin" : "External", + "_outgoing" : "http://delta:8080/v1/files/fcp5xcw67hittxm/loeu5kgu48i8tw7/http:%2F%2Fdelta:8080%2Fv1%2Fresources%2Ffcp5xcw67hittxm%2Floeu5kgu48i8tw7%2F_%2F1205b629-2a73-4891-abff-140a64e9c391/outgoing", + "_project" : "http://delta:8080/v1/projects/fcp5xcw67hittxm/loeu5kgu48i8tw7", + "_rev" : 1, + "_self" : "http://delta:8080/v1/files/fcp5xcw67hittxm/loeu5kgu48i8tw7/http:%2F%2Fdelta:8080%2Fv1%2Fresources%2Ffcp5xcw67hittxm%2Floeu5kgu48i8tw7%2F_%2F1205b629-2a73-4891-abff-140a64e9c391", + "_storage" : { + "@id" : "https://bluebrain.github.io/nexus/vocabulary/mys3storage", + "@type" : "S3Storage", + "_rev" : 3 + }, + "_updatedAt" : "2024-06-14T12:53:38.516222Z", + "_updatedBy" : "http://delta:8080/v1/realms/test-pmcfwjobxkuvebro/users/fwhbqlnnhqncpsqk", + "_uuid" : "c96a229c-8d1d-46a5-8f47-08555fd98cb3" +} \ No newline at end of file diff --git a/snapshot/docs/delta/api/assets/files/delegate-create-post.sh b/snapshot/docs/delta/api/assets/files/delegate-create-post.sh new file mode 100644 index 0000000000..17f3770be1 --- /dev/null +++ b/snapshot/docs/delta/api/assets/files/delegate-create-post.sh @@ -0,0 +1,8 @@ +curl -X POST \ + -H "Content-Type: application/json" \ + "http://localhost:8080/v1/delegate/files/myorg/myproject?storage=mys3storage" -d \ + '{ + "protected" : "eyJleHAiOjE3MTg2Mjg1NDUsImFsZyI6IlJTMjU2In0", + "payload" : "eyJidWNrZXQiOiJqNDc4M2NjNWFkY2F1a3UiLCJwYXRoIjoibXlwcmVmaXgvYTE0bTYxZWgzajVuNzVjLzhrbXlpb2QyMzM1MnhpZC9maWxlcy9iLzIvOS80LzMvYy9jLzYvaG5qeXR3b2x0ZnVyc2JlaCIsIm1lZGlhVHlwZSI6ImltYWdlL2RhbiIsIm1ldGFkYXRhIjp7ImRlc2NyaXB0aW9uIjoicnByZndzdWpveGJpaXllaSIsImtleXdvcmRzIjp7ImtvZXZvd3Bsc3Jld2NlZGIiOiJ2dnNlaW9wa3Z5Y3d1dG1oIn0sIm5hbWUiOiJmbW94dHh3a3JvdWhtZG90In0sImlkIjoiaHR0cDovL2RlbHRhOjgwODAvdjEvcmVzb3VyY2VzL2ExNG02MWVoM2o1bjc1Yy84a215aW9kMjMzNTJ4aWQvXy9hNGE5ODE2Mi1jYTNmLTQ2YmUtYWUxMC00MzJjYTZmOTdjNGYifQ", + "signature" : "htQLymfQIrks7MejErb4v3mnhQT2W6iPZdkd7LVBPJ0Ksybj8XG8dbTJH5pjZJF7-HXi848R14tquZ6iSeXpEqFGiZYge8obPQRLpJA0qbc9Mmhlq-CTbIdsy5OFpdzcDadSj6_k_kzuU2PR-Fli9GtH-34z2d4C9dWsBmnUo_IA3dvSFCF_PaQuajo7cJYa_0yc4VVGKG-xYi9yV4ylD5D2cxMUDFun78NOKDD_2upF-kuf9t5E-NjCl0DffkelbqYuH6nMop2zmwfu-cwHnChaDwKM7HLJGLomD5duU5sq-mVsunnMy58NgzMecLGDbER-27zk7w0TwxkXTKfxWg" + }' \ No newline at end of file diff --git a/snapshot/docs/delta/api/assets/files/delegate-validate-post.json b/snapshot/docs/delta/api/assets/files/delegate-validate-post.json new file mode 100644 index 0000000000..7ab32b0f00 --- /dev/null +++ b/snapshot/docs/delta/api/assets/files/delegate-validate-post.json @@ -0,0 +1,5 @@ +{ + "protected" : "eyJleHAiOjE3MTg2Mjg1NDUsImFsZyI6IlJTMjU2In0", + "payload" : "eyJidWNrZXQiOiJqNDc4M2NjNWFkY2F1a3UiLCJwYXRoIjoibXlwcmVmaXgvYTE0bTYxZWgzajVuNzVjLzhrbXlpb2QyMzM1MnhpZC9maWxlcy9iLzIvOS80LzMvYy9jLzYvaG5qeXR3b2x0ZnVyc2JlaCIsIm1lZGlhVHlwZSI6ImltYWdlL2RhbiIsIm1ldGFkYXRhIjp7ImRlc2NyaXB0aW9uIjoicnByZndzdWpveGJpaXllaSIsImtleXdvcmRzIjp7ImtvZXZvd3Bsc3Jld2NlZGIiOiJ2dnNlaW9wa3Z5Y3d1dG1oIn0sIm5hbWUiOiJmbW94dHh3a3JvdWhtZG90In0sImlkIjoiaHR0cDovL2RlbHRhOjgwODAvdjEvcmVzb3VyY2VzL2ExNG02MWVoM2o1bjc1Yy84a215aW9kMjMzNTJ4aWQvXy9hNGE5ODE2Mi1jYTNmLTQ2YmUtYWUxMC00MzJjYTZmOTdjNGYifQ", + "signature" : "htQLymfQIrks7MejErb4v3mnhQT2W6iPZdkd7LVBPJ0Ksybj8XG8dbTJH5pjZJF7-HXi848R14tquZ6iSeXpEqFGiZYge8obPQRLpJA0qbc9Mmhlq-CTbIdsy5OFpdzcDadSj6_k_kzuU2PR-Fli9GtH-34z2d4C9dWsBmnUo_IA3dvSFCF_PaQuajo7cJYa_0yc4VVGKG-xYi9yV4ylD5D2cxMUDFun78NOKDD_2upF-kuf9t5E-NjCl0DffkelbqYuH6nMop2zmwfu-cwHnChaDwKM7HLJGLomD5duU5sq-mVsunnMy58NgzMecLGDbER-27zk7w0TwxkXTKfxWg" +} \ No newline at end of file diff --git a/snapshot/docs/delta/api/assets/files/delegate-validate-post.sh b/snapshot/docs/delta/api/assets/files/delegate-validate-post.sh new file mode 100644 index 0000000000..a4c5156a07 --- /dev/null +++ b/snapshot/docs/delta/api/assets/files/delegate-validate-post.sh @@ -0,0 +1,15 @@ +curl -X POST \ + -H "Content-Type: application/json" \ + "http://localhost:8080/v1/delegate/files/myorg/myproject/validate?storage=mys3storage" -d \ + '{ + "filename": "myfile.png", + "mediaType": "image/png", + "metadata": { + "name": "My File", + "description": "a description of the file", + "keywords": { + "key1": "value1", + "key2": "value2" + } + } + }' \ No newline at end of file diff --git a/snapshot/docs/delta/api/assets/files/register-post.json b/snapshot/docs/delta/api/assets/files/register-post.json new file mode 100644 index 0000000000..76a8db3850 --- /dev/null +++ b/snapshot/docs/delta/api/assets/files/register-post.json @@ -0,0 +1,34 @@ +{ + "@context" : [ + "https://bluebrain.github.io/nexus/contexts/files.json", + "https://bluebrain.github.io/nexus/contexts/metadata.json" + ], + "@id" : "http://delta:8080/v1/resources/hkrxvoxdyiiev1p/03vctrp70usfehq/_/iwa41vwspwke6nx", + "@type" : "File", + "_bytes" : 29625, + "_constrainedBy" : "https://bluebrain.github.io/nexus/schemas/files.json", + "_createdAt" : "2024-06-14T12:44:36.525177Z", + "_createdBy" : "http://delta:8080/v1/realms/test-vuaplrsvrbkpkhca/users/byfxikrrdlmmvsvv", + "_deprecated" : false, + "_digest" : { + "_algorithm" : "SHA-256", + "_value" : "05bf442810213b9e5fecd5242eefeff1f3d207913861c96658c75ccf58997e87" + }, + "_filename" : "myfile.png", + "_incoming" : "http://delta:8080/v1/files/hkrxvoxdyiiev1p/03vctrp70usfehq/http:%2F%2Fdelta:8080%2Fv1%2Fresources%2Fhkrxvoxdyiiev1p%2F03vctrp70usfehq%2F_%2Fiwa41vwspwke6nx/incoming", + "_location" : "relative/path/to/myfile.png", + "_mediaType" : "image/png", + "_origin" : "External", + "_outgoing" : "http://delta:8080/v1/files/hkrxvoxdyiiev1p/03vctrp70usfehq/http:%2F%2Fdelta:8080%2Fv1%2Fresources%2Fhkrxvoxdyiiev1p%2F03vctrp70usfehq%2F_%2Fiwa41vwspwke6nx/outgoing", + "_project" : "http://delta:8080/v1/projects/hkrxvoxdyiiev1p/03vctrp70usfehq", + "_rev" : 1, + "_self" : "http://delta:8080/v1/files/hkrxvoxdyiiev1p/03vctrp70usfehq/http:%2F%2Fdelta:8080%2Fv1%2Fresources%2Fhkrxvoxdyiiev1p%2F03vctrp70usfehq%2F_%2Fiwa41vwspwke6nx", + "_storage" : { + "@id" : "https://bluebrain.github.io/nexus/vocabulary/mys3storage", + "@type" : "S3Storage", + "_rev" : 3 + }, + "_updatedAt" : "2024-06-14T12:44:36.525177Z", + "_updatedBy" : "http://delta:8080/v1/realms/test-vuaplrsvrbkpkhca/users/byfxikrrdlmmvsvv", + "_uuid" : "79695062-ecbb-42dc-a62d-61c2c02be129" +} \ No newline at end of file diff --git a/snapshot/docs/delta/api/assets/files/register-post.sh b/snapshot/docs/delta/api/assets/files/register-post.sh new file mode 100644 index 0000000000..4174eb1e72 --- /dev/null +++ b/snapshot/docs/delta/api/assets/files/register-post.sh @@ -0,0 +1,15 @@ +curl -X POST \ + -H "Content-Type: application/json" \ + "http://localhost:8080/v1/files/myorg/myproject/register/myfile?storage=mys3storage" -d \ + '{ + "path": "relative/path/to/myfile.png", + "mediaType": "image/png", + "metadata": { + "name": "My File", + "description": "a description of the file", + "keywords": { + "key1": "value1", + "key2": "value2" + } + } + }' \ No newline at end of file diff --git a/snapshot/docs/delta/api/assets/version.json b/snapshot/docs/delta/api/assets/version.json index 8eb544e34e..451674c2ec 100644 --- a/snapshot/docs/delta/api/assets/version.json +++ b/snapshot/docs/delta/api/assets/version.json @@ -3,8 +3,8 @@ "delta": "1.10.0", "dependencies": { "blazegraph": "2.1.6-RC", - "postgresql": "15.7", - "elasticsearch": "8.13.3", + "postgresql": "16.3", + "elasticsearch": "8.14.1", "remoteStorage": "1.10.0" }, "plugins": { diff --git a/snapshot/docs/delta/api/files-api.html b/snapshot/docs/delta/api/files-api.html index 1f67138dc3..c83a180743 100644 --- a/snapshot/docs/delta/api/files-api.html +++ b/snapshot/docs/delta/api/files-api.html @@ -243,6 +243,7 @@
  • Files
  • +
  • Delegation & Registration (S3 only) +
  • Server Sent Events
  • @@ -288,6 +299,7 @@
  • Files
  • +
  • Delegation & Registration (S3 only) +
  • Server Sent Events
  • @@ -347,6 +369,14 @@

    list of incoming links
  • _outgoing: address to query to obtain the list of outgoing links
  • +

    Custom file metadata

    +

    When creating file resources, users can optionally provide custom metadata to be indexed and therefore searchable.

    +

    This takes the form of a metadata field containing a JSON Object with one or more of the following fields:

    +

    Indexing

    All the API calls modifying a file (creation, update, tagging, deprecation) can specify whether the file should be indexed synchronously or in the background. This behaviour is controlled using indexing query param, which can be one of two values:

    Example

    @@ -593,10 +617,7 @@

    custom file metadata.

    Example

    @@ -1184,6 +1205,209 @@

    +

    Delegation & Registration (S3 only)

    +

    To support files stored in the cloud, Delta allows users to register files already uploaded to S3. This is useful primarily for large files where uploading directly through Delta using HTTP is inefficient and expensive.

    +

    There are two use cases: registering an already uploaded file by specifying its path, and asking Delta to generate a path in its standard format.

    +

    Register external file

    +

    This endpoint accepts a path and creates a new file resource based on an existing S3 file.

    +
    POST /v1/files/{org_label}/{project_label}/register/{file_id}?storage={storageId}&tag={tagName}
    +  {
    +    "path": "{path}",
    +    "mediaType": "{mediaType}",
    +    "metadata": {metadata}
    +  }
    +
    +

    … where

    + +

    Example

    +
    +
    Request
    +
    +
    sourcecurl -X POST \
    +   -H "Content-Type: application/json" \
    +   "http://localhost:8080/v1/files/myorg/myproject/register/myfile?storage=mys3storage" -d \
    +   '{
    +      "path": "relative/path/to/myfile.png",
    +      "mediaType": "image/png",
    +      "metadata": {
    +        "name": "My File",
    +        "description": "a description of the file",
    +        "keywords": {
    +          "key1": "value1",
    +          "key2": "value2"
    +        }
    +      }
    +   }'
    +
    Response
    +
    +
    source{
    +  "@context" : [
    +    "https://bluebrain.github.io/nexus/contexts/files.json",
    +    "https://bluebrain.github.io/nexus/contexts/metadata.json"
    +  ],
    +  "@id" : "http://delta:8080/v1/resources/hkrxvoxdyiiev1p/03vctrp70usfehq/_/iwa41vwspwke6nx",
    +  "@type" : "File",
    +  "_bytes" : 29625,
    +  "_constrainedBy" : "https://bluebrain.github.io/nexus/schemas/files.json",
    +  "_createdAt" : "2024-06-14T12:44:36.525177Z",
    +  "_createdBy" : "http://delta:8080/v1/realms/test-vuaplrsvrbkpkhca/users/byfxikrrdlmmvsvv",
    +  "_deprecated" : false,
    +  "_digest" : {
    +    "_algorithm" : "SHA-256",
    +    "_value" : "05bf442810213b9e5fecd5242eefeff1f3d207913861c96658c75ccf58997e87"
    +  },
    +  "_filename" : "myfile.png",
    +  "_incoming" : "http://delta:8080/v1/files/hkrxvoxdyiiev1p/03vctrp70usfehq/http:%2F%2Fdelta:8080%2Fv1%2Fresources%2Fhkrxvoxdyiiev1p%2F03vctrp70usfehq%2F_%2Fiwa41vwspwke6nx/incoming",
    +  "_location" : "relative/path/to/myfile.png",
    +  "_mediaType" : "image/png",
    +  "_origin" : "External",
    +  "_outgoing" : "http://delta:8080/v1/files/hkrxvoxdyiiev1p/03vctrp70usfehq/http:%2F%2Fdelta:8080%2Fv1%2Fresources%2Fhkrxvoxdyiiev1p%2F03vctrp70usfehq%2F_%2Fiwa41vwspwke6nx/outgoing",
    +  "_project" : "http://delta:8080/v1/projects/hkrxvoxdyiiev1p/03vctrp70usfehq",
    +  "_rev" : 1,
    +  "_self" : "http://delta:8080/v1/files/hkrxvoxdyiiev1p/03vctrp70usfehq/http:%2F%2Fdelta:8080%2Fv1%2Fresources%2Fhkrxvoxdyiiev1p%2F03vctrp70usfehq%2F_%2Fiwa41vwspwke6nx",
    +  "_storage" : {
    +    "@id" : "https://bluebrain.github.io/nexus/vocabulary/mys3storage",
    +    "@type" : "S3Storage",
    +    "_rev" : 3
    +  },
    +  "_updatedAt" : "2024-06-14T12:44:36.525177Z",
    +  "_updatedBy" : "http://delta:8080/v1/realms/test-vuaplrsvrbkpkhca/users/byfxikrrdlmmvsvv",
    +  "_uuid" : "79695062-ecbb-42dc-a62d-61c2c02be129"
    +}
    +
    +

    Delegating file uploads

    +

    Users can use delegation for files that cannot be uploaded through Delta (e.g. large files). Here Delta will provide bucket and path details for the upload. Users are then expected to upload the file using other methods, and call back to Delta to register this file with the same metadata that was initially validated. The three steps are outlined in detail below.

    +

    1. Validate and generate path for file delegation

    +

    Delta accepts and validates the following payload.

    +
    POST /v1/delegate/files/{org_label}/{project_label}/validate?storage={storageId}
    +  {
    +    "filename": "{filename}",
    +    "mediaType": "{mediaType}",
    +    "metadata": {metadata}
    +  }
    +
    +

    … where

    + +

    It then generates the following details for the file:

    +
     {
    +    "bucket": "<s3 bucket>",
    +    "id": "<file resource identifier>",
    +    "path": "<path from s3 root>",
    +    "mediaType": "<user provided mediaType>",
    +    "metadata": {}
    + }
    +
    +

    The user is expected to upload their file to path within bucket. The id is reserved for when the file resource is created. mediaType and metadata are what the user specified in the request.

    +

    This payload is then signed using the flattened JWS serialization format to ensure that Delta has validated and generated the correct data. This same payload will be passed when creating the file resource.

    +
     {
    +    "payload": "<base64 encoded payload contents>",
    +    "protected": "<integrity-protected header contents>",
    +    "signature": "<signature contents>"
    + }
    +
    +

    The payload field can be base64 decoded to access the generated file details. Note that protected contains an expiry field exp with the datetime at which this signature will expire (in epoch seconds). To view this can also be base64 decoded.

    +

    Example

    +
    +
    Request
    +
    +
    sourcecurl -X POST \
    +   -H "Content-Type: application/json" \
    +   "http://localhost:8080/v1/delegate/files/myorg/myproject/validate?storage=mys3storage" -d \
    +   '{
    +      "filename": "myfile.png",
    +      "mediaType": "image/png",
    +      "metadata": {
    +        "name": "My File",
    +        "description": "a description of the file",
    +        "keywords": {
    +          "key1": "value1",
    +          "key2": "value2"
    +        }
    +      }
    +   }'
    +
    Response
    +
    +
    source{
    +  "protected" : "eyJleHAiOjE3MTg2Mjg1NDUsImFsZyI6IlJTMjU2In0",
    +  "payload" : "eyJidWNrZXQiOiJqNDc4M2NjNWFkY2F1a3UiLCJwYXRoIjoibXlwcmVmaXgvYTE0bTYxZWgzajVuNzVjLzhrbXlpb2QyMzM1MnhpZC9maWxlcy9iLzIvOS80LzMvYy9jLzYvaG5qeXR3b2x0ZnVyc2JlaCIsIm1lZGlhVHlwZSI6ImltYWdlL2RhbiIsIm1ldGFkYXRhIjp7ImRlc2NyaXB0aW9uIjoicnByZndzdWpveGJpaXllaSIsImtleXdvcmRzIjp7ImtvZXZvd3Bsc3Jld2NlZGIiOiJ2dnNlaW9wa3Z5Y3d1dG1oIn0sIm5hbWUiOiJmbW94dHh3a3JvdWhtZG90In0sImlkIjoiaHR0cDovL2RlbHRhOjgwODAvdjEvcmVzb3VyY2VzL2ExNG02MWVoM2o1bjc1Yy84a215aW9kMjMzNTJ4aWQvXy9hNGE5ODE2Mi1jYTNmLTQ2YmUtYWUxMC00MzJjYTZmOTdjNGYifQ",
    +  "signature" : "htQLymfQIrks7MejErb4v3mnhQT2W6iPZdkd7LVBPJ0Ksybj8XG8dbTJH5pjZJF7-HXi848R14tquZ6iSeXpEqFGiZYge8obPQRLpJA0qbc9Mmhlq-CTbIdsy5OFpdzcDadSj6_k_kzuU2PR-Fli9GtH-34z2d4C9dWsBmnUo_IA3dvSFCF_PaQuajo7cJYa_0yc4VVGKG-xYi9yV4ylD5D2cxMUDFun78NOKDD_2upF-kuf9t5E-NjCl0DffkelbqYuH6nMop2zmwfu-cwHnChaDwKM7HLJGLomD5duU5sq-mVsunnMy58NgzMecLGDbER-27zk7w0TwxkXTKfxWg"
    +}
    +
    +

    2. Upload file to S3

    +

    Using the bucket and path from the previous step, the file should be uploaded to S3 by whatever means are appropriate. The only restriction is that this must be finished before the expiry datetime of the signed payload.

    +

    3. Create delegated file resource

    +

    Once the file has been uploaded to S3 at the specified path, the file resource can be created. The payload can be passed back exactly as it was returned in the previous step.

    +
    POST /v1/delegate/files/{org_label}/{project_label}?storage={storageId}
    +   {
    +      "payload": "<base64 encoded payload contents>",
    +      "protected": "<integrity-protected header contents>",
    +      "signature": "<signature contents>"
    +   }
    +
    +

    Delta will verify that the signature matches the payload and that the expiry date is not passed. Then the file will be registered as a resource. The usual file resource response will be returned with all the standard metadata and file location details.

    +

    Example

    +
    +
    Request
    +
    +
    sourcecurl -X POST \
    +   -H "Content-Type: application/json" \
    +   "http://localhost:8080/v1/delegate/files/myorg/myproject?storage=mys3storage" -d \
    +   '{
    +      "protected" : "eyJleHAiOjE3MTg2Mjg1NDUsImFsZyI6IlJTMjU2In0",
    +      "payload" : "eyJidWNrZXQiOiJqNDc4M2NjNWFkY2F1a3UiLCJwYXRoIjoibXlwcmVmaXgvYTE0bTYxZWgzajVuNzVjLzhrbXlpb2QyMzM1MnhpZC9maWxlcy9iLzIvOS80LzMvYy9jLzYvaG5qeXR3b2x0ZnVyc2JlaCIsIm1lZGlhVHlwZSI6ImltYWdlL2RhbiIsIm1ldGFkYXRhIjp7ImRlc2NyaXB0aW9uIjoicnByZndzdWpveGJpaXllaSIsImtleXdvcmRzIjp7ImtvZXZvd3Bsc3Jld2NlZGIiOiJ2dnNlaW9wa3Z5Y3d1dG1oIn0sIm5hbWUiOiJmbW94dHh3a3JvdWhtZG90In0sImlkIjoiaHR0cDovL2RlbHRhOjgwODAvdjEvcmVzb3VyY2VzL2ExNG02MWVoM2o1bjc1Yy84a215aW9kMjMzNTJ4aWQvXy9hNGE5ODE2Mi1jYTNmLTQ2YmUtYWUxMC00MzJjYTZmOTdjNGYifQ",
    +      "signature" : "htQLymfQIrks7MejErb4v3mnhQT2W6iPZdkd7LVBPJ0Ksybj8XG8dbTJH5pjZJF7-HXi848R14tquZ6iSeXpEqFGiZYge8obPQRLpJA0qbc9Mmhlq-CTbIdsy5OFpdzcDadSj6_k_kzuU2PR-Fli9GtH-34z2d4C9dWsBmnUo_IA3dvSFCF_PaQuajo7cJYa_0yc4VVGKG-xYi9yV4ylD5D2cxMUDFun78NOKDD_2upF-kuf9t5E-NjCl0DffkelbqYuH6nMop2zmwfu-cwHnChaDwKM7HLJGLomD5duU5sq-mVsunnMy58NgzMecLGDbER-27zk7w0TwxkXTKfxWg"
    +    }'
    +
    Response
    +
    +
    source{
    +  "@context" : [
    +    "https://bluebrain.github.io/nexus/contexts/files.json",
    +    "https://bluebrain.github.io/nexus/contexts/metadata.json"
    +  ],
    +  "@id" : "http://delta:8080/v1/resources/fcp5xcw67hittxm/loeu5kgu48i8tw7/_/1205b629-2a73-4891-abff-140a64e9c391",
    +  "@type" : "File",
    +  "description" : "a description of the file",
    +  "name" : "My File",
    +  "_bytes" : 29625,
    +  "_constrainedBy" : "https://bluebrain.github.io/nexus/schemas/files.json",
    +  "_createdAt" : "2024-06-14T12:53:38.516222Z",
    +  "_createdBy" : "http://delta:8080/v1/realms/test-pmcfwjobxkuvebro/users/fwhbqlnnhqncpsqk",
    +  "_deprecated" : false,
    +  "_digest" : {
    +    "_algorithm" : "SHA-256",
    +    "_value" : "05bf442810213b9e5fecd5242eefeff1f3d207913861c96658c75ccf58997e87"
    +  },
    +  "_filename" : "myfile.png",
    +  "_incoming" : "http://delta:8080/v1/files/fcp5xcw67hittxm/loeu5kgu48i8tw7/http:%2F%2Fdelta:8080%2Fv1%2Fresources%2Ffcp5xcw67hittxm%2Floeu5kgu48i8tw7%2F_%2F1205b629-2a73-4891-abff-140a64e9c391/incoming",
    +  "_keywords" : {
    +    "key1" : "value1",
    +    "key2" : "value2"
    +  },
    +  "_location" : "myprefix/fcp5xcw67hittxm/loeu5kgu48i8tw7/files/f/f/9/5/3/4/c/2/ngbeydtjyibvcanj",
    +  "_mediaType" : "image/png",
    +  "_origin" : "External",
    +  "_outgoing" : "http://delta:8080/v1/files/fcp5xcw67hittxm/loeu5kgu48i8tw7/http:%2F%2Fdelta:8080%2Fv1%2Fresources%2Ffcp5xcw67hittxm%2Floeu5kgu48i8tw7%2F_%2F1205b629-2a73-4891-abff-140a64e9c391/outgoing",
    +  "_project" : "http://delta:8080/v1/projects/fcp5xcw67hittxm/loeu5kgu48i8tw7",
    +  "_rev" : 1,
    +  "_self" : "http://delta:8080/v1/files/fcp5xcw67hittxm/loeu5kgu48i8tw7/http:%2F%2Fdelta:8080%2Fv1%2Fresources%2Ffcp5xcw67hittxm%2Floeu5kgu48i8tw7%2F_%2F1205b629-2a73-4891-abff-140a64e9c391",
    +  "_storage" : {
    +    "@id" : "https://bluebrain.github.io/nexus/vocabulary/mys3storage",
    +    "@type" : "S3Storage",
    +    "_rev" : 3
    +  },
    +  "_updatedAt" : "2024-06-14T12:53:38.516222Z",
    +  "_updatedBy" : "http://delta:8080/v1/realms/test-pmcfwjobxkuvebro/users/fwhbqlnnhqncpsqk",
    +  "_uuid" : "c96a229c-8d1d-46a5-8f47-08555fd98cb3"
    +}
    +

    Server Sent Events

    From Delta 1.5, it is possible to fetch SSEs for all files or just files in the scope of an organization or a project.

    GET /v1/files/events                              # for all file events in the application
    diff --git a/snapshot/docs/delta/api/resources-api.html b/snapshot/docs/delta/api/resources-api.html
    index 2cb95d2f80..cd372c2766 100644
    --- a/snapshot/docs/delta/api/resources-api.html
    +++ b/snapshot/docs/delta/api/resources-api.html
    @@ -355,8 +355,9 @@ 

    Authentication & authorization section to learn more about it.

    Remote contexts
    -

    Remote contexts are only resolved during creates and updates. That means that when those get updated, the resources importing them must be also updated to take them into account in a new version.

    JSON payloads
    -

    The json payload for create and update operations cannot contain keys beginning with underscore (_), as these fields are reserved for Nexus metadata

    +

    Remote contexts are only resolved during creates and updates. That means that when those get updated, the resources importing them must be also updated to take them into account in a new version.

    Reserved types and fields
    +

    A generic resource can not have a type belonging to the Nexus vocabulary (https://bluebrain.github.io/nexus/vocabulary/).

    +

    Moreover it can not include any field starting with underscore (_) at the root level as these fields are reserved for Nexus metadata.

    Nexus metadata

    When using the endpoints described on this page, the responses will contain global metadata described on the Nexus Metadata page. In addition, the following resource specific metadata can be present