Resolvers

Resolvers are rooted in the /v1/resolvers/{org_label}/{project_label} collection and are used in the following scenarios:

  • Bring the content of the owl:imports predicate for schema resources. The value is the @id of the resource. E.g.: You can define owl imports on a schema, as follows "owl:imports": "http://example.com/myid". The resolver will try to find a resource with "@id": "http://example.com/myid" and if found, will bring the payload into the original resource.
  • Bring the content of the @context links. The value is the @id of the resource. E.g.: A resource might define the context as follows: "@context": "http://example.com/id". The resolver will try to find a resource with "@id": "http://example.com/id" and if found, will bring the payload into the original resource.

Each resolver…

  • belongs to a project identifier by the label {project_label}
  • inside an organization identifier by the label {org_label}
  • it is validated against the resolver schema.

Access to resources in the system depends on the access control list set for them. Depending on the access control list, a caller may need to prove its identity by means of an access token passed to the Authorization header (Authorization: Bearer {token}). Please visit Authentication to learn more about how to retrieve an access token.

Authorization notes

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

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

Resolver types

There are several types of resolvers, which perform resolution in different scopes.

InProject resolver

The scope of the resolution is the current project where the resource resides. In other words:

  • Schema A can import schema B using the owl:import as long as schema B is located on the same project as schema A.
  • Resource A can reference resource’s context B (inside @context) as long as resource B is located on the same project as resource A.

This resolver gets automatically created when the project is created and it cannot be modified.

InProject resolver payload

{
    "@id": "nxv:InProject",
    "@type": [ "InProject", "Resolver" ],
    "priority": {priority},
}

where {priority} is a numeric value (from 1 - 100) which defines the resolution priority when attempting to find the resource with a particular @id.

CrossProject resolver

The scope of the resolution is the collections of projects P defined on the resolver. CrossProject resolution also defines a collection of identities I to enforce ACLs. In other words:

  • Schema A can import schema B using the owl:import as long as schema B is located on some of the projects from the collection P and as long I have resources/read permissions on the schema B project.
  • Resource A can reference resource’s context B (inside @context) as long as resource B is located on some of the projects from the collection P and as long as I have resources/read permissions on the schema B project.

CrossProject resolver payload

{
  "@id": "{someid}",
  "@type": ["Resolver", "CrossProject"],
  "resourceTypes": ["{resourceType}", ...],
  "projects": ["{project}", ... ],
  "identities": [ {_identity_}, {...} ],
  "priority": 50
}

where…

  • {resourceType}: Iri - resolves only the resources with @type containing {resourceType}. This field is optional.
  • {priority}: Number - value (from 1 - 100) which defines the resolution priority when attempting to find the resource with a particular @id.
  • {project}: String - the user friendly reference to the project from where the resolution process will attempt to find the @id’s. It follows the format {organization}/{project}.
  • _identity_: Json object - the identity against which to enforce ACLs during resolution process.
  • {someid}: Iri - the @id value for this resolver.

Example

Request
curl -XPUT -H "Content-Type: application/json" "https://nexus.example.com/v1/resolvers/myorg/myproj/nxv:myresolver" -d \
'{
  "@type": [
    "CrossProject"
  ],
  "projects": [
    "org1/project1",
    "org1/project2"
  ],
  "identities": [
    {
      "realm": "myrealm",
      "subject": "name"
    }
  ],
  "priority": 50
}'
Full source at GitHub
Payload
{
  "@id": "https://bluebrain.github.io/nexus/vocabulary/myresolver",
  "@type": [
    "CrossProject"
  ],
  "projects": [
    "org1/project1",
    "org1/project2"
  ],
  "identities": [
    {
      "realm": "myrealm",
      "subject": "name"
    }
  ],
  "priority": 50
}
Full source at GitHub
Response
{
  "@context": "https://bluebrain.github.io/nexus/contexts/resource.json",
  "@id": "nxv:myresolver",
  "@type": [
    "Resolver",
    "CrossProject"
  ],
  "_incoming": "https://nexus.example.com/v1/resolvers/myorg/myproject/nxv:myresolver/incoming",
  "_outgoing": "https://nexus.example.com/v1/resolvers/myorg/myproject/nxv:myresolver/outgoing",
  "_self": "https://nexus.example.com/v1/resolvers/myorg/myproject/nxv:myresolver",
  "_constrainedBy": "https://bluebrain.github.io/nexus/schemas/resolver",
  "_project": "https://nexus.example.com/v1/projects/myorg/myproj",
  "_rev": 1,
  "_deprecated": false,
  "_createdAt": "2018-09-18T09:58:00.801Z",
  "_createdBy": "https://nexus.example.com/v1/realms/myrealm/users/john",
  "_updatedAt": "2018-09-18T09:58:00.801Z",
  "_updatedBy": "https://nexus.example.com/v1/realms/myrealm/users/john"
}
Full source at GitHub

Create a resolver using POST

POST /v1/resolvers/{org_label}/{project_label}
  {...}

The json payload:

  • If the @id value is found on the payload, this @id will be used.
  • If the @id value is not found on the payload, an @id will be generated as follows: base:{UUID}. The base is the prefix defined on the resolver’s project ({project_label}).

Example

Request
curl -XPOST -H "Content-Type: application/json" "https://nexus.example.com/v1/resolvers/myorg/myproj" -d \
'{
  "@id": "https://bluebrain.github.io/nexus/vocabulary/myresolver",
  "@type": [
    "CrossProject"
  ],
  "projects": [
    "org1/project1",
    "org1/project2"
  ],
  "identities": [
    {
      "realm": "myrealm",
      "subject": "name"
    }
  ],
  "priority": 50
}'
Full source at GitHub
Payload
{
  "@id": "https://bluebrain.github.io/nexus/vocabulary/myresolver",
  "@type": [
    "CrossProject"
  ],
  "projects": [
    "org1/project1",
    "org1/project2"
  ],
  "identities": [
    {
      "realm": "myrealm",
      "subject": "name"
    }
  ],
  "priority": 50
}
Full source at GitHub
Response
{
  "@context": "https://bluebrain.github.io/nexus/contexts/resource.json",
  "@id": "nxv:myresolver",
  "@type": [
    "Resolver",
    "CrossProject"
  ],
  "_incoming": "https://nexus.example.com/v1/resolvers/myorg/myproject/nxv:myresolver/incoming",
  "_outgoing": "https://nexus.example.com/v1/resolvers/myorg/myproject/nxv:myresolver/outgoing",
  "_self": "https://nexus.example.com/v1/resolvers/myorg/myproject/nxv:myresolver",
  "_constrainedBy": "https://bluebrain.github.io/nexus/schemas/resolver",
  "_project": "https://nexus.example.com/v1/projects/myorg/myproj",
  "_rev": 1,
  "_deprecated": false,
  "_createdAt": "2018-09-18T09:58:00.801Z",
  "_createdBy": "https://nexus.example.com/v1/realms/myrealm/users/john",
  "_updatedAt": "2018-09-18T09:58:00.801Z",
  "_updatedBy": "https://nexus.example.com/v1/realms/myrealm/users/john"
}
Full source at GitHub

Create a resolver using PUT

This alternative endpoint to create a resolver 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/resolvers/{org_label}/{project_label}/{resolver_id}
  {...}

Note that if the payload contains an @id different from the {resolver_id}, the request will fail.

Example

Request
curl -XPUT -H "Content-Type: application/json" "https://nexus.example.com/v1/resolvers/myorg/myproj/nxv:myresolver" -d \
'{
  "@type": [
    "CrossProject"
  ],
  "projects": [
    "org1/project1",
    "org1/project2"
  ],
  "identities": [
    {
      "realm": "myrealm",
      "subject": "name"
    }
  ],
  "priority": 50
}'
Full source at GitHub
Payload
{
  "@type": [
    "CrossProject"
  ],
  "projects": [
    "org1/project1",
    "org1/project2"
  ],
  "identities": [
    {
      "realm": "myrealm",
      "subject": "name"
    }
  ],
  "priority": 50
}
Full source at GitHub
Response
{
  "@context": "https://bluebrain.github.io/nexus/contexts/resource.json",
  "@id": "nxv:myresolver",
  "@type": [
    "Resolver",
    "CrossProject"
  ],
  "_incoming": "https://nexus.example.com/v1/resolvers/myorg/myproject/nxv:myresolver/incoming",
  "_outgoing": "https://nexus.example.com/v1/resolvers/myorg/myproject/nxv:myresolver/outgoing",
  "_self": "https://nexus.example.com/v1/resolvers/myorg/myproject/nxv:myresolver",
  "_constrainedBy": "https://bluebrain.github.io/nexus/schemas/resolver",
  "_project": "https://nexus.example.com/v1/projects/myorg/myproj",
  "_rev": 1,
  "_deprecated": false,
  "_createdAt": "2018-09-18T09:58:00.801Z",
  "_createdBy": "https://nexus.example.com/v1/realms/myrealm/users/john",
  "_updatedAt": "2018-09-18T09:58:00.801Z",
  "_updatedBy": "https://nexus.example.com/v1/realms/myrealm/users/john"
}
Full source at GitHub

Update a resolver

This operation overrides the payload.

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

PUT /v1/resolvers/{org_label}/{project_label}/{resolver_id}?rev={previous_rev}
  {...}

… where {previous_rev} is the last known revision number for the resolver.

Example

Request
curl -XPUT -H "Content-Type: application/json" "https://nexus.example.com/v1/resolvers/myorg/myproj/nxv:myresolver?rev=1" -d \
'{
  "@type": [
    "CrossProject"
  ],
  "projects": [
    "org1/project1",
    "org1/project2"
  ],
  "identities": [
    {
      "realm": "myrealm",
      "subject": "name"
    }
  ],
  "priority": 50
}'
Full source at GitHub
Payload
{
  "@id": "https://bluebrain.github.io/nexus/vocabulary/myresolver",
  "@type": [
    "CrossProject"
  ],
  "projects": [
    "org1/project1",
    "org1/project2"
  ],
  "identities": [
    {
      "realm": "myrealm",
      "subject": "name"
    }
  ],
  "priority": 50
}
Full source at GitHub
Response
{
  "@context": "https://bluebrain.github.io/nexus/contexts/resource.json",
  "@id": "nxv:myresolver",
  "@type": [
    "Resolver",
    "CrossProject"
  ],
  "_incoming": "https://nexus.example.com/v1/resolvers/myorg/myproject/nxv:myresolver/incoming",
  "_outgoing": "https://nexus.example.com/v1/resolvers/myorg/myproject/nxv:myresolver/outgoing",
  "_self": "https://nexus.example.com/v1/resolvers/myorg/myproject/nxv:myresolver",
  "_constrainedBy": "https://bluebrain.github.io/nexus/schemas/resolver",
  "_project": "https://nexus.example.com/v1/projects/myorg/myproj",
  "_rev": 2,
  "_deprecated": false,
  "_createdAt": "2018-09-18T09:58:00.801Z",
  "_createdBy": "https://nexus.example.com/v1/realms/myrealm/users/john",
  "_updatedAt": "2018-09-18T10:10:00.801Z",
  "_updatedBy": "https://nexus.example.com/v1/realms/myrealm/users/john"
}
Full source at GitHub

Tag a resolver

Links a resolver revision to a specific name.

Tagging a resolver is considered to be an update as well.

POST /v1/resolvers/{org_label}/{project_label}/{resolver_id}/tags?rev={previous_rev}
  {
    "tag": "{name}",
    "rev": {rev}
  }

… where

  • {previous_rev}: Number - the last known revision for the resolver.
  • {name}: String - label given to the resolver at specific revision.
  • {rev}: Number - the revision to link the provided {name}.

Example

Request
curl -XPOST -H "Content-Type: application/json" "https://nexus.example.com/v1/resolvers/myorg/myproj/nxv:myresolver/tags?rev=2" -d \
'{
  "tag": "mytag",
  "rev": 1
}'
Full source at GitHub
Payload
{
  "tag": "mytag",
  "rev": 1
}
Full source at GitHub
Response
{
  "@context": "https://bluebrain.github.io/nexus/contexts/resource.json",
  "@id": "nxv:myresolver",
  "@type": [
    "Resolver",
    "CrossProject"
  ],
  "_incoming": "https://nexus.example.com/v1/resolvers/myorg/myproject/nxv:myresolver/incoming",
  "_outgoing": "https://nexus.example.com/v1/resolvers/myorg/myproject/nxv:myresolver/outgoing",
  "_self": "https://nexus.example.com/v1/resolvers/myorg/myproject/nxv:myresolver",
  "_constrainedBy": "https://bluebrain.github.io/nexus/schemas/resolver",
  "_project": "https://nexus.example.com/v1/projects/myorg/myproj",
  "_rev": 3,
  "_deprecated": false,
  "_createdAt": "2018-09-18T09:58:00.801Z",
  "_createdBy": "https://nexus.example.com/v1/realms/myrealm/users/john",
  "_updatedAt": "2018-09-18T10:25:00.801Z",
  "_updatedBy": "https://nexus.example.com/v1/realms/myrealm/users/john"
}
Full source at GitHub

Deprecate a resolver

Locks the resolver, so no further operations can be performed. It will also not be taken into account in the resolution process.

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

DELETE /v1/resolvers/{org_label}/{project_label}/{resolver_id}?rev={previous_rev}

… where {previous_rev} is the last known revision number for the resolver.

Example

Request
curl -XDELETE "https://nexus.example.com/v1/resolvers/myorg/myproj/nxv:myresolver?rev=5"
Full source at GitHub
Response
{
  "@context": "https://bluebrain.github.io/nexus/contexts/resource.json",
  "@id": "nxv:myresolver",
  "@type": [
    "Resolver",
    "CrossProject"
  ],
  "_incoming": "https://nexus.example.com/v1/resolvers/myorg/myproject/nxv:myresolver/incoming",
  "_outgoing": "https://nexus.example.com/v1/resolvers/myorg/myproject/nxv:myresolver/outgoing",
  "_self": "https://nexus.example.com/v1/resolvers/myorg/myproject/nxv:myresolver",
  "_constrainedBy": "https://bluebrain.github.io/nexus/schemas/resolver",
  "_project": "https://nexus.example.com/v1/projects/myorg/myproj",
  "_rev": 6,
  "_deprecated": true,
  "_createdAt": "2018-09-18T09:58:00.801Z",
  "_createdBy": "https://nexus.example.com/v1/realms/myrealm/users/john",
  "_updatedAt": "2018-09-18T10:25:00.801Z",
  "_updatedBy": "https://nexus.example.com/v1/realms/myrealm/users/john"
}
Full source at GitHub

Fetch a resolver (current version)

GET /v1/resolvers/{org_label}/{project_label}/{resolver_id}

Example

Request
curl "https://nexus.example.com/v1/resolvers/myorg/myproj/nxv:myresolver"
Full source at GitHub
Response
{
  "@context": [
    "https://bluebrain.github.io/nexus/contexts/resolver.json",
    "https://bluebrain.github.io/nexus/contexts/resource.json"
  ],
  "@id": "nxv:myresolver",

  "@type": [
    "Resolver",
    "CrossProject"
  ],
  "projects": [
    "org1/project1",
    "org1/project2"
  ],
  "identities": [
    {
      "@type": "User",
      "realm": "myrealm",
      "subject": "name"
    }
  ],
  "priority": 50,
  "_incoming": "https://nexus.example.com/v1/resolvers/myorg/myproject/nxv:myresolver/incoming",
  "_outgoing": "https://nexus.example.com/v1/resolvers/myorg/myproject/nxv:myresolver/outgoing",
  "_self": "https://nexus.example.com/v1/resolvers/myorg/myproject/nxv:myresolver",
  "_constrainedBy": "https://bluebrain.github.io/nexus/schemas/resolver",
  "_project": "https://nexus.example.com/v1/projects/myorg/myproj",
  "_rev": 4,
  "_deprecated": true,
  "_createdAt": "2018-09-18T09:58:00.801Z",
  "_createdBy": "https://nexus.example.com/v1/realms/myrealm/users/john",
  "_updatedAt": "2018-09-18T10:25:00.801Z",
  "_updatedBy": "https://nexus.example.com/v1/realms/myrealm/users/john"
}
Full source at GitHub

Fetch a resolver (specific version)

GET /v1/resolvers/{org_label}/{project_label}/{resolver_id}?rev={rev}

… where {rev} is the revision number of the resolver to be retrieved.

Example

Request
curl "https://nexus.example.com/v1/resolvers/myorg/myproj/nxv:myresolver?rev=4"
Full source at GitHub
Response
{
  "@context": [
    "https://bluebrain.github.io/nexus/contexts/resolver.json",
    "https://bluebrain.github.io/nexus/contexts/resource.json"
  ],
  "@id": "nxv:myresolver",

  "@type": [
    "Resolver",
    "CrossProject"
  ],
  "projects": [
    "org1/project1",
    "org1/project2"
  ],
  "identities": [
    {
      "@type": "User",
      "realm": "myrealm",
      "subject": "name"
    }
  ],
  "priority": 50,
  "_incoming": "https://nexus.example.com/v1/resolvers/myorg/myproject/nxv:myresolver/incoming",
  "_outgoing": "https://nexus.example.com/v1/resolvers/myorg/myproject/nxv:myresolver/outgoing",
  "_self": "https://nexus.example.com/v1/resolvers/myorg/myproject/nxv:myresolver",
  "_constrainedBy": "https://bluebrain.github.io/nexus/schemas/resolver",
  "_project": "https://nexus.example.com/v1/projects/myorg/myproj",
  "_rev": 4,
  "_deprecated": true,
  "_createdAt": "2018-09-18T09:58:00.801Z",
  "_createdBy": "https://nexus.example.com/v1/realms/myrealm/users/john",
  "_updatedAt": "2018-09-18T10:25:00.801Z",
  "_updatedBy": "https://nexus.example.com/v1/realms/myrealm/users/john"
}
Full source at GitHub

Fetch a resolver (specific tag)

GET /v1/resolvers/{org_label}/{project_label}/{resolver_id}?tag={tag}

… where {tag} is the tag of the resolver to be retrieved.

Example

Request
curl "https://nexus.example.com/v1/resolvers/myorg/myproj/nxv:myresolver?tag=mytag"
Full source at GitHub
Response
{
  "@context": [
    "https://bluebrain.github.io/nexus/contexts/resolver.json",
    "https://bluebrain.github.io/nexus/contexts/resource.json"
  ],
  "@id": "nxv:myresolver",

  "@type": [
    "Resolver",
    "CrossProject"
  ],
  "projects": [
    "org1/project1",
    "org1/project2"
  ],
  "identities": [
    {
      "@type": "User",
      "realm": "myrealm",
      "subject": "name"
    }
  ],
  "priority": 50,
  "_incoming": "https://nexus.example.com/v1/resolvers/myorg/myproject/nxv:myresolver/incoming",
  "_outgoing": "https://nexus.example.com/v1/resolvers/myorg/myproject/nxv:myresolver/outgoing",
  "_self": "https://nexus.example.com/v1/resolvers/myorg/myproject/nxv:myresolver",
  "_constrainedBy": "https://bluebrain.github.io/nexus/schemas/resolver",
  "_project": "https://nexus.example.com/v1/projects/myorg/myproj",
  "_rev": 1,
  "_deprecated": false,
  "_createdAt": "2018-09-18T09:58:00.801Z",
  "_createdBy": "https://nexus.example.com/v1/realms/myrealm/users/john",
  "_updatedAt": "2018-09-18T09:58:00.801Z",
  "_updatedBy": "https://nexus.example.com/v1/realms/myrealm/users/john"
}
Full source at GitHub

List resolvers

GET /v1/resolvers/{org_label}/{project_label}?from={from}&size={size}&deprecated={deprecated}&rev={rev}&type={type}&createdBy={createdBy}&updatedBy={updatedBy}&q={search}

where…

  • {from}: Number - is the parameter that describes the offset for the current query; defaults to 0
  • {size}: Number - is the parameter that limits the number of results; defaults to 20
  • {deprecated}: Boolean - can be used to filter the resulting resolvers based on their deprecation status
  • {rev}: Number - can be used to filter the resulting resolvers based on their revision value
  • {type}: Iri - can be used to filter the resulting resolvers 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 resolvers based on their creator
  • {updatedBy}: Iri - can be used to filter the resulting resolvers based on the person which performed the last update
  • {search}: String - can be provided to select only the resolvers in the collection that have attribute values matching (containing) the provided string

Example

Request
curl "https://nexus.example.com/v1/resolvers/myorg/myproj"
Full source at GitHub
Response
{
  "@context": [
    "https://bluebrain.github.io/nexus/contexts/search.json",
    "https://bluebrain.github.io/nexus/contexts/resource.json"
  ],
  "_total": 2,
  "_results": [
    {
      "@id": "https://bluebrain.github.io/nexus/vocabulary/InProject",
      "@type": [
        "https://bluebrain.github.io/nexus/vocabulary/Resolver",
        "https://bluebrain.github.io/nexus/vocabulary/InProject"
      ],
      "_incoming": "https://nexus.example.com/v1/resolvers/myorg/myproject/nxv:InProject/incoming",
      "_outgoing": "https://nexus.example.com/v1/resolvers/myorg/myproject/nxv:InProject/outgoing",
      "_self": "https://nexus.example.com/v1/resolvers/myorg/myproject/nxv:InProject",
      "_constrainedBy": "https://bluebrain.github.io/nexus/schemas/resolver",
      "_project": "https://nexus.example.com/v1/projects/myorg/myproj",
      "_createdAt": "2018-09-18T09:50:00.801Z",
      "_createdBy": "https://nexus.example.com/v1/realms/myrealm/users/john",
      "_updatedAt": "2018-09-18T10:00:00.801Z",
      "_updatedBy": "https://nexus.example.com/v1/realms/myrealm/users/john",
      "_rev": 1,
      "_deprecated": true
    },
    {
      "@id": "https://bluebrain.github.io/nexus/vocabulary/myresolver",
      "@type": [
        "https://bluebrain.github.io/nexus/vocabulary/Resolver",
        "https://bluebrain.github.io/nexus/vocabulary/CrossProject"
      ],
      "_incoming": "https://nexus.example.com/v1/resolvers/myorg/myproject/nxv:myresolver/incoming",
      "_outgoing": "https://nexus.example.com/v1/resolvers/myorg/myproject/nxv:myresolver/outgoing",
      "_self": "https://nexus.example.com/v1/resolvers/myorg/myproject/nxv:myresolver",
      "_constrainedBy": "https://bluebrain.github.io/nexus/schemas/resolver",
      "_project": "https://nexus.example.com/v1/projects/myorg/myproj",
      "_createdAt": "2018-09-18T09:58:00.801Z",
      "_createdBy": "https://nexus.example.com/v1/realms/myrealm/users/john",
      "_updatedAt": "2018-09-18T10:25:00.801Z",
      "_updatedBy": "https://nexus.example.com/v1/realms/myrealm/users/john",
      "_rev": 4,
      "_deprecated": true
    }
  ],
  "_next": "https://nexus.example.com/v1/resolvers/myorg/myproj?after=%5B1559045718752,%22https://bluebrain.github.io/nexus/vocabulary/myresolver29%22%5D"
}
Full source at GitHub

Fetch resource using resolvers (current version)

Fetches a resource using the provided resolver.

If the resolver segment ({resolver_id}) is _ the resource is fetched from the first resolver in the requested project ({org_label}/{project_label}). The resolvers are ordered by its priority field.

GET /v1/resolvers/{org_label}/{project_label}/{resolver_id}/{resource_id}

… where {resource_id} is the @id value of the resource to be retrieved.

Example

Request
curl "https://nexus.example.com/v1/resolvers/myorg/myproj/nxv:myresolver/base:fd8a2b32-170e-44e8-808f-44a8cbbc49b0"
Full source at GitHub
Response
{
  "@context": [
    {
      "@vocab": "http://example.com/",
      "ex": "http://example.com/"
    },
    "https://bluebrain.github.io/nexus/contexts/resource.json"
  ],
  "@id": "https://nexus.example.com/v1/resources/myorg/myproj/fd8a2b32-170e-44e8-808f-44a8cbbc49b0",
  "@type": "Custom",
  "bool": false,
  "name": "Alex",
  "number": 24,
  "_incoming": "https://nexus.example.com/v1/resources/myorg/myproj/myschema/base:fd8a2b32-170e-44e8-808f-44a8cbbc49b0/incoming",
  "_outgoing": "https://nexus.example.com/v1/resources/myorg/myproj/myschema/base:fd8a2b32-170e-44e8-808f-44a8cbbc49b0/outgoing",
  "_self": "https://nexus.example.com/v1/resources/myorg/myproj/myschema/base:fd8a2b32-170e-44e8-808f-44a8cbbc49b0",
  "_constrainedBy": "https://bluebrain.github.io/nexus/schemas/resource",
  "_project": "https://nexus.example.com/v1/projects/myorg/myproj",
  "_rev": 4,
  "_deprecated": true,
  "_createdAt": "2018-09-17T14:54:42.939Z",
  "_createdBy": "https://nexus.example.com/v1/realms/myrealm/users/john",
  "_updatedAt": "2018-09-17T15:02:42.939Z",
  "_updatedBy": "https://nexus.example.com/v1/realms/myrealm/users/john"
}
Full source at GitHub

Fetch resource using resolvers (specific version)

Fetches a resource using the provided resolver.

If the resolver segment ({resolver_id}) is _ the resource is fetched from the first resolver in the requested project ({org_label}/{project_label}). The resolvers are ordered by its priority field.

GET /v1/resolvers/{org_label}/{project_label}/{resolver_id}/{resource_id}?rev={rev}

… where

-{resource_id}: Iri - is the @id value of the resource to be retrieved. -{rev}: Number - the revision number of the resolver to be retrieved.

Example

Request
curl "https://nexus.example.com/v1/resolvers/myorg/myproj/nxv:myresolver/base:fd8a2b32-170e-44e8-808f-44a8cbbc49b0?rev=4"
Full source at GitHub
Response
{
  "@context": [
    {
      "@vocab": "http://example.com/",
      "ex": "http://example.com/"
    },
    "https://bluebrain.github.io/nexus/contexts/resource.json"
  ],
  "@id": "https://nexus.example.com/v1/resources/myorg/myproj/fd8a2b32-170e-44e8-808f-44a8cbbc49b0",
  "@type": "Custom",
  "bool": false,
  "name": "Alex",
  "number": 24,
  "_incoming": "https://nexus.example.com/v1/resources/myorg/myproj/myschema/base:fd8a2b32-170e-44e8-808f-44a8cbbc49b0/incoming",
  "_outgoing": "https://nexus.example.com/v1/resources/myorg/myproj/myschema/base:fd8a2b32-170e-44e8-808f-44a8cbbc49b0/outgoing",
  "_self": "https://nexus.example.com/v1/resources/myorg/myproj/myschema/base:fd8a2b32-170e-44e8-808f-44a8cbbc49b0",
  "_constrainedBy": "https://bluebrain.github.io/nexus/schemas/resource",
  "_project": "https://nexus.example.com/v1/projects/myorg/myproj",
  "_rev": 4,
  "_deprecated": true,
  "_createdAt": "2018-09-17T14:54:42.939Z",
  "_createdBy": "https://nexus.example.com/v1/realms/myrealm/users/john",
  "_updatedAt": "2018-09-17T15:02:42.939Z",
  "_updatedBy": "https://nexus.example.com/v1/realms/myrealm/users/john"
}
Full source at GitHub

Fetch resource using resolvers (specific tag)

Fetches a resource using the provided resolver.

If the resolver segment ({resolver_id}) is _ the resource is fetched from the first resolver in the requested project ({org_label}/{project_label}). The resolvers are ordered by its priority field.

GET /v1/resolvers/{org_label}/{project_label}/{resolver_id}/{resource_id}?tag={tag}

… where

-{resource_id}: Iri - is the @id value of the resource to be retrieved. -{tag}: String - the tag of the resource to be retrieved.

Example

Request
curl "https://nexus.example.com/v1/resolvers/myorg/myproj/nxv:myresolver/base:fd8a2b32-170e-44e8-808f-44a8cbbc49b0?tag=myTag"
Full source at GitHub
Response
{
  "@context": [
    {
      "@vocab": "http://example.com/",
      "ex": "http://example.com/"
    },
    "https://bluebrain.github.io/nexus/contexts/resource.json"
  ],
  "@id": "https://nexus.example.com/v1/resources/myorg/myproj/fd8a2b32-170e-44e8-808f-44a8cbbc49b0",
  "@type": "Custom",
  "bool": false,
  "name": "Alex",
  "number": 24,
  "_incoming": "https://nexus.example.com/v1/resources/myorg/myproj/myschema/base:fd8a2b32-170e-44e8-808f-44a8cbbc49b0/incoming",
  "_outgoing": "https://nexus.example.com/v1/resources/myorg/myproj/myschema/base:fd8a2b32-170e-44e8-808f-44a8cbbc49b0/outgoing",
  "_self": "https://nexus.example.com/v1/resources/myorg/myproj/myschema/base:fd8a2b32-170e-44e8-808f-44a8cbbc49b0",
  "_constrainedBy": "https://bluebrain.github.io/nexus/schemas/resource",
  "_project": "https://nexus.example.com/v1/projects/myorg/myproj",
  "_rev": 4,
  "_deprecated": true,
  "_createdAt": "2018-09-17T14:54:42.939Z",
  "_createdBy": "https://nexus.example.com/v1/realms/myrealm/users/john",
  "_updatedAt": "2018-09-17T15:02:42.939Z",
  "_updatedBy": "https://nexus.example.com/v1/realms/myrealm/users/john"
}
Full source at GitHub