Context

Endpoints for managing contexts

Save a JSON-LD context file

post

This endpoint saves a JSON-LD context file.

Authorizations
Body
context_file_idstringOptional

The filename of the JSON-LD context file to save.

Example: test.json
Responses
200
Context saved successfully
application/json
post
POST /api/v1/context HTTP/1.1
Host: 
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 448

{
  "context_file_id": "test.json",
  "file": {
    "@context": {
      "GenericCredential": {
        "@id": "https://example.com/indicio#GenericCredential",
        "@context": {
          "name": "http://schema.org/name",
          "familyName": "http://schema.org/familyName",
          "givenName": "http://schema.org/givenName",
          "identifier": "https://example.com/indicio#identifier",
          "date": {
            "@id": "http://schema.org/date",
            "@type": "http://www.w3.org/2001/XMLSchema#date"
          },
          "description": "http://schema.org/description"
        }
      }
    }
  }
}
{
  "message": "Context file was posted"
}

Get all JSON-LD context files

get

This endpoint retrieves all JSON-LD context files.

Authorizations
Responses
200
A list of JSON-LD context files
application/json
get
GET /context/ HTTP/1.1
Host: 
x-api-key: YOUR_API_KEY
Accept: */*
[]

Get a JSON-LD context file by ID

get

This endpoint retrieves a JSON-LD context file by its ID.

Authorizations
Path parameters
idstringRequired

The ID of the JSON-LD context file to retrieve.

Responses
200
JSON-LD context file retrieved successfully
application/json
Responseobject
get
GET /context/{id} HTTP/1.1
Host: 
x-api-key: YOUR_API_KEY
Accept: */*
{}

Was this helpful?