Projects

Projects belong to an organization and are rooted in the corresponding /v1/projects/{org_label} path. The purposes of projects are:

  • Group and categorize sub-resources.
  • Define global settings that apply for operations on all sub-resources.
  • Provide isolation from resources inside other projects. This behavior can be partially changed by defining resolvers and aggregated views [1] [2]
Authorization notes

When creating projects, the caller must have projects/create permissions on the current path of the project or the ancestor paths.

When updating projects, the caller must have projects/write permissions on the current path of the project or the ancestor paths.

When reading projects, the caller must have projects/read permissions on the current path of the project or the ancestor paths.

Please visit Authentication & authorization section to learn more about it.

Payload

{
  "description": "{description}",
  "base": "{base}",
  "vocab": "{vocab}",
  "apiMappings": [
   {
      "prefix": "{prefix}",
      "namespace": "{namespace}"
    },
    ...
  ]
}

where…

  • {description}: String - an optional description for this project.
  • {base}: IRI - the JSON-LD @base used for generating fully qualified IRI ids when performing operations on a sub-resource URIs and payloads (when no other @base is present in the @context payload). E.g.: Let base be http://localhost:8080/. When a resource is created and no @id is present in the payload, the platform will generate an @id which will look like http://localhost:8080/{UUID}. This field is optional and will default to {{base}}/v1/resources/{org_label}/{project_label}/_/.
  • {vocab}: IRI - the JSON-LD @vocab for all unqualified predicates in children resources’ payload (when no other @vocab is present in the @context payload and the resources’ payload is not a JSON-LD aware payload). E.g. if the vocab is set to https://schema.org/, when a field a resource is created and a field name is present in the payload, it will be expanded to http://schema.org/name by the system during indexing and fetch operations. This field is optional and will default to {{base}}/v1/vocabs/{org_label}/{project_label}/.
  • {apiMappings}: Json object - provides a convenient way to compact/expand URIs when performing operations on a sub-resource. This field is optional.

API Mappings

The apiMappings Json object array maps each prefix to its namespace. This is useful in order to generate IRI ids on API endpoints using the prefix as an alias or curie instead of a fully expanded url encoded IRI.

Note

The api mappings only apply to children resources URIs but not to their payload. Please, use the JSON-LD @context to achieve compaction/expansion on resources’ payload.

Having the following apiMappings:

{
  "apiMappings": [
   {
      "prefix": "{prefix}",
      "namespace": "{namespace}"
    },
    { ... }
  ]
}

where…

  • {prefix}: String - a curie or an alias.
  • {namespace}: IRI - the actual resolution of the prefix field.

Let’s see an example:

 {
   "apiMappings": [
    {
       "prefix": "person",
       "namespace": "http://example.com/some/person"
     },
     {
       "prefix": "schemas",
       "namespace": "https://bluebrainnexus.io/schemas/"
     }
   ]
 }

The previous project api mappings allows us to create a schema using the following endpoints:

  • /v1/schemas/{org_label}/{project_label}/person. The @id of the resulting schema will be http://example.com/some/person
  • /v1/schemas/{org_label}/{project_label}/schema:other. The @id of the resulting schema will be https://bluebrainnexus.io/schemas/other

Create

PUT /v1/projects/{org_label}/{label}
  {...}

…where {label} is the user friendly name assigned to this project. The semantics of the label should be consistent with the type of data provided by its sub-resources, since it’ll be a part of the sub-resources’ URI.

Example

Request
sourcecurl -X PUT \
   -H "Content-Type: application/json" \
   "http://localhost:8080/v1/projects/myorg/myproject" \
   -d '{
    "description": "description",
    "vocab": "https://schema.org/",
    "apiMappings": [
        {
            "prefix": "my",
            "namespace": "http://example.com/my"
        }
    ]
   }'
Payload
source{
  "description": "description",
  "vocab": "https://schema.org/",
  "apiMappings": [
    {
      "prefix": "my",
      "namespace": "http://example.com/my"
    }
  ]
}
Response
source{
  "@context": [
    "https://bluebrain.github.io/nexus/contexts/projects-metadata.json",
    "https://bluebrain.github.io/nexus/contexts/metadata.json"
  ],
  "@id": "http://localhost:8080/v1/projects/myorg/myproject",
  "@type": "Project",
  "_constrainedBy": "https://bluebrain.github.io/nexus/schemas/projects.json",
  "_createdAt": "2021-05-10T15:43:36.567Z",
  "_createdBy": "http://localhost:8080/v1/anonymous",
  "_deprecated": false,
  "_effectiveApiMappings": [
    {
      "_namespace": "https://bluebrain.github.io/nexus/vocabulary/",
      "_prefix": "nxv"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/vocabulary/defaultElasticSearchIndex",
      "_prefix": "documents"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/vocabulary/defaultInProject",
      "_prefix": "defaultResolver"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/schemas/unconstrained.json",
      "_prefix": "resource"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/schemas/unconstrained.json",
      "_prefix": "_"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/schemas/views.json",
      "_prefix": "view"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/schemas/shacl-20170720.ttl",
      "_prefix": "schema"
    },
    {
      "_namespace": "http://example.com/my",
      "_prefix": "my"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/schemas/storages.json",
      "_prefix": "storage"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/schemas/files.json",
      "_prefix": "file"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/schemas/resolvers.json",
      "_prefix": "resolver"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/vocabulary/defaultSparqlIndex",
      "_prefix": "graph"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/schemas/archives.json",
      "_prefix": "archive"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/vocabulary/diskStorageDefault",
      "_prefix": "defaultStorage"
    }
  ],
  "_label": "myproject",
  "_organizationLabel": "myorg",
  "_organizationUuid": "41f169b8-7ae4-4878-a7ff-6309cb54ae2f",
  "_rev": 1,
  "_self": "http://localhost:8080/v1/projects/myorg/myproject",
  "_updatedAt": "2021-05-10T15:43:36.567Z",
  "_updatedBy": "http://localhost:8080/v1/anonymous",
  "_uuid": "813cfa79-75fc-48eb-b931-abb21edb082b"
}

Update

This operation overrides the project payload.

In order to ensure a client does not perform any changes to a project without having had seen the previous revision of the project, the last revision needs to be passed as a query parameter.

PUT /v1/projects/{org_label}/{label}?rev={previous_rev}
  {...}

… where

  • {previous_rev}: Number - the last known revision for the organization.
  • {label}: String - the user friendly name that identifies this project.

Example

Request
sourcecurl -X PUT \
   -H "Content-Type: application/json" \
   "http://localhost:8080/v1/projects/myorg/myproject?rev=1" \
   -d '{
    "description": "updated description",
    "vocab": "https://schema.org/"
   }'
Payload
source{
  "description": "updated description",
  "vocab": "https://schema.org/"
}
Response
source{
  "@context": [
    "https://bluebrain.github.io/nexus/contexts/projects-metadata.json",
    "https://bluebrain.github.io/nexus/contexts/metadata.json"
  ],
  "@id": "http://localhost:8080/v1/projects/myorg/myproject",
  "@type": "Project",
  "_constrainedBy": "https://bluebrain.github.io/nexus/schemas/projects.json",
  "_createdAt": "2021-05-10T15:43:36.567Z",
  "_createdBy": "http://localhost:8080/v1/anonymous",
  "_deprecated": false,
  "_effectiveApiMappings": [
    {
      "_namespace": "https://bluebrain.github.io/nexus/vocabulary/",
      "_prefix": "nxv"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/vocabulary/defaultElasticSearchIndex",
      "_prefix": "documents"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/vocabulary/defaultInProject",
      "_prefix": "defaultResolver"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/schemas/shacl-20170720.ttl",
      "_prefix": "schema"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/schemas/unconstrained.json",
      "_prefix": "resource"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/schemas/unconstrained.json",
      "_prefix": "_"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/schemas/views.json",
      "_prefix": "view"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/schemas/storages.json",
      "_prefix": "storage"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/schemas/files.json",
      "_prefix": "file"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/schemas/resolvers.json",
      "_prefix": "resolver"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/vocabulary/defaultSparqlIndex",
      "_prefix": "graph"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/schemas/archives.json",
      "_prefix": "archive"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/vocabulary/diskStorageDefault",
      "_prefix": "defaultStorage"
    }
  ],
  "_label": "myproject",
  "_organizationLabel": "myorg",
  "_organizationUuid": "41f169b8-7ae4-4878-a7ff-6309cb54ae2f",
  "_rev": 2,
  "_self": "http://localhost:8080/v1/projects/myorg/myproject",
  "_updatedAt": "2021-05-10T15:45:20.769Z",
  "_updatedBy": "http://localhost:8080/v1/anonymous",
  "_uuid": "813cfa79-75fc-48eb-b931-abb21edb082b"
}

Deprecate

Locks the project, so no further operations can be performed on it or on the children resources.

Deprecating a project is considered to be an update as well.

DELETE /v1/projects/{org_label}/{label}?rev={previous_rev}

… where

  • {previous_rev}: Number - the last known revision for the organization.
  • {label}: String - the user friendly name that identifies this project.

Example

Request
sourcecurl -X DELETE \
   "http://localhost:8080/v1/projects/myorg/myproject?rev=2"
Response
source{
  "@context": [
    "https://bluebrain.github.io/nexus/contexts/projects-metadata.json",
    "https://bluebrain.github.io/nexus/contexts/metadata.json"
  ],
  "@id": "http://localhost:8080/v1/projects/myorg/myproject",
  "@type": "Project",
  "_constrainedBy": "https://bluebrain.github.io/nexus/schemas/projects.json",
  "_createdAt": "2021-05-10T15:43:36.567Z",
  "_createdBy": "http://localhost:8080/v1/anonymous",
  "_deprecated": true,
  "_effectiveApiMappings": [
    {
      "_namespace": "https://bluebrain.github.io/nexus/vocabulary/",
      "_prefix": "nxv"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/vocabulary/defaultElasticSearchIndex",
      "_prefix": "documents"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/vocabulary/defaultInProject",
      "_prefix": "defaultResolver"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/schemas/shacl-20170720.ttl",
      "_prefix": "schema"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/schemas/unconstrained.json",
      "_prefix": "resource"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/schemas/unconstrained.json",
      "_prefix": "_"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/schemas/views.json",
      "_prefix": "view"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/schemas/storages.json",
      "_prefix": "storage"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/schemas/files.json",
      "_prefix": "file"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/schemas/resolvers.json",
      "_prefix": "resolver"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/vocabulary/defaultSparqlIndex",
      "_prefix": "graph"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/schemas/archives.json",
      "_prefix": "archive"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/vocabulary/diskStorageDefault",
      "_prefix": "defaultStorage"
    }
  ],
  "_label": "myproject",
  "_organizationLabel": "myorg",
  "_organizationUuid": "41f169b8-7ae4-4878-a7ff-6309cb54ae2f",
  "_rev": 3,
  "_self": "http://localhost:8080/v1/projects/myorg/myproject",
  "_updatedAt": "2021-05-10T15:47:40.659Z",
  "_updatedBy": "http://localhost:8080/v1/anonymous",
  "_uuid": "813cfa79-75fc-48eb-b931-abb21edb082b"
}

Fetch (current version)

GET /v1/projects/{org_label}/{label}

…where {label} is the user friendly name that identifies this project.

Example

Request
sourcecurl "http://localhost:8080/v1/projects/myorg/myproject"
Response
source{
  "@context": [
    "https://bluebrain.github.io/nexus/contexts/projects.json",
    "https://bluebrain.github.io/nexus/contexts/metadata.json"
  ],
  "@id": "http://localhost:8080/v1/projects/myorg/myproject",
  "@type": "Project",
  "apiMappings": [],
  "base": "http://localhost:8080/v1/resources/myorg/myproject/_/",
  "description": "updated description",
  "vocab": "https://schema.org/",
  "_constrainedBy": "https://bluebrain.github.io/nexus/schemas/projects.json",
  "_createdAt": "2021-05-10T15:43:36.567Z",
  "_createdBy": "http://localhost:8080/v1/anonymous",
  "_deprecated": true,
  "_effectiveApiMappings": [
    {
      "_namespace": "https://bluebrain.github.io/nexus/vocabulary/",
      "_prefix": "nxv"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/vocabulary/defaultElasticSearchIndex",
      "_prefix": "documents"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/vocabulary/defaultInProject",
      "_prefix": "defaultResolver"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/schemas/shacl-20170720.ttl",
      "_prefix": "schema"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/schemas/unconstrained.json",
      "_prefix": "resource"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/schemas/unconstrained.json",
      "_prefix": "_"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/schemas/views.json",
      "_prefix": "view"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/schemas/storages.json",
      "_prefix": "storage"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/schemas/files.json",
      "_prefix": "file"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/schemas/resolvers.json",
      "_prefix": "resolver"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/vocabulary/defaultSparqlIndex",
      "_prefix": "graph"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/schemas/archives.json",
      "_prefix": "archive"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/vocabulary/diskStorageDefault",
      "_prefix": "defaultStorage"
    }
  ],
  "_label": "myproject",
  "_organizationLabel": "myorg",
  "_organizationUuid": "41f169b8-7ae4-4878-a7ff-6309cb54ae2f",
  "_rev": 3,
  "_self": "http://localhost:8080/v1/projects/myorg/myproject",
  "_updatedAt": "2021-05-10T15:47:40.659Z",
  "_updatedBy": "http://localhost:8080/v1/anonymous",
  "_uuid": "813cfa79-75fc-48eb-b931-abb21edb082b"
}

Fetch (specific version)

GET /v1/projects/{org_label}/{label}?rev={rev}

…where

  • {label}: String - the user friendly name that identifies this project.
  • {rev}: Number - the revision of the project to be retrieved.

Example

Request
sourcecurl "http://localhost:8080/v1/projects/myorg/myproject?rev=1"
Response
source{
  "@context": [
    "https://bluebrain.github.io/nexus/contexts/projects.json",
    "https://bluebrain.github.io/nexus/contexts/metadata.json"
  ],
  "@id": "http://localhost:8080/v1/projects/myorg/myproject",
  "@type": "Project",
  "apiMappings": [
    {
      "namespace": "http://example.com/my",
      "prefix": "my"
    }
  ],
  "base": "http://localhost:8080/v1/resources/myorg/myproject/_/",
  "description": "description",
  "vocab": "https://schema.org/",
  "_constrainedBy": "https://bluebrain.github.io/nexus/schemas/projects.json",
  "_createdAt": "2021-05-10T15:43:36.567Z",
  "_createdBy": "http://localhost:8080/v1/anonymous",
  "_deprecated": false,
  "_effectiveApiMappings": [
    {
      "_namespace": "https://bluebrain.github.io/nexus/vocabulary/",
      "_prefix": "nxv"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/vocabulary/defaultElasticSearchIndex",
      "_prefix": "documents"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/vocabulary/defaultInProject",
      "_prefix": "defaultResolver"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/schemas/unconstrained.json",
      "_prefix": "resource"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/schemas/unconstrained.json",
      "_prefix": "_"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/schemas/views.json",
      "_prefix": "view"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/schemas/shacl-20170720.ttl",
      "_prefix": "schema"
    },
    {
      "_namespace": "http://example.com/my",
      "_prefix": "my"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/schemas/storages.json",
      "_prefix": "storage"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/schemas/files.json",
      "_prefix": "file"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/schemas/resolvers.json",
      "_prefix": "resolver"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/vocabulary/defaultSparqlIndex",
      "_prefix": "graph"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/schemas/archives.json",
      "_prefix": "archive"
    },
    {
      "_namespace": "https://bluebrain.github.io/nexus/vocabulary/diskStorageDefault",
      "_prefix": "defaultStorage"
    }
  ],
  "_label": "myproject",
  "_organizationLabel": "myorg",
  "_organizationUuid": "41f169b8-7ae4-4878-a7ff-6309cb54ae2f",
  "_rev": 1,
  "_self": "http://localhost:8080/v1/projects/myorg/myproject",
  "_updatedAt": "2021-05-10T15:43:36.567Z",
  "_updatedBy": "http://localhost:8080/v1/anonymous",
  "_uuid": "813cfa79-75fc-48eb-b931-abb21edb082b"
}

List

GET /v1/projects?from={from}
                 &size={size}
                 &deprecated={deprecated}
                 &rev={rev}
                 &createdBy={createdBy}
                 &updatedBy={updatedBy}
                 &label={label}
                 &sort={sort}

or the variation to filter a specific organization {org_label}:

GET /v1/projects/{org_label}?from={from}
                             &size={size}
                             &deprecated={deprecated}
                             &rev={rev}
                             &createdBy={createdBy}
                             &updatedBy={updatedBy}
                             &label={label}
                             &sort={sort}

where…

  • {from}: Number - the offset from which to start the listings. Defaults to 0
  • {size}: Number - the maximum amount fo results to be returned. Defaults to 30
  • {deprecated}: Boolean - filter the resulting projects based on their deprecation status. Optional parameter.
  • {rev}: Number - filter the resulting projects based on their revision value. Optional parameter.
  • {createdBy}: Iri - filter the resulting projects based on their creator. Optional parameter.
  • {updatedBy}: Iri - filter the resulting projects based on the person which performed the last update. Optional parameter.
  • {label}: String - filter the resulting projects based on its label. E.g.: label=my will match any project’s label that contains the string my. Optional parameter.
  • {sort}: String - orders the resulting projects based on its metadata fields. Optional parameter that can appear multiple times, further specifying the ordering criteria. Defaults to _createdAt, ordering projects by creation date.

Example

Request
sourcecurl "http://localhost:8080/v1/projects?label=my"
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/projects.json"
  ],
  "_total": 1,
  "_results": [
    {
      "@id": "http://localhost:8080/v1/projects/myorg/myproject",
      "@type": "Project",
      "apiMappings": [],
      "base": "http://localhost:8080/v1/resources/myorg/myproject/_/",
      "description": "updated description",
      "vocab": "https://schema.org/",
      "_constrainedBy": "https://bluebrain.github.io/nexus/schemas/projects.json",
      "_createdAt": "2021-05-10T15:43:36.567Z",
      "_createdBy": "http://localhost:8080/v1/anonymous",
      "_deprecated": true,
      "_effectiveApiMappings": [
        {
          "_namespace": "https://bluebrain.github.io/nexus/vocabulary/",
          "_prefix": "nxv"
        },
        {
          "_namespace": "https://bluebrain.github.io/nexus/vocabulary/defaultElasticSearchIndex",
          "_prefix": "documents"
        },
        {
          "_namespace": "https://bluebrain.github.io/nexus/vocabulary/defaultInProject",
          "_prefix": "defaultResolver"
        },
        {
          "_namespace": "https://bluebrain.github.io/nexus/schemas/shacl-20170720.ttl",
          "_prefix": "schema"
        },
        {
          "_namespace": "https://bluebrain.github.io/nexus/schemas/unconstrained.json",
          "_prefix": "resource"
        },
        {
          "_namespace": "https://bluebrain.github.io/nexus/schemas/unconstrained.json",
          "_prefix": "_"
        },
        {
          "_namespace": "https://bluebrain.github.io/nexus/schemas/views.json",
          "_prefix": "view"
        },
        {
          "_namespace": "https://bluebrain.github.io/nexus/schemas/storages.json",
          "_prefix": "storage"
        },
        {
          "_namespace": "https://bluebrain.github.io/nexus/schemas/files.json",
          "_prefix": "file"
        },
        {
          "_namespace": "https://bluebrain.github.io/nexus/schemas/resolvers.json",
          "_prefix": "resolver"
        },
        {
          "_namespace": "https://bluebrain.github.io/nexus/vocabulary/defaultSparqlIndex",
          "_prefix": "graph"
        },
        {
          "_namespace": "https://bluebrain.github.io/nexus/schemas/archives.json",
          "_prefix": "archive"
        },
        {
          "_namespace": "https://bluebrain.github.io/nexus/vocabulary/diskStorageDefault",
          "_prefix": "defaultStorage"
        }
      ],
      "_label": "myproject",
      "_organizationLabel": "myorg",
      "_organizationUuid": "41f169b8-7ae4-4878-a7ff-6309cb54ae2f",
      "_rev": 3,
      "_self": "http://localhost:8080/v1/projects/myorg/myproject",
      "_updatedAt": "2021-05-10T15:47:40.659Z",
      "_updatedBy": "http://localhost:8080/v1/anonymous",
      "_uuid": "813cfa79-75fc-48eb-b931-abb21edb082b"
    }
  ]
}

Server Sent Events

This endpoint allows clients to receive automatic updates from the projects in a streaming fashion.

GET /v1/projects/events

where Last-Event-Id is an optional HTTP Header that identifies the last consumed project 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 response contains a series of project events, represented in the following way

data:{payload}
event:{type}
id:{id}

where…

  • {payload}: Json - is the actual payload of the current project
  • {type}: String - is a type identifier for the current project. Possible types are: ProjectCreated, ProjectUpdated and ProjectDeprecated
  • {id}: String - is the identifier of the project event. It can be used in the Last-Event-Id HTTP Header

Example

Request
sourcecurl "http://localhost:8080/v1/projects/events"
Response
sourcedata:{"@context":["https://bluebrain.github.io/nexus/contexts/metadata.json","https://bluebrain.github.io/nexus/contexts/projects.json"],"@type":"ProjectCreated","apiMappings":[{"namespace":"http://example.com/my","prefix":"my"}],"base":"http://localhost:8080/v1/resources/myorg/myproject/_/","description":"description","vocab":"https://schema.org/","_instant":"2021-05-10T15:43:36.567Z","_label":"myproject","_organizationLabel":"myorg","_organizationUuid":"41f169b8-7ae4-4878-a7ff-6309cb54ae2f","_projectId":"http://localhost:8080/v1/projects/myorg/myproject","_resourceId":"http://localhost:8080/v1/projects/myorg/myproject","_rev":1,"_subject":"http://localhost:8080/v1/anonymous","_uuid":"813cfa79-75fc-48eb-b931-abb21edb082b"}
event:ProjectCreated
id:7bdd4bc0-b1a6-11eb-a162-35a8ee728fbb

data:{"@context":["https://bluebrain.github.io/nexus/contexts/metadata.json","https://bluebrain.github.io/nexus/contexts/projects.json"],"@type":"ProjectUpdated","apiMappings":[],"base":"http://localhost:8080/v1/resources/myorg/myproject/_/","description":"updated description","vocab":"https://schema.org/","_instant":"2021-05-10T15:45:20.769Z","_label":"myproject","_organizationLabel":"myorg","_organizationUuid":"41f169b8-7ae4-4878-a7ff-6309cb54ae2f","_projectId":"http://localhost:8080/v1/projects/myorg/myproject","_resourceId":"http://localhost:8080/v1/projects/myorg/myproject","_rev":2,"_subject":"http://localhost:8080/v1/anonymous","_uuid":"813cfa79-75fc-48eb-b931-abb21edb082b"}
event:ProjectUpdated
id:b9f8a620-b1a6-11eb-a162-35a8ee728fbb

data:{"@context":["https://bluebrain.github.io/nexus/contexts/metadata.json","https://bluebrain.github.io/nexus/contexts/projects.json"],"@type":"ProjectDeprecated","_instant":"2021-05-10T15:47:40.659Z","_label":"myproject","_organizationLabel":"myorg","_organizationUuid":"41f169b8-7ae4-4878-a7ff-6309cb54ae2f","_projectId":"http://localhost:8080/v1/projects/myorg/myproject","_resourceId":"http://localhost:8080/v1/projects/myorg/myproject","_rev":3,"_subject":"http://localhost:8080/v1/anonymous","_uuid":"813cfa79-75fc-48eb-b931-abb21edb082b"}
event:ProjectDeprecated
id:0d5a5250-b1a7-11eb-a162-35a8ee728fbb