NAV Navigation
Shell HTTP JavaScript Node.js Ruby Python Java Go PHP

Content Fabric API v1.0.0

Eluvio Content Fabric API

Configuration URLs:

Authentication

Access to content fabric objects and resources is governed by an Ethereum-compatible blockchain. Each API resource (for example a library, content type or content object) is governed by a blockchain 'smart-contract'. All content fabric API operations require authentication using the "Bearer" token scheme. This scheme encompasses both "authentication" (identifying the caller) and "authorization" (specification of the operations that the caller has access to). The "Bearer" token is obtained by executing specific 'smart-contract' blockchain transactions for the API resources being accessed.

Private fabric nodes or development environments can also be configured for alternative authentication schemes. Currently this includes "Basic" authentication and, for development environments, no authentication.

The "Bearer" token can be specified as follows:

  1. as an HTTP header Authorization: Bearer TOKEN
  2. as a query parameter ?authorization=TOKEN

Bearer token general format: PAYLOAD.SIGNATURE

Where PAYLOAD is a base64 encoding of the JSON object:

  {
    "qspace_id":  "SPACE-ID",
    "qlib_id": "LIBRARY-ID",
    "addr": "BLOCKCHAIN-ADDRESS",
    "tx_id" : "BLOCKCHAIN-TRANSACTION-ID"
  }

SIGNATURE is a base64 encoding of the Ethereum signature, calculated as specified by the Ethereum protocol: https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign

Creating, modifying and accessing content fabric objects require either "access" or "update" transaction IDs. These operations can only be executed by full blockchain user accounts, which must be funded in order to execute transactions. Once the transaction is executed by the blockchain, its ID will be specified in the token field "tx_id".

Consumer operations don't require funded blockchain accounts, and they are restricted to "viewer" operations, which are only available on content objects that have been specifically published for consumer access. The token is generated by executing a state channel transaction - the state channel allows for low latency response to the user (not requiring waiting for the execution of a blockchain transaction) and mass scalability by posting aggregated transactions to the blockchain in large batches.

Content Space

The Content Space represents an instance of a content fabric network. It is associated with a blockchain smart contract that governs permissions and authorization within the space.

Get Space Config

Code samples

# You can also use wget
curl -X GET https://main.net955305.contentfabric.io/config \
  -H 'Accept: application/json'

GET https://main.net955305.contentfabric.io/config HTTP/1.1
Host: main.net955305.contentfabric.io
Accept: application/json

var headers = {
  'Accept':'application/json'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/config',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json'

};

fetch('https://main.net955305.contentfabric.io/config',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://main.net955305.contentfabric.io/config',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://main.net955305.contentfabric.io/config', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/config");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://main.net955305.contentfabric.io/config", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://main.net955305.contentfabric.io/config', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /config

Retrieve the configuration of the content space determined from the Host header of the request. The space name is the first label of the DNS name found in the Host header value. For example, when making a request with the URL https://main.net955305.contentfabric.io/config, the configuration for the space main will be returned.

The response contains seed URLs for the content fabric API and the distributed ledger API that can be used by the client to communicate with that space. The returned seed URLs are selected based on the geo location of the requesting client.

Seed URLs are also filtered by the access protocol that was used for this request. If the call was made with https://.../config, for example, only https URLs will be returned. Likewise a call to http://.../config will return only http URLs.

Parameters

Name In Type Required Description
qspace query string false The space name for which the configuration is requested. Overrides the space name determined from the Host
proto query string false The protocol name to use in filtering seed API URLs. Overrides the protocol of the request itself. Specifying
elvgeo query string false The geo location name to use for the seed URL lookup. Overrides the default geo location determined from the
self query boolean false If specified, the content fabric node handling the request returns itself as the only seed node instead of the
client_ip query string false An optional client IP address to generate the configuration for.

Detailed descriptions

qspace: The space name for which the configuration is requested. Overrides the space name determined from the Host header.

proto: The protocol name to use in filtering seed API URLs. Overrides the protocol of the request itself. Specifying no value or an empty value disables filtering (i.e. ?proto or ?proto=)

elvgeo: The geo location name to use for the seed URL lookup. Overrides the default geo location determined from the calling client's IP address.

self: If specified, the content fabric node handling the request returns itself as the only seed node instead of the regular seed nodes.

Enumerated Values

Parameter Value
elvgeo na-west-north
elvgeo na-west-south
elvgeo na-east-north
elvgeo na-east-south
elvgeo eu-west-north
elvgeo eu-west-south
elvgeo eu-east-north
elvgeo eu-east-south
elvgeo as-east
elvgeo au-east

Example responses

200 Response

{
  "node_id": "inod3jzKHgsuaBu3cqKu7t4N2fLLdkC4",
  "network": {
    "id": "inetGhR8rniCY8Uzgj8xNHyUBS",
    "seed_nodes": {
      "fabric_api": [
        "https://host-64-146-28-142.test.contentfabric.io",
        "https://host-64-145-252-6.test.contentfabric.io",
        "https://host-64-133-145-232.test.contentfabric.io"
      ],
      "ethereum_api": [
        "https://host-64-146-28-142.test.contentfabric.io/eth/",
        "https://host-64-145-252-6.test.contentfabric.io/eth/",
        "https://host-64-133-145-232.test.contentfabric.io/eth/"
      ]
    },
    "authority": {
      "type": "",
      "ethereum": null
    }
  },
  "qspace": {
    "id": "ispc2zqa4gZ8N3DH1QWakR2e5UowDLF1",
    "names": [
      "main"
    ],
    "type": "Ethereum",
    "ethereum": {
      "network_id": 955210,
      "url": "http://127.0.0.2:8545",
      "public_key": "knodwQV5xpcEenkCmhL8TRUREYwyWKpiJgGMxU2iodxtcbiP",
      "rpc_seed_nodes": [
        "64.137.243.135:8545",
        "64.136.19.5:8545"
      ]
    }
  }
}

Responses

Status Meaning Description Schema
200 OK Content space configuration. QSpaceConfigRes
404 Not Found Error message returned if the requested entity does not exist. ErrorRes
default Default A generic error message. ErrorRes

Get Space Metadata

Code samples

# You can also use wget
curl -X GET https://main.net955305.contentfabric.io/qspace/meta \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://main.net955305.contentfabric.io/qspace/meta HTTP/1.1
Host: main.net955305.contentfabric.io
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qspace/meta',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qspace/meta',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://main.net955305.contentfabric.io/qspace/meta',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://main.net955305.contentfabric.io/qspace/meta', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qspace/meta");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://main.net955305.contentfabric.io/qspace/meta", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://main.net955305.contentfabric.io/qspace/meta', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /qspace/meta

Retrieve the metadata of the content space specified in the authentication token.

Example responses

200 Response

{}

Responses

Status Meaning Description Schema
200 OK Content space metadata. SpaceMeta
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Replace Space Metadata

Code samples

# You can also use wget
curl -X PUT https://main.net955305.contentfabric.io/qspace/meta \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PUT https://main.net955305.contentfabric.io/qspace/meta HTTP/1.1
Host: main.net955305.contentfabric.io
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qspace/meta',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "name": "ACME Content Space",
  "description": "A private content space for ACME, Inc."
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qspace/meta',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.put 'https://main.net955305.contentfabric.io/qspace/meta',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://main.net955305.contentfabric.io/qspace/meta', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qspace/meta");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://main.net955305.contentfabric.io/qspace/meta", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','https://main.net955305.contentfabric.io/qspace/meta', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

PUT /qspace/meta

Replace the existing metadata metadata of the content space specified in the authentication token.

Body parameter

{
  "name": "ACME Content Space",
  "description": "A private content space for ACME, Inc."
}

Parameters

Name In Type Required Description
body body QSpaceMeta false Arbitrary metadata that will replace the existing metadata.

Example responses

401 Response

{
  "errors": [
    {
      "op": "authentication",
      "kind": "invalid",
      "cause": "authorization header missing",
      "stacktrace": "..."
    }
  ]
}

Responses

Status Meaning Description Schema
204 No Content The metadata was successfully repaced. None
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Get Space Metadata Subtree

Code samples

# You can also use wget
curl -X GET https://main.net955305.contentfabric.io/qspace/meta/{path} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://main.net955305.contentfabric.io/qspace/meta/{path} HTTP/1.1
Host: main.net955305.contentfabric.io
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qspace/meta/{path}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qspace/meta/{path}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://main.net955305.contentfabric.io/qspace/meta/{path}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://main.net955305.contentfabric.io/qspace/meta/{path}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qspace/meta/{path}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://main.net955305.contentfabric.io/qspace/meta/{path}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://main.net955305.contentfabric.io/qspace/meta/{path}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /qspace/meta/{path}

Retrieve the content space metadata subtree at the given path.

Parameters

Name In Type Required Description
path path string true An arbitrary path to a subset of the metadata. Can be empty.

Example responses

200 Response

{}

Responses

Status Meaning Description Schema
200 OK The subtree of the content space metadata at the given path. SpaceMeta
401 Unauthorized Authentication information is missing or invalid ErrorRes
404 Not Found Error message returned if the requested entity does not exist. ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Replace Space Metadata Subtree

Code samples

# You can also use wget
curl -X PUT https://main.net955305.contentfabric.io/qspace/meta/{path} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PUT https://main.net955305.contentfabric.io/qspace/meta/{path} HTTP/1.1
Host: main.net955305.contentfabric.io
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qspace/meta/{path}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "name": "ACME Content Space",
  "description": "A private content space for ACME, Inc."
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qspace/meta/{path}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.put 'https://main.net955305.contentfabric.io/qspace/meta/{path}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://main.net955305.contentfabric.io/qspace/meta/{path}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qspace/meta/{path}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://main.net955305.contentfabric.io/qspace/meta/{path}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','https://main.net955305.contentfabric.io/qspace/meta/{path}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

PUT /qspace/meta/{path}

Replace the existing content space metadata at the given path.

Body parameter

{
  "name": "ACME Content Space",
  "description": "A private content space for ACME, Inc."
}

Parameters

Name In Type Required Description
path path string true An arbitrary path to a subset of the metadata. Can be empty.
body body QSpaceMeta false Arbitrary metadata that will replace existing metadata.

Example responses

401 Response

{
  "errors": [
    {
      "op": "authentication",
      "kind": "invalid",
      "cause": "authorization header missing",
      "stacktrace": "..."
    }
  ]
}

Responses

Status Meaning Description Schema
204 No Content The metadata was successfully replaced. None
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Content Libraries

Content Libraries

List Libraries

Code samples

# You can also use wget
curl -X GET https://main.net955305.contentfabric.io/qlibs \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://main.net955305.contentfabric.io/qlibs HTTP/1.1
Host: main.net955305.contentfabric.io
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://main.net955305.contentfabric.io/qlibs',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://main.net955305.contentfabric.io/qlibs', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://main.net955305.contentfabric.io/qlibs", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://main.net955305.contentfabric.io/qlibs', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /qlibs

List all content libraries.

Example responses

200 Response

[
  "ilibPACFbXkPSawEKi7KnfwCfb",
  "ilibPAFjkXc4C3xajfjkZt6Kgm"
]

Responses

Status Meaning Description Schema
200 OK The list of content libraries. QLibList
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Create Library

Code samples

# You can also use wget
curl -X POST https://main.net955305.contentfabric.io/qlibs \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://main.net955305.contentfabric.io/qlibs HTTP/1.1
Host: main.net955305.contentfabric.io
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "meta": {
    "name": "ACME Advertisement Library",
    "description": "ACME Advertisement Library is a collection of all advertisement material produced for ACME, Inc."
  },
  "private_meta": {
    "instructions": "Publishing content to the library is governed by internal corporate policy ACME-IP-3897."
  }
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://main.net955305.contentfabric.io/qlibs',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://main.net955305.contentfabric.io/qlibs', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://main.net955305.contentfabric.io/qlibs", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://main.net955305.contentfabric.io/qlibs', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /qlibs

Create a new content library. The library ID will be generated automatically.
The content library accepts public and private metadata.

The ID of the library's content object matches the ID of the library, but has a different ID prefix (i.e. ilibALz6VjbpBdkRbte5CPPhJi vs. iq__ALz6VjbpBdkRbte5CPPhJi).

The library content object is a regular content object that can store arbitrary data in addition to metadata, for example a library logo or other graphical content needed to render the library in a user interface.

Use the Create Content Version API call to modify it.

Body parameter

{
  "meta": {
    "name": "ACME Advertisement Library",
    "description": "ACME Advertisement Library is a collection of all advertisement material produced for ACME, Inc."
  },
  "private_meta": {
    "instructions": "Publishing content to the library is governed by internal corporate policy ACME-IP-3897."
  }
}

Parameters

Name In Type Required Description
body body QLibCreateReq false All fields of the content library creation request are optional.

Detailed descriptions

body: All fields of the content library creation request are optional.

Example responses

201 Response

{
  "id": "ilibALz6VjbpBdkRbte5CPPhJi",
  "qid": "iq__ALz6VjbpBdkRbte5CPPhJi"
}

Responses

Status Meaning Description Schema
201 Created the content library was created successfully QLibCreateRes
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Create Library with ID

Code samples

# You can also use wget
curl -X PUT https://main.net955305.contentfabric.io/qlibs/{qlibid} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PUT https://main.net955305.contentfabric.io/qlibs/{qlibid} HTTP/1.1
Host: main.net955305.contentfabric.io
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "meta": {
    "name": "ACME Advertisement Library",
    "description": "ACME Advertisement Library is a collection of all advertisement material produced for ACME, Inc."
  },
  "private_meta": {
    "instructions": "Publishing content to the library is governed by internal corporate policy ACME-IP-3897."
  }
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.put 'https://main.net955305.contentfabric.io/qlibs/{qlibid}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://main.net955305.contentfabric.io/qlibs/{qlibid}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://main.net955305.contentfabric.io/qlibs/{qlibid}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','https://main.net955305.contentfabric.io/qlibs/{qlibid}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

PUT /qlibs/{qlibid}

Create a new content library with the specified library ID.
The content library accepts public and private metadata.

The ID of the library's content object matches the ID of the library, but has a different ID prefix (i.e. ilibALz6VjbpBdkRbte5CPPhJi vs. iq__ALz6VjbpBdkRbte5CPPhJi).

The library content object is a regular content object that can store arbitrary data in addition to metadata, for example a library logo or other graphical content needed to render the library in a user interface.

Use the Create Content Version API call to modify it.

Body parameter

{
  "meta": {
    "name": "ACME Advertisement Library",
    "description": "ACME Advertisement Library is a collection of all advertisement material produced for ACME, Inc."
  },
  "private_meta": {
    "instructions": "Publishing content to the library is governed by internal corporate policy ACME-IP-3897."
  }
}

Parameters

Name In Type Required Description
body body QLibCreateReq false All fields of the content library creation request are optional.
qlibid path string true The ID of the content library.

Detailed descriptions

body: All fields of the content library creation request are optional.

Example responses

201 Response

{
  "id": "ilibALz6VjbpBdkRbte5CPPhJi",
  "qid": "iq__ALz6VjbpBdkRbte5CPPhJi"
}

Responses

Status Meaning Description Schema
201 Created the content library was created successfully QLibCreateRes
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Describe Library

Code samples

# You can also use wget
curl -X GET https://main.net955305.contentfabric.io/qlibs/{qlibid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://main.net955305.contentfabric.io/qlibs/{qlibid} HTTP/1.1
Host: main.net955305.contentfabric.io
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://main.net955305.contentfabric.io/qlibs/{qlibid}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://main.net955305.contentfabric.io/qlibs/{qlibid}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://main.net955305.contentfabric.io/qlibs/{qlibid}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://main.net955305.contentfabric.io/qlibs/{qlibid}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /qlibs/{qlibid}

Retrieve information about a given content library.

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.

Example responses

200 Response

{
  "id": "ilibALz6VjbpBdkRbte5CPPhJi",
  "qid": "iq__ALz6VjbpBdkRbte5CPPhJi",
  "meta": {
    "name": "ACME Advertisement Library",
    "description": "ACME Advertisement Library is a collection of all advertisement material produced for ACME, Inc."
  }
}

Responses

Status Meaning Description Schema
200 OK Content library information QLibInfo
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Delete Library

Code samples

# You can also use wget
curl -X DELETE https://main.net955305.contentfabric.io/qlibs/{qlibid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

DELETE https://main.net955305.contentfabric.io/qlibs/{qlibid} HTTP/1.1
Host: main.net955305.contentfabric.io
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://main.net955305.contentfabric.io/qlibs/{qlibid}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://main.net955305.contentfabric.io/qlibs/{qlibid}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://main.net955305.contentfabric.io/qlibs/{qlibid}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://main.net955305.contentfabric.io/qlibs/{qlibid}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

DELETE /qlibs/{qlibid}

Delete the given content library.

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.

Example responses

401 Response

{
  "errors": [
    {
      "op": "authentication",
      "kind": "invalid",
      "cause": "authorization header missing",
      "stacktrace": "..."
    }
  ]
}

Responses

Status Meaning Description Schema
204 No Content The library was successfully deleted. None
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Get Public Metadata

Code samples

# You can also use wget
curl -X GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/meta \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/meta HTTP/1.1
Host: main.net955305.contentfabric.io
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/meta',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/meta',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/meta',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://main.net955305.contentfabric.io/qlibs/{qlibid}/meta', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/meta");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/meta", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://main.net955305.contentfabric.io/qlibs/{qlibid}/meta', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /qlibs/{qlibid}/meta

Retrieve public metadata of the content library.

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.

Example responses

200 Response

{}

Responses

Status Meaning Description Schema
200 OK Public metadata. LibMeta
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Replace Public Metadata

Code samples

# You can also use wget
curl -X PUT https://main.net955305.contentfabric.io/qlibs/{qlibid}/meta \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PUT https://main.net955305.contentfabric.io/qlibs/{qlibid}/meta HTTP/1.1
Host: main.net955305.contentfabric.io
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/meta',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "name": "ACME Advertisement Library",
  "description": "A collection of all advertisement material produced for ACME, Inc."
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/meta',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.put 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/meta',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://main.net955305.contentfabric.io/qlibs/{qlibid}/meta', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/meta");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/meta", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','https://main.net955305.contentfabric.io/qlibs/{qlibid}/meta', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

PUT /qlibs/{qlibid}/meta

Replace existing public metadata of the given content library.

Body parameter

{
  "name": "ACME Advertisement Library",
  "description": "A collection of all advertisement material produced for ACME, Inc."
}

Parameters

Name In Type Required Description
body body QLibMeta false Arbitrary public metadata that will replace the existing metadata.
qlibid path string true The ID of the content library.

Example responses

401 Response

{
  "errors": [
    {
      "op": "authentication",
      "kind": "invalid",
      "cause": "authorization header missing",
      "stacktrace": "..."
    }
  ]
}

Responses

Status Meaning Description Schema
204 No Content The metadata was successfully repaced. None
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Get Public Metadata Subtree

Code samples

# You can also use wget
curl -X GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/meta/{path} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/meta/{path} HTTP/1.1
Host: main.net955305.contentfabric.io
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/meta/{path}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/meta/{path}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/meta/{path}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://main.net955305.contentfabric.io/qlibs/{qlibid}/meta/{path}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/meta/{path}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/meta/{path}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://main.net955305.contentfabric.io/qlibs/{qlibid}/meta/{path}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /qlibs/{qlibid}/meta/{path}

Retrieve public metadata subtree at the given path.

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
path path string true An arbitrary path to a subset of the metadata. Can be empty.

Example responses

200 Response

{}

Responses

Status Meaning Description Schema
200 OK The subtree of the metadata at the given path. LibMeta
401 Unauthorized Authentication information is missing or invalid ErrorRes
404 Not Found Error message returned if the requested entity does not exist. ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Replace Public Metadata Subtree

Code samples

# You can also use wget
curl -X PUT https://main.net955305.contentfabric.io/qlibs/{qlibid}/meta/{path} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PUT https://main.net955305.contentfabric.io/qlibs/{qlibid}/meta/{path} HTTP/1.1
Host: main.net955305.contentfabric.io
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/meta/{path}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "name": "ACME Advertisement Library",
  "description": "A collection of all advertisement material produced for ACME, Inc."
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/meta/{path}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.put 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/meta/{path}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://main.net955305.contentfabric.io/qlibs/{qlibid}/meta/{path}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/meta/{path}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/meta/{path}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','https://main.net955305.contentfabric.io/qlibs/{qlibid}/meta/{path}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

PUT /qlibs/{qlibid}/meta/{path}

Replace the existing public metadata at the given path.

Body parameter

{
  "name": "ACME Advertisement Library",
  "description": "A collection of all advertisement material produced for ACME, Inc."
}

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
path path string true An arbitrary path to a subset of the metadata. Can be empty.
body body QLibMeta false Arbitrary metadata that will replace existing metadata.

Example responses

401 Response

{
  "errors": [
    {
      "op": "authentication",
      "kind": "invalid",
      "cause": "authorization header missing",
      "stacktrace": "..."
    }
  ]
}

Responses

Status Meaning Description Schema
204 No Content The metadata was successfully replaced. None
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Content Objects

A Content Object is the main entity in the content fabric. It combines binary data, user-provided metadata, and custom behavior in the form of executable bitcode.

List Content Objects

Code samples

# You can also use wget
curl -X GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/q \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/q HTTP/1.1
Host: main.net955305.contentfabric.io
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /qlibs/{qlibid}/q

List all finalized contents within the given content library.

The follwoing query parameters allow customizing the listing.

Sorting

Sorting Examples

?sort_by=/public/name
  &sort_case_sensitive=true
  &sort_descending=true

?sort_by=/public/type
  &sort_by=/public/name

Generic Filtering

Generic Filtering Examples

Examples:
?filter=/public/name::season%201

?filter=/public/name:co:season%201
  &filter=/type:eq:episode

Comparators:

Notes:

Additional Filtering

Additional Filtering Examples

?filter_by_user=true
  &latest_version_only=false

Selection

Selection Examples

?select=/public

?select=/public/name
  &select=/public/description
  &select=/public/thumbnail

Query param select: path of metadata subtree to return. If the query parameter is specified multiple times, the results of each expression are merged.

Removal

Removal Examples

?remove=/public/description

?select=/public
  &remove=/public/description
  &remove=/public/thumbnail

Query param remove: path of metadata subtree to remove from the result. May be specified multiple times.

Paging

Paging Examples

?start=20
  &limit=10

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
sort_by query array[string] false Metadata path to the value to sort on. Multiple instances allowed. Sorting is performed in lexical order
sort_case_sensitive query boolean false Enable case-sensitive sorting
sort_descending query boolean false False for ascending sort order, true for descending sort order
filter query array[string] false A metadata path separated with a comparator from the value to match. Multiple instances allowed.
filter_by_user query boolean false Suppress contents that are not accessible for the user making the request.
latest_version_only query boolean false Retrieve only the latest content version per content ID.
select query array[string] false Metadata path to the subtree to retrieve. May be specified multiple times.
remove query array[string] false Metadata path of the subtree to remove from the result. May be specified multiple times.
start query integer false Index of the first content object to retrieve. Leave empty to retrieve the first content.
limit query integer false Integer specifying the number of contents to return.

Detailed descriptions

sort_by: Metadata path to the value to sort on. Multiple instances allowed. Sorting is performed in lexical order on the first (most recent) version of each content.

filter: A metadata path separated with a comparator from the value to match. Multiple instances allowed.

Examples:

Operators:

Notes:

filter_by_user: Suppress contents that are not accessible for the user making the request.

latest_version_only: Retrieve only the latest content version per content ID.

select: Metadata path to the subtree to retrieve. May be specified multiple times.

remove: Metadata path of the subtree to remove from the result. May be specified multiple times.

start: Index of the first content object to retrieve. Leave empty to retrieve the first content.

limit: Integer specifying the number of contents to return.

Example responses

200 Response

{
  "contents": [
    {
      "id": "iq__6D1qLem852ggNcEYcAyvgT",
      "versions": [
        {
          "id": "iq__6D1qLem852ggNcEYcAyvgT",
          "hash": "hq__QmZPdxKM4wyvHG4En3LoAtZ9cQE9KL2MVNsEN17etCN2cA",
          "type": "hq__QmRDQwpgAMkc3TDsnvwmv2VSgg3zqNNFcMWKSdxxMX4QxU",
          "meta": {
            "genre": "Animation",
            "title": "Finding Dory",
            "year": 2016
          }
        }
      ]
    },
    {
      "id": "iq__L9LkebHK3QQ7q3rWxmWs55",
      "versions": [
        {
          "id": "iq__L9LkebHK3QQ7q3rWxmWs55",
          "hash": "hq__QmRDQwpgAMkc3TDsnvwmv2VSgg3zqNNFcMWKSdxxMX4QxU",
          "type": "",
          "meta": {
            "bitcode": "video.bc"
          }
        }
      ]
    }
  ],
  "paging": {
    "first": "0",
    "last": "10",
    "next": "5",
    "previous": "0",
    "items": 12,
    "current": 0,
    "pages": 3,
    "limit": 5
  }
}

Responses

Status Meaning Description Schema
200 OK The list of contents. QList
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Create Draft Content

Code samples

# You can also use wget
curl -X POST https://main.net955305.contentfabric.io/qlibs/{qlibid}/q \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://main.net955305.contentfabric.io/qlibs/{qlibid}/q HTTP/1.1
Host: main.net955305.contentfabric.io
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "type": "hq__QmRDQwpgAMkc3TDsnvwmv2VSgg3zqNNFcMWKSdxxMX4QxU",
  "meta": {
    "genre": "sci-fi",
    "year": "2018"
  },
  "copy_from": "hq__QmPLzvrE9cmWJv6wcXczTwRsYok8znbnKMjYjd8gAUtJgD"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /qlibs/{qlibid}/q

Create a new content object

Body parameter

{
  "type": "hq__QmRDQwpgAMkc3TDsnvwmv2VSgg3zqNNFcMWKSdxxMX4QxU",
  "meta": {
    "genre": "sci-fi",
    "year": "2018"
  },
  "copy_from": "hq__QmPLzvrE9cmWJv6wcXczTwRsYok8znbnKMjYjd8gAUtJgD"
}

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
body body QCreateReq false All fields of the content creation request are optional.

Detailed descriptions

body: All fields of the content creation request are optional.

Example responses

201 Response

{
  "id": "iq__EigNHQ5cFjBFjTtrG39Yco",
  "type": "hq__QmRDQwpgAMkc3TDsnvwmv2VSgg3zqNNFcMWKSdxxMX4QxU",
  "write_token": "tqw_GAQdkSsjXirpDpWsADWQTxbZMsVxwcPK9"
}

Responses

Status Meaning Description Schema
201 Created the content object was created successfully QCreateRes
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Create Draft Content with ID

Code samples

# You can also use wget
curl -X PUT https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qid} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PUT https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qid} HTTP/1.1
Host: main.net955305.contentfabric.io
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qid}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "type": "hq__QmRDQwpgAMkc3TDsnvwmv2VSgg3zqNNFcMWKSdxxMX4QxU",
  "meta": {
    "genre": "sci-fi",
    "year": "2018"
  },
  "copy_from": "hq__QmPLzvrE9cmWJv6wcXczTwRsYok8znbnKMjYjd8gAUtJgD"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qid}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.put 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qid}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qid}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qid}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qid}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

PUT /qlibs/{qlibid}/q/{qid}

Create a new content object, using the provided Content ID.

Body parameter

{
  "type": "hq__QmRDQwpgAMkc3TDsnvwmv2VSgg3zqNNFcMWKSdxxMX4QxU",
  "meta": {
    "genre": "sci-fi",
    "year": "2018"
  },
  "copy_from": "hq__QmPLzvrE9cmWJv6wcXczTwRsYok8znbnKMjYjd8gAUtJgD"
}

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qid path string true The ID of the content object.
body body QCreateReq false All fields of the content creation request are optional.

Detailed descriptions

body: All fields of the content creation request are optional.

Example responses

201 Response

{
  "id": "iq__EigNHQ5cFjBFjTtrG39Yco",
  "type": "hq__QmRDQwpgAMkc3TDsnvwmv2VSgg3zqNNFcMWKSdxxMX4QxU",
  "write_token": "tqw_GAQdkSsjXirpDpWsADWQTxbZMsVxwcPK9"
}

Responses

Status Meaning Description Schema
201 Created the content object was created successfully QCreateRes
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Upload Part

Code samples

# You can also use wget
curl -X POST https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/data \
  -H 'Content-Type: application/octet-stream' \
  -H 'Accept: application/json' \
  -H 'X-Content-Fabric-Encryption-Scheme: none' \
  -H 'Authorization: Bearer {access-token}'

POST https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/data HTTP/1.1
Host: main.net955305.contentfabric.io
Content-Type: application/octet-stream
Accept: application/json
X-Content-Fabric-Encryption-Scheme: none

var headers = {
  'Content-Type':'application/octet-stream',
  'Accept':'application/json',
  'X-Content-Fabric-Encryption-Scheme':'none',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/data',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = 'null';
const headers = {
  'Content-Type':'application/octet-stream',
  'Accept':'application/json',
  'X-Content-Fabric-Encryption-Scheme':'none',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/data',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/octet-stream',
  'Accept' => 'application/json',
  'X-Content-Fabric-Encryption-Scheme' => 'none',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/data',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/octet-stream',
  'Accept': 'application/json',
  'X-Content-Fabric-Encryption-Scheme': 'none',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/data', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/data");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/octet-stream"},
        "Accept": []string{"application/json"},
        "X-Content-Fabric-Encryption-Scheme": []string{"none"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/data", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/octet-stream',
    'Accept' => 'application/json',
    'X-Content-Fabric-Encryption-Scheme' => 'none',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/data', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /qlibs/{qlibid}/q/{qwtoken}/data

Upload binary data into a new content part and finalize the part in a single call. All binary data is stored in the same part, and the part is finalized automatically. If you require more control over part creation (i.e. upload data with multiple requests, resume failed uploads, etc.), use the content part API endpoints.

Body parameter

null

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qwtoken path string true The write token of the draft content object.
X-Content-Fabric-Encryption-Scheme header string false Describes the data scheme of the resource.
body body any(binary) true The request body contains the binary data of the content part.

Detailed descriptions

body: The request body contains the binary data of the content part.

Example responses

201 Response

{
  "content": {
    "id": "iq__6D1qLem852ggNcEYcAyvgT",
    "write_token": "tqw_EGheZaihN4Z1DX3VE6EVGLHiSWZSM6j4n",
    "type": "hq__QmRDQwpgAMkc3TDsnvwmv2VSgg3zqNNFcMWKSdxxMX4QxU"
  },
  "part": {
    "hash": "hqp_QmYw62E6J1wUQbJrqVbbttR1Bun5KQmUJAfPks6Ctx37Bx -- if finalized",
    "write_token": "tqp_8qqHM6Jbx6JWDbpRjmvMVg6BpmnirFfBhS9s -- if draft",
    "size": 8587043
  }
}

Responses

Status Meaning Description Schema
201 Created The content object was created successfully. QPartInfo
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Finalize Draft Content

Code samples

# You can also use wget
curl -X POST https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken} HTTP/1.1
Host: main.net955305.contentfabric.io
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /qlibs/{qlibid}/q/{qwtoken}

Finalize the draft content object identified by the provided content write token. After successful finalization, the content object is addressable by its hash, but it also becomes immutable.
Subsequent modifications are nevertheless possible by creating new content versions

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qwtoken path string true The write token of the draft content object.

Example responses

201 Response

{
  "id": "iq__6D1qLem852ggNcEYcAyvgT",
  "write_token": "tqw_EGheZaihN4Z1DX3VE6EVGLHiSWZSM6j4n",
  "type": "hq__QmRDQwpgAMkc3TDsnvwmv2VSgg3zqNNFcMWKSdxxMX4QxU",
  "size_stats": {
    "parts": 5,
    "size": "575 B",
    "size_bytes": 575
  }
}

Responses

Status Meaning Description Schema
201 Created The content object was successfully finalized. QInfo
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Commit & Publish Content

Code samples

# You can also use wget
curl -X PUT https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhash} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PUT https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhash} HTTP/1.1
Host: main.net955305.contentfabric.io
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhash}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhash}',
{
  method: 'PUT',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.put 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhash}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhash}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhash}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhash}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhash}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

PUT /qlibs/{qlibid}/q/{qhash}

Commit & publish the content object identified by the provided content hash to the content fabric network.

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qhash path string true The hash of the content object.

Example responses

401 Response

{
  "errors": [
    {
      "op": "authentication",
      "kind": "invalid",
      "cause": "authorization header missing",
      "stacktrace": "..."
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The content object was published successfully. None
202 Accepted The publishing process of the content object was successfully initiated, but requires more time to finish. None
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Describe Content Object

Code samples

# You can also use wget
curl -X GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit} HTTP/1.1
Host: main.net955305.contentfabric.io
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /qlibs/{qlibid}/q/{qhit}

Retrieve information about the given content object.

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qhit path string true A content hash, ID or write token.
details query boolean false Retrieve additional details (currently content type hash, qlib ID, and size stats)

Detailed descriptions

qhit: A content hash, ID or write token.

details: Retrieve additional details (currently content type hash, qlib ID, and size stats)

Example responses

200 Response

{
  "id": "iq__6D1qLem852ggNcEYcAyvgT",
  "write_token": "tqw_EGheZaihN4Z1DX3VE6EVGLHiSWZSM6j4n",
  "type": "hq__QmRDQwpgAMkc3TDsnvwmv2VSgg3zqNNFcMWKSdxxMX4QxU",
  "size_stats": {
    "parts": 5,
    "size": "575 B",
    "size_bytes": 575
  }
}

Responses

Status Meaning Description Schema
200 OK Content information. QInfo
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Delete Content Object

Code samples

# You can also use wget
curl -X DELETE https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

DELETE https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit} HTTP/1.1
Host: main.net955305.contentfabric.io
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

DELETE /qlibs/{qlibid}/q/{qhit}

Delete the given content object.

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qhit path string true A content hash, ID or write token.

Detailed descriptions

qhit: A content hash, ID or write token.

Example responses

401 Response

{
  "errors": [
    {
      "op": "authentication",
      "kind": "invalid",
      "cause": "authorization header missing",
      "stacktrace": "..."
    }
  ]
}

Responses

Status Meaning Description Schema
204 No Content The object was successfully deleted. None
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Audit Content Object

Code samples

# You can also use wget
curl -X GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhi}/audit?salt=string \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhi}/audit?salt=string HTTP/1.1
Host: main.net955305.contentfabric.io
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhi}/audit',
  method: 'get',
  data: '?salt=string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhi}/audit?salt=string',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhi}/audit',
  params: {
  'salt' => 'string'
}, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhi}/audit', params={
  'salt': 'string'
}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhi}/audit?salt=string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhi}/audit", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhi}/audit', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /qlibs/{qlibid}/q/{qhi}/audit

Calculate audit information for the given content object.
The audit information comprises a calculated hash that is intended to be compared to a similarly requested hash from other nodes. Successful comparison among hashes from several nodes verifies the integrity of the content object throughout the content fabric.

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qhi path string true A content hash or ID.
salt query string true A base64-encoded byte sequence for salting the audit hash.
samples query string false A comma-delimited list of percentages used for sampling the content part list. Only up to 3 values are allowed.

Detailed descriptions

qhi: A content hash or ID.

Example responses

200 Response

{
  "id": "iq__GRpjaXYVqvPdHqnpLYBb5N",
  "hash": "hq__tUTXn4yZ1RtrscF5AVjdFS2u9WAtbqris46QWHUERugopgcWHCoa74v8fDc9ZtU7Udzt",
  "salt": "aGVsbG93b3JsZA==",
  "samples": [
    0.2,
    0.4,
    0.8
  ],
  "audit_hash": "KJhme-dRxpkHAH7U-ZlCqkYdhQbOG3gc_eEvWbJgK2A="
}

Responses

Status Meaning Description Schema
200 OK Content audit information. QAudit
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Download Part

Code samples

# You can also use wget
curl -X GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/data/{qphash} \
  -H 'Accept: application/octet-stream' \
  -H 'Range: bytes=1000-1999' \
  -H 'X-Content-Fabric-Decryption-Mode: none' \
  -H 'Authorization: Bearer {access-token}'

GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/data/{qphash} HTTP/1.1
Host: main.net955305.contentfabric.io
Accept: application/octet-stream
Range: bytes=1000-1999
X-Content-Fabric-Decryption-Mode: none

var headers = {
  'Accept':'application/octet-stream',
  'Range':'bytes=1000-1999',
  'X-Content-Fabric-Decryption-Mode':'none',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/data/{qphash}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/octet-stream',
  'Range':'bytes=1000-1999',
  'X-Content-Fabric-Decryption-Mode':'none',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/data/{qphash}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/octet-stream',
  'Range' => 'bytes=1000-1999',
  'X-Content-Fabric-Decryption-Mode' => 'none',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/data/{qphash}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/octet-stream',
  'Range': 'bytes=1000-1999',
  'X-Content-Fabric-Decryption-Mode': 'none',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/data/{qphash}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/data/{qphash}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/octet-stream"},
        "Range": []string{"bytes=1000-1999"},
        "X-Content-Fabric-Decryption-Mode": []string{"none"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/data/{qphash}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/octet-stream',
    'Range' => 'bytes=1000-1999',
    'X-Content-Fabric-Decryption-Mode' => 'none',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/data/{qphash}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /qlibs/{qlibid}/q/{qhit}/data/{qphash}

Download the given part as a byte stream. Optionally, only a given byte range can be downloaded.

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qhit path string true A content hash, ID or write token.
qphash path string true The hash of the content part.
bytes query string false Defines a byte range to download instead of the entire entity. Follows the specification of an HTTP Byte Range header as defined in RFC 7233 section 2.1. Supports a suffix byte range. Does not support multiple byte ranges.
Range header string false A standard HTTP Byte Range header as defined in RFC 7233 section 2.1. Supports a suffix byte range. Does not support multiple byte ranges.
X-Content-Fabric-Decryption-Mode header string false A header specifying the decryption mode
header-x_decryption_mode query string false A value that will be treated as if specified in an X-Content-Fabric-Decryption-Mode request header.

Detailed descriptions

qhit: A content hash, ID or write token.

header-x_decryption_mode: A value that will be treated as if specified in an X-Content-Fabric-Decryption-Mode request header. Useful in cases where request headers cannot be specified, for example in HTML links.

Enumerated Values

Parameter Value
X-Content-Fabric-Decryption-Mode none
X-Content-Fabric-Decryption-Mode decrypt
X-Content-Fabric-Decryption-Mode reencrypt
header-x_decryption_mode none
header-x_decryption_mode decrypt
header-x_decryption_mode reencrypt

Example responses

200 Response

401 Response

{
  "errors": [
    {
      "op": "authentication",
      "kind": "invalid",
      "cause": "authorization header missing",
      "stacktrace": "..."
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The binary data of the part as a single byte stream. Inline
206 Partial Content The binary data of the part for the specified byte range as a single byte stream. Inline
401 Unauthorized Authentication information is missing or invalid ErrorRes
416 Range Not Satisfiable The range in the request's Range header field does not overlap the current extent of the selected part Inline
default Default A generic error message. ErrorRes

Response Schema

Response Headers

Status Header Type Format Description
206 Content-Range string range of the selected bytes returned as described in RFC 7233 section 4.
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"
416 Content-Range string available bytes (*/total) as described in RFC 7233 section 4.

Get Part Proofs

Code samples

# You can also use wget
curl -X GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/data/{qphash}/proofs \
  -H 'Accept: application/json' \
  -H 'Range: bytes=1000-1999' \
  -H 'Authorization: Bearer {access-token}'

GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/data/{qphash}/proofs HTTP/1.1
Host: main.net955305.contentfabric.io
Accept: application/json
Range: bytes=1000-1999

var headers = {
  'Accept':'application/json',
  'Range':'bytes=1000-1999',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/data/{qphash}/proofs',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Range':'bytes=1000-1999',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/data/{qphash}/proofs',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Range' => 'bytes=1000-1999',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/data/{qphash}/proofs',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Range': 'bytes=1000-1999',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/data/{qphash}/proofs', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/data/{qphash}/proofs");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Range": []string{"bytes=1000-1999"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/data/{qphash}/proofs", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Range' => 'bytes=1000-1999',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/data/{qphash}/proofs', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /qlibs/{qlibid}/q/{qhit}/data/{qphash}/proofs

Retrieve the proofs associated with the given part. Optionally, the proofs corresponding to only a given byte range can be retrieved.

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qhit path string true A content hash, ID or write token.
qphash path string true The hash of the content part.
bytes query string false Defines a byte range to download instead of the entire entity. Follows the specification of an HTTP Byte Range header as defined in RFC 7233 section 2.1. Supports a suffix byte range. Does not support multiple byte ranges.
Range header string false A standard HTTP Byte Range header as defined in RFC 7233 section 2.1. Supports a suffix byte range. Does not support multiple byte ranges.

Detailed descriptions

qhit: A content hash, ID or write token.

Example responses

200 Response

{
  "root_hash": "c7ca499116e787efed246946d3461c70982c045c2b4df2b53cef32d5e122f11f",
  "proofs": [
    {
      "byte_beg": 0,
      "byte_end": 10,
      "proof": [
        "c7ca499116e787efed246946d3461c70982c045c2b4df2b53cef32d5e122f11f"
      ]
    }
  ],
  "proof_data": {
    "c7ca499116e787efed246946d3461c70982c045c2b4df2b53cef32d5e122f11f": "+FyhIDUHLBrlRjUOC/p6sR1J3G8SnnLM1X7H62cSJbvRl8jxuDgAAAAAAAAAAAAAAAAAAAAACgAAAAAAAAA1Bywa5UY1Dgv6erEdSdxvEp5yzNV+x+tnEiW70ZfI8Q=="
  }
}

Responses

Status Meaning Description Schema
200 OK The proof data of the part. QPartProofs
206 Partial Content The proof data of the part. QPartProofs
401 Unauthorized Authentication information is missing or invalid ErrorRes
416 Range Not Satisfiable The range in the request's Range header field does not overlap the current extent of the selected part Inline
default Default A generic error message. ErrorRes

Response Schema

Response Headers

Status Header Type Format Description
206 Content-Range string range of the proofs for the selected bytes returned as described in RFC 7233 section 4.
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"
416 Content-Range string available bytes (*/total) as described in RFC 7233 section 4.

Content Parts

The payload data of a content object is stored in one or several Content Parts.

List Parts

Code samples

# You can also use wget
curl -X GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/parts \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/parts HTTP/1.1
Host: main.net955305.contentfabric.io
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/parts',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/parts',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/parts',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/parts', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/parts");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/parts", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/parts', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /qlibs/{qlibid}/q/{qhit}/parts

Retrieve information on all content parts.

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qhit path string true A content hash, ID or write token.

Detailed descriptions

qhit: A content hash, ID or write token.

Example responses

200 Response

{
  "content": {
    "id": "iq__6D1qLem852ggNcEYcAyvgT",
    "hash": "hq__QmctSY6kRDT1GJ7S69W7Ta7PEsvyWCCZahTFDAxXmjQXXh",
    "type": "hq__QmRDQwpgAMkc3TDsnvwmv2VSgg3zqNNFcMWKSdxxMX4QxU"
  },
  "parts": [
    {
      "hash": "hqp_QmYw62E6J1wUQbJrqVbbttR1Bun5KQmUJAfPks6Ctx37Bx",
      "size": 8
    },
    {
      "hash": "hqp_QmSbmmRGN6rEVTh641Lb7mCzutXz3QrDnKGB4D31DkNTEy",
      "size": 6
    },
    {
      "hash": "hqp_QmVqc4HyLnbcZL6AdY22RuAUYJ3mCcHBnd2hz4mymKjPWf",
      "size": 6
    },
    {
      "hash": "hqp_QmepV9tKHRwvhusx5LfU6eZRXEnpX6XyjdkAUBNs1gBECE",
      "size": 6
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Basic information on the content and its parts. QPartList
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Create Draft Part

Code samples

# You can also use wget
curl -X POST https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/parts \
  -H 'Content-Type: application/octet-stream' \
  -H 'Accept: application/json' \
  -H 'X-Content-Fabric-Encryption-Scheme: none' \
  -H 'Authorization: Bearer {access-token}'

POST https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/parts HTTP/1.1
Host: main.net955305.contentfabric.io
Content-Type: application/octet-stream
Accept: application/json
X-Content-Fabric-Encryption-Scheme: none

var headers = {
  'Content-Type':'application/octet-stream',
  'Accept':'application/json',
  'X-Content-Fabric-Encryption-Scheme':'none',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/parts',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = 'null';
const headers = {
  'Content-Type':'application/octet-stream',
  'Accept':'application/json',
  'X-Content-Fabric-Encryption-Scheme':'none',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/parts',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/octet-stream',
  'Accept' => 'application/json',
  'X-Content-Fabric-Encryption-Scheme' => 'none',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/parts',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/octet-stream',
  'Accept': 'application/json',
  'X-Content-Fabric-Encryption-Scheme': 'none',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/parts', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/parts");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/octet-stream"},
        "Accept": []string{"application/json"},
        "X-Content-Fabric-Encryption-Scheme": []string{"none"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/parts", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/octet-stream',
    'Accept' => 'application/json',
    'X-Content-Fabric-Encryption-Scheme' => 'none',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/parts', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /qlibs/{qlibid}/q/{qwtoken}/parts

Create a new draft part. The returned part write token can be used to for further operations on the part.

Body parameter

null

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qwtoken path string true The write token of the draft content object.
X-Content-Fabric-Encryption-Scheme header string false encryption scheme
body body any(binary) false The request body may contain the first chunk of binary data for the new part. Optional - the body may be empty.

Enumerated Values

Parameter Value
X-Content-Fabric-Encryption-Scheme none
X-Content-Fabric-Encryption-Scheme cgck

Example responses

201 Response

{
  "content": {
    "id": "iq__6D1qLem852ggNcEYcAyvgT",
    "write_token": "tqw_EGheZaihN4Z1DX3VE6EVGLHiSWZSM6j4n",
    "type": "hq__QmRDQwpgAMkc3TDsnvwmv2VSgg3zqNNFcMWKSdxxMX4QxU"
  },
  "part": {
    "hash": "hqp_QmYw62E6J1wUQbJrqVbbttR1Bun5KQmUJAfPks6Ctx37Bx -- if finalized",
    "write_token": "tqp_8qqHM6Jbx6JWDbpRjmvMVg6BpmnirFfBhS9s -- if draft",
    "size": 8587043
  }
}

Responses

Status Meaning Description Schema
201 Created The part was successfully created. QPartInfo
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Append Data or Finalize

Code samples

# You can also use wget
curl -X POST https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/parts/{qpwtoken} \
  -H 'Content-Type: application/octet-stream' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/parts/{qpwtoken} HTTP/1.1
Host: main.net955305.contentfabric.io
Content-Type: application/octet-stream
Accept: application/json

var headers = {
  'Content-Type':'application/octet-stream',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/parts/{qpwtoken}',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = 'null';
const headers = {
  'Content-Type':'application/octet-stream',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/parts/{qpwtoken}',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/octet-stream',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/parts/{qpwtoken}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/octet-stream',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/parts/{qpwtoken}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/parts/{qpwtoken}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/octet-stream"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/parts/{qpwtoken}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/octet-stream',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/parts/{qpwtoken}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /qlibs/{qlibid}/q/{qwtoken}/parts/{qpwtoken}

Append data to the draft part with the given part write token. The part is finalized if no data is provided (empty request body).

Body parameter

null

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qwtoken path string true The write token of the draft content object.
qpwtoken path string true The write token of the draft content part.
body body any(binary) false The next chunk of binary data that gets appended to the part. The part is finalized if the body is empty.

Example responses

200 Response

{
  "content": {
    "id": "iq__6D1qLem852ggNcEYcAyvgT",
    "write_token": "tqw_EGheZaihN4Z1DX3VE6EVGLHiSWZSM6j4n",
    "type": "hq__QmRDQwpgAMkc3TDsnvwmv2VSgg3zqNNFcMWKSdxxMX4QxU"
  },
  "part": {
    "hash": "hqp_QmYw62E6J1wUQbJrqVbbttR1Bun5KQmUJAfPks6Ctx37Bx -- if finalized",
    "write_token": "tqp_8qqHM6Jbx6JWDbpRjmvMVg6BpmnirFfBhS9s -- if draft",
    "size": 8587043
  }
}

Responses

Status Meaning Description Schema
200 OK The data was successfully appended. QPartInfo
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Describe Part

Code samples

# You can also use wget
curl -X GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/parts/{qpht} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/parts/{qpht} HTTP/1.1
Host: main.net955305.contentfabric.io
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/parts/{qpht}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/parts/{qpht}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/parts/{qpht}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/parts/{qpht}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/parts/{qpht}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/parts/{qpht}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/parts/{qpht}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /qlibs/{qlibid}/q/{qhit}/parts/{qpht}

Retrieve information about the given part.

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qhit path string true A content hash, ID or write token.
qpht path string true The hash or write token of the content part.

Detailed descriptions

qhit: A content hash, ID or write token.

Example responses

200 Response

{
  "content": {
    "id": "iq__6D1qLem852ggNcEYcAyvgT",
    "write_token": "tqw_EGheZaihN4Z1DX3VE6EVGLHiSWZSM6j4n",
    "type": "hq__QmRDQwpgAMkc3TDsnvwmv2VSgg3zqNNFcMWKSdxxMX4QxU"
  },
  "part": {
    "hash": "hqp_QmYw62E6J1wUQbJrqVbbttR1Bun5KQmUJAfPks6Ctx37Bx -- if finalized",
    "write_token": "tqp_8qqHM6Jbx6JWDbpRjmvMVg6BpmnirFfBhS9s -- if draft",
    "size": 8587043
  }
}

Responses

Status Meaning Description Schema
200 OK Part information. QPartInfo
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Delete Part

Code samples

# You can also use wget
curl -X DELETE https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/parts/{qpht} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

DELETE https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/parts/{qpht} HTTP/1.1
Host: main.net955305.contentfabric.io
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/parts/{qpht}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/parts/{qpht}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/parts/{qpht}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/parts/{qpht}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/parts/{qpht}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/parts/{qpht}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/parts/{qpht}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

DELETE /qlibs/{qlibid}/q/{qwtoken}/parts/{qpht}

Delete the given part.

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qwtoken path string true The write token of the draft content object.
qpht path string true The hash or write token of the content part.

Example responses

401 Response

{
  "errors": [
    {
      "op": "authentication",
      "kind": "invalid",
      "cause": "authorization header missing",
      "stacktrace": "..."
    }
  ]
}

Responses

Status Meaning Description Schema
204 No Content The part was successfully deleted. None
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Content Metadata

User-defined metadata is an arbitrary JSON structure that can be stored within a content object. The metadata can be modified as long as the content object has not been finalized. Query functionality provides efficient retrieval of subsets of the metadata.

Example metadata with relative and absolute links:

{
  "name": { "/": "./meta/titles/en" },
  "titles": {
    "en": "Loop the Hoop",
    "de": "Greif den Reif",
    "fr": "Le cerceau dans le berceau"
  },
  "directors": [
    { "/": "/qfab/hq__QmbWqTrE/meta/library/directors/Andrew Hooper" },
    { "/": "/qfab/hq__QmbWqTrE/meta/library/directors/Jackie Looper" }
  ],
  "assets": {
    "poster": { "/": "./files/images/poster-1080x768.jpg" },
    "trailer": { "/": "/qfab/hq__6ABbaHWb/rep/playout/default/options.json" },
    "main": { "/": "/qfab/hq__2wBPuKYi/rep/playout/default/options.json" },
  },
  "files": { ... }
}

Metadata may contain links to other metadata items, files, parts or even bitcode-generated information of the same or different content objects.

Relative links refer to information within the same content object. They are denoted with a starting ./ prefix followed by the link type, called selector. The example on the right shows a metadata link in the name element that refers to the English version of the title.

Absolute links point to items in another content object. They always start with /qfab/, followed by the hash of the target content object and the link selector. In the example, the directors' information is actually stored in another content object.

Links to other parts of a content object's metadata. Metadata links may point to other links or metdata subtrees that contain links. However, circular dependencies are not permitted.

Example File Link

{ "/": "/qfab/hq__DzmzXsZuSxfN1yttYsJPLeYs14Ef8aHvNvW376MTVMt6NtNdiNY1NqaoW1SnPr7pVxEe1wr3Dy/files/images/poster.jpg" }

Links to a file in a file bundle.

Example Rep Link

{ "/": "./rep/playout/default/options.json" }

Links to the rep API endpoint for a content object.

Example Blob Link

{
  "/": "./blob",
  "data": "Y2xlYXIgZGF0YQ==",
  "encryption": "cgck"
}

A blob link is a relative link with the blob selector, a data property that contains base64-encoded bytes, and an optional "encryption" property:

Blob links are used to include small amounts of binary (and usually encrypted) data in metadata, and have it served in binary form (and optionally decrypted) by the fabric node just like content parts or files in a bundle. Use only in cases where the amount of data does not justify creating a separate part or a file bundle.

Example auto-update link:

{
  "/": "/qref/hq__ABC/files/images/poster.jpg",
  "auto_update": {
    "tag": "latest"
  }
}

Content objects are immutable once finalized and published. This offers many advantages like simplified content distribution management, deterministic routing, content integrity proofs, etc. However, it makes change management to inter-dependent content objects more complex: an update in a given content object (achieved by creating a new content version) requires an update (with a new version) to each content object higher up in the content hierarchy...

To simplify this task, the content fabric offers auto-update links. They provide a single, but extremely useful function: they allow to retrieve all (directly and indirectly) referenced content objects in a hierarchy that have newer versions and hence need updates. In addition, the result includes the "bottom-up" order in which updates have to be made, as well as information about all the links that form the dependency graph. See Get Object & Update Graph.

Auto-update links are regular absolute links that contain a link property auto_update - see example on the right. The value of the auto_update property is a JSON object that may be empty or contain a tag to denote the desired version of the target content. For now only the tag latest is available, and will be used automatically if not specified.

Get Metadata

Code samples

# You can also use wget
curl -X GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/meta \
  -H 'Accept: application/json' \
  -H 'Accept: image/*' \
  -H 'Authorization: Bearer {access-token}'

GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/meta HTTP/1.1
Host: main.net955305.contentfabric.io
Accept: application/json
Accept: image/*

var headers = {
  'Accept':'application/json',
  'Accept':'image/*',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/meta',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Accept':'image/*',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/meta',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Accept' => 'image/*',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/meta',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Accept': 'image/*',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/meta', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/meta");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Accept": []string{"image/*"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/meta", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Accept' => 'image/*',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/meta', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /qlibs/{qlibid}/q/{qhit}/meta

Retrieve the user-defined metadata associated with the given content object in JSON form.

See Get Metadata Subtree for more details on optional parameters, headers and returned data.

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qhit path string true A content hash, ID or write token.
query query array[string] false JSONPath-like query for metadata. May be specified multiple times.
resolve query boolean false If specified, all meta links in target metadata are resolved.
resolve_include_source query boolean false If specified, inlined metadata of resolved meta links is annotated with the source of the metadata:
resolve_ignore_errors query boolean false If specified, link resolution errors are ignored, and instead of the target metadata, the link itself is
select query array[string] false Metadata path to the subtree to retrieve. May be specified multiple times.
remove query array[string] false Metadata path of the subtree to remove from the result. May be specified multiple times.
link_depth query integer false If specified, absolute meta links in target metadata are resolved up to this depth.
header-accept query array[string] false A value that will be treated as if specified in an Accept request header.
Accept header string false An HTTP Accept header
header-x_image_height query integer false A value that will be treated as if specified in an X-Content-Fabric-Image-Height request header.

Detailed descriptions

qhit: A content hash, ID or write token.

query: JSONPath-like query for metadata. May be specified multiple times. See Get Metadata for details.

resolve: If specified, all meta links in target metadata are resolved.

resolve_include_source: If specified, inlined metadata of resolved meta links is annotated with the source of the metadata: ".":{"source":"HASH_OR_TOKEN"}

resolve_ignore_errors: If specified, link resolution errors are ignored, and instead of the target metadata, the link itself is returned and annotated with the error that occured during link resolution.

select: Metadata path to the subtree to retrieve. May be specified multiple times.

remove: Metadata path of the subtree to remove from the result. May be specified multiple times.

link_depth: If specified, absolute meta links in target metadata are resolved up to this depth.

header-accept: A value that will be treated as if specified in an Accept request header. Useful in cases where request headers cannot be specified, for example in HTML links: <img href="...?header-accept=image/*"/>

header-x_image_height: A value that will be treated as if specified in an X-Content-Fabric-Image-Height request header. Useful in cases where request headers cannot be specified, for example in HTML links.

Example responses

200 Response

{}

Responses

Status Meaning Description Schema
200 OK User-defined metadata. Meta
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Get Metadata Subtree

Code samples

# You can also use wget
curl -X GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/meta/{path} \
  -H 'Accept: application/json' \
  -H 'Accept: image/*' \
  -H 'Authorization: Bearer {access-token}'

GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/meta/{path} HTTP/1.1
Host: main.net955305.contentfabric.io
Accept: application/json
Accept: image/*

var headers = {
  'Accept':'application/json',
  'Accept':'image/*',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/meta/{path}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Accept':'image/*',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/meta/{path}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Accept' => 'image/*',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/meta/{path}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Accept': 'image/*',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/meta/{path}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/meta/{path}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Accept": []string{"image/*"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/meta/{path}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Accept' => 'image/*',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/meta/{path}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /qlibs/{qlibid}/q/{qhit}/meta/{path}

Retrieve the user-defined metadata at the given path.

If the requested path contains relative or absolute meta links, they are automatically followed. Absolute links require additional auth tokens in order to read the target content object.

The form of the returned metadata depends on the following factors:

If resolve is set to false, the resulting metadata subtree will always be returned in its JSON form, and all links within the subtree are returned as links in their JSON representation.

If resolve is set to true, then the result depends on the target metadata at the requested path:

If resolve is not specified, then the result depends on the state of the content object

See the metadata section for more information on links.

Accepted media types may be specified in a query parameter header-accept as an alternative to Accept request headers. This is useful in situations where request headers cannot be specified, for example in HTML links: <img href="...?header-accept=image/*"/>

See RFC 2616 for details on the Accept request header format.

The requested metadata path may extend beyond a files link if the taget file has JSON content (i.e. the file's mime-type is application/json). For example, imagine a file link at path /public/tags that points to the JSON file tags.json. A request to /meta/public/tags/objects/cars will result in reading and parsing the tags.json file, and returning the subtree /objects/cars of the file's JSON data.

The maximum file size is limited to 5 MB per default. Larger files will be served like non-JSON files and don't offer subtree retrieval.

Query & Filter Metadata

This endpoint also supports the query parameter for filtering the data at the requested path using JSONPath-like expressions. The syntax differs from official JSONPath in the following way:

Example JSON
{
    "store": {
        "books": [
            {
                "category": "reference",
                "author": "Nigel Rees",
                "title": "Sayings of the Century",
                "price": 8.95
            },
            {
                "category": "fiction",
                "author": "Evelyn Waugh",
                "title": "Sword of Honour",
                "price": 12.99
            },
            {
                "category": "fiction",
                "author": "Herman Melville",
                "title": "Moby Dick",
                "isbn": "0-553-21311-3",
                "price": 8.99
            },
            {
                "category": "fiction",
                "author": "J. R. R. Tolkien",
                "title": "The Lord of the Rings",
                "isbn": "0-395-19395-8",
                "price": 22.99
            }
        ]
    }
}

Example queries

Retrieve the first book.

query: /store/books[0]
{
  "author": "Nigel Rees",
  "category": "reference",
  "price": 8.95,
  "title": "Sayings of the Century"
}

Retrieve the price of the 4th book.

query: /store/books/3/price
22.99

Retrieve the price of the 4th book, array index in brackets.

query: /store/books[3]/price
22.99

Retrieve the price for books with start and end index.

query: /store/books[0:2]/price
[
  8.95,
  12.99
]

Retrieve the titles of all books in the "reference" category.

query: /store/books[?(@.category=="reference")]/title
[
  "Sayings of the Century"
]

Retrieve the titles of all books that cose more than 10.

query: /store/books[?(@.price > 10)]/title
[
  "Sword of Honour",
  "The Lord of the Rings"
]

Retrieve the titles of all books.

query: /store/books/*/title
[
  "Sayings of the Century",
  "Sword of Honour",
  "Moby Dick",
  "The Lord of the Rings"
]

Retrieve all title properties in any child element (recursive descent).

query: /store//title
[
  "Sayings of the Century",
  "Sword of Honour",
  "Moby Dick",
  "The Lord of the Rings"
]

Selecting disjoint Metadata Subsets

The select query parameter may be used in order to retrieve disjoint subsets of the metadata in a single API call. Simply specify the metadata paths of the desired subtrees with multiple select parameters:

/meta?select=/public/defaults/clip&select=/public/clips/fr`

retrieves the default and the french versions of the clip. select queries can be combined with a metadata base path:

/meta/public?select=/defaults/clip&select=/clips/fr

returns the same clips as above, but relative to the public base path. See examples below.

Example JSON

{
  "public": {
    "defaults": {
      "clip": {
        "/": "/clips/en"
      }
    },
    "clips": {
      "en": {
        "name": "A walk in the park"
      },
      "fr": {
        "name": "Une promenade dans le parc"
      },
      "de": {
        "name": "Ein Spaziergang im Park"
      }
    }
  }
}

Select default and french clips:

request: /meta?select=/public/defaults/clip&select=/public/clips/fr
{
  "public": {
    "defaults": {
      "clip": {
        "name": "A walk in the park"
      }
    },
    "clips": {
      "fr": {
        "name": "Une promenade dans le parc"
      }
    }
  }
}

Same request with base path:

request: /meta?select=/defaults/clip&select=/clips/fr
{
  "defaults": {
    "clip": {
      "name": "A walk in the park"
    }
  },
  "clips": {
    "fr": {
      "name": "Une promenade dans le parc"
    }
  }
}

Removing Metadata Subsets

The remove query parameter may be used to remove subsets of the metadata in order to make the API response more compact. Specify one or multiple remove parameters as follows:

/meta?remove=/public/defaults/clips&remove=/public/titles`

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qhit path string true A content hash, ID or write token.
path path string true An arbitrary path to a subset of the metadata. Can be empty.
query query array[string] false JSONPath-like query for metadata. May be specified multiple times.
resolve query boolean false If specified, all meta links in target metadata are resolved.
resolve_include_source query boolean false If specified, inlined metadata of resolved meta links is annotated with the source of the metadata:
resolve_ignore_errors query boolean false If specified, link resolution errors are ignored, and instead of the target metadata, the link itself is
link_depth query integer false If specified, absolute meta links in target metadata are resolved up to this depth.
select query array[string] false Metadata path to the subtree to retrieve. May be specified multiple times.
remove query array[string] false Metadata path of the subtree to remove from the result. May be specified multiple times.
header-accept query array[string] false A value that will be treated as if specified in an Accept request header.
Accept header string false An HTTP Accept header
header-x_image_height query integer false A value that will be treated as if specified in an X-Content-Fabric-Image-Height request header.

Detailed descriptions

qhit: A content hash, ID or write token.

query: JSONPath-like query for metadata. May be specified multiple times. See Get Metadata for details.

resolve: If specified, all meta links in target metadata are resolved.

resolve_include_source: If specified, inlined metadata of resolved meta links is annotated with the source of the metadata: ".":{"source":"HASH_OR_TOKEN"}

resolve_ignore_errors: If specified, link resolution errors are ignored, and instead of the target metadata, the link itself is returned and annotated with the error that occured during link resolution.

link_depth: If specified, absolute meta links in target metadata are resolved up to this depth.

select: Metadata path to the subtree to retrieve. May be specified multiple times.

remove: Metadata path of the subtree to remove from the result. May be specified multiple times.

header-accept: A value that will be treated as if specified in an Accept request header. Useful in cases where request headers cannot be specified, for example in HTML links: <img href="...?header-accept=image/*"/>

header-x_image_height: A value that will be treated as if specified in an X-Content-Fabric-Image-Height request header. Useful in cases where request headers cannot be specified, for example in HTML links.

Example responses

200 Response

{}

Responses

Status Meaning Description Schema
200 OK The subtree of the metadata at the given path or the binary file data. string
401 Unauthorized Authentication information is missing or invalid ErrorRes
404 Not Found Error message returned if the requested entity does not exist. ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Get Metadata (JSON query)

Code samples

# You can also use wget
curl -X POST https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/meta-ext \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Accept: image/*' \
  -H 'Authorization: Bearer {access-token}'

POST https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/meta-ext HTTP/1.1
Host: main.net955305.contentfabric.io
Content-Type: application/json
Accept: application/json
Accept: image/*

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Accept':'image/*',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/meta-ext',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "resolve": true,
  "resolve_ignore_errors": true,
  "resolve_include_source": true,
  "select": [
    "/select/path/1",
    "/select/path/2"
  ],
  "remove": [
    "/remove/path/1",
    "/remove/path/2"
  ],
  "link_depth": 2
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Accept':'image/*',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/meta-ext',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Accept' => 'image/*',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/meta-ext',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Accept': 'image/*',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/meta-ext', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/meta-ext");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Accept": []string{"image/*"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/meta-ext", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Accept' => 'application/json',
    'Accept' => 'image/*',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/meta-ext', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /qlibs/{qlibid}/q/{qhit}/meta-ext

Retrieve the user-defined metadata associated with the given content object in JSON form.

This endpoint is functionally identical to Get Metadata with the difference that most optional parameters are provided as JSON structure in the request body instead of query parameters.

Body parameter

{
  "resolve": true,
  "resolve_ignore_errors": true,
  "resolve_include_source": true,
  "select": [
    "/select/path/1",
    "/select/path/2"
  ],
  "remove": [
    "/remove/path/1",
    "/remove/path/2"
  ],
  "link_depth": 2
}

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qhit path string true A content hash, ID or write token.
header-x_image_height query integer false A value that will be treated as if specified in an X-Content-Fabric-Image-Height request header.
header-accept query array[string] false A value that will be treated as if specified in an Accept request header.
Accept header string false An HTTP Accept header
body body QMetaOptions false Optional query options.

Detailed descriptions

qhit: A content hash, ID or write token.

header-x_image_height: A value that will be treated as if specified in an X-Content-Fabric-Image-Height request header. Useful in cases where request headers cannot be specified, for example in HTML links.

header-accept: A value that will be treated as if specified in an Accept request header. Useful in cases where request headers cannot be specified, for example in HTML links: <img href="...?header-accept=image/*"/>

Example responses

200 Response

{}

Responses

Status Meaning Description Schema
200 OK User-defined metadata. Meta
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Get Metadata Subtree (JSON query)

Code samples

# You can also use wget
curl -X POST https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/meta-ext/{path} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Accept: image/*' \
  -H 'Authorization: Bearer {access-token}'

POST https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/meta-ext/{path} HTTP/1.1
Host: main.net955305.contentfabric.io
Content-Type: application/json
Accept: application/json
Accept: image/*

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Accept':'image/*',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/meta-ext/{path}',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "resolve": true,
  "resolve_ignore_errors": true,
  "resolve_include_source": true,
  "select": [
    "/select/path/1",
    "/select/path/2"
  ],
  "remove": [
    "/remove/path/1",
    "/remove/path/2"
  ],
  "link_depth": 2
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Accept':'image/*',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/meta-ext/{path}',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Accept' => 'image/*',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/meta-ext/{path}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Accept': 'image/*',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/meta-ext/{path}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/meta-ext/{path}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Accept": []string{"image/*"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/meta-ext/{path}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Accept' => 'application/json',
    'Accept' => 'image/*',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/meta-ext/{path}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /qlibs/{qlibid}/q/{qhit}/meta-ext/{path}

Retrieve the user-defined metadata at the given path.

This endpoint is functionally identical to Get Metadata Subtree with the difference that most optional parameters are provided as JSON structure in the request body instead of query parameters.

Body parameter

{
  "resolve": true,
  "resolve_ignore_errors": true,
  "resolve_include_source": true,
  "select": [
    "/select/path/1",
    "/select/path/2"
  ],
  "remove": [
    "/remove/path/1",
    "/remove/path/2"
  ],
  "link_depth": 2
}

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qhit path string true A content hash, ID or write token.
path path string true An arbitrary path to a subset of the metadata. Can be empty.
header-x_image_height query integer false A value that will be treated as if specified in an X-Content-Fabric-Image-Height request header.
header-accept query array[string] false A value that will be treated as if specified in an Accept request header.
Accept header string false An HTTP Accept header
body body QMetaOptions false Optional query options.

Detailed descriptions

qhit: A content hash, ID or write token.

header-x_image_height: A value that will be treated as if specified in an X-Content-Fabric-Image-Height request header. Useful in cases where request headers cannot be specified, for example in HTML links.

header-accept: A value that will be treated as if specified in an Accept request header. Useful in cases where request headers cannot be specified, for example in HTML links: <img href="...?header-accept=image/*"/>

Example responses

200 Response

{}

Responses

Status Meaning Description Schema
200 OK User-defined metadata. Meta
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Merge Metadata

Code samples

# You can also use wget
curl -X POST https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta HTTP/1.1
Host: main.net955305.contentfabric.io
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "Type": "movie",
  "Title": "Loop the Hoop",
  "Year": "1999",
  "Released": "17 Jun 1999",
  "Runtime": "99 min",
  "Rated": "PG",
  "Genres": [
    "Animation",
    "Comedy"
  ],
  "Directors": [
    {
      "name": "Andrew Hooper",
      "role": "director"
    },
    {
      "name": "Jackie Looper",
      "role": "co-director"
    }
  ],
  "Writers": [
    {
      "name": "Andrew Hooper",
      "roles": [
        "original story",
        "screenplay"
      ]
    },
    {
      "name": "Victoria Ringer",
      "roles": [
        "original story"
      ]
    }
  ],
  "Actors": [
    "Billy the Kid",
    "Jack and Jill",
    "Peter Pumpkin"
  ],
  "Languages": [
    "English",
    "Indonesian"
  ],
  "Country": "USA",
  "Poster": "MV5zg4MjM2NDQ4MV5nBnXkFtZTgwMzgy.jpg"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /qlibs/{qlibid}/q/{qwtoken}/meta

Merge the provided metadata with the existing metadata of the given content object. The merge is performed recursively according to the following rules:

Merge Example:
Merging the existing structure:

{
  "a": "va",
  "b": [ "one", "two" ],
  "c": "vc",
  "d": { "e": "ve" }
}

with this structure:

{
  "a": "new va",
  "b": [ "three", "four" ],
  "c": null,
  "d": "vd"
}

yields:

{
  "a": "new va",
  "b": [ "one", "two", "three", "four" ],
  "d": "vd"
}

Body parameter

{
  "Type": "movie",
  "Title": "Loop the Hoop",
  "Year": "1999",
  "Released": "17 Jun 1999",
  "Runtime": "99 min",
  "Rated": "PG",
  "Genres": [
    "Animation",
    "Comedy"
  ],
  "Directors": [
    {
      "name": "Andrew Hooper",
      "role": "director"
    },
    {
      "name": "Jackie Looper",
      "role": "co-director"
    }
  ],
  "Writers": [
    {
      "name": "Andrew Hooper",
      "roles": [
        "original story",
        "screenplay"
      ]
    },
    {
      "name": "Victoria Ringer",
      "roles": [
        "original story"
      ]
    }
  ],
  "Actors": [
    "Billy the Kid",
    "Jack and Jill",
    "Peter Pumpkin"
  ],
  "Languages": [
    "English",
    "Indonesian"
  ],
  "Country": "USA",
  "Poster": "MV5zg4MjM2NDQ4MV5nBnXkFtZTgwMzgy.jpg"
}

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qwtoken path string true The write token of the draft content object.
body body QMeta false Arbitrary metadata that will be merged.

Example responses

401 Response

{
  "errors": [
    {
      "op": "authentication",
      "kind": "invalid",
      "cause": "authorization header missing",
      "stacktrace": "..."
    }
  ]
}

Responses

Status Meaning Description Schema
204 No Content The metadata was successfully merged. None
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Replace Metadata

Code samples

# You can also use wget
curl -X PUT https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PUT https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta HTTP/1.1
Host: main.net955305.contentfabric.io
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "Type": "movie",
  "Title": "Loop the Hoop",
  "Year": "1999",
  "Released": "17 Jun 1999",
  "Runtime": "99 min",
  "Rated": "PG",
  "Genres": [
    "Animation",
    "Comedy"
  ],
  "Directors": [
    {
      "name": "Andrew Hooper",
      "role": "director"
    },
    {
      "name": "Jackie Looper",
      "role": "co-director"
    }
  ],
  "Writers": [
    {
      "name": "Andrew Hooper",
      "roles": [
        "original story",
        "screenplay"
      ]
    },
    {
      "name": "Victoria Ringer",
      "roles": [
        "original story"
      ]
    }
  ],
  "Actors": [
    "Billy the Kid",
    "Jack and Jill",
    "Peter Pumpkin"
  ],
  "Languages": [
    "English",
    "Indonesian"
  ],
  "Country": "USA",
  "Poster": "MV5zg4MjM2NDQ4MV5nBnXkFtZTgwMzgy.jpg"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.put 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

PUT /qlibs/{qlibid}/q/{qwtoken}/meta

Replace the existing metadata of the given content object.

Body parameter

{
  "Type": "movie",
  "Title": "Loop the Hoop",
  "Year": "1999",
  "Released": "17 Jun 1999",
  "Runtime": "99 min",
  "Rated": "PG",
  "Genres": [
    "Animation",
    "Comedy"
  ],
  "Directors": [
    {
      "name": "Andrew Hooper",
      "role": "director"
    },
    {
      "name": "Jackie Looper",
      "role": "co-director"
    }
  ],
  "Writers": [
    {
      "name": "Andrew Hooper",
      "roles": [
        "original story",
        "screenplay"
      ]
    },
    {
      "name": "Victoria Ringer",
      "roles": [
        "original story"
      ]
    }
  ],
  "Actors": [
    "Billy the Kid",
    "Jack and Jill",
    "Peter Pumpkin"
  ],
  "Languages": [
    "English",
    "Indonesian"
  ],
  "Country": "USA",
  "Poster": "MV5zg4MjM2NDQ4MV5nBnXkFtZTgwMzgy.jpg"
}

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qwtoken path string true The write token of the draft content object.
body body QMeta false Arbitrary metadata that will replace the existing metadata.

Example responses

401 Response

{
  "errors": [
    {
      "op": "authentication",
      "kind": "invalid",
      "cause": "authorization header missing",
      "stacktrace": "..."
    }
  ]
}

Responses

Status Meaning Description Schema
204 No Content The metadata was successfully repaced. None
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Delete Metadata

Code samples

# You can also use wget
curl -X DELETE https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

DELETE https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta HTTP/1.1
Host: main.net955305.contentfabric.io
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

DELETE /qlibs/{qlibid}/q/{qwtoken}/meta

Delete the existing metadata of the given content object.

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qwtoken path string true The write token of the draft content object.

Example responses

401 Response

{
  "errors": [
    {
      "op": "authentication",
      "kind": "invalid",
      "cause": "authorization header missing",
      "stacktrace": "..."
    }
  ]
}

Responses

Status Meaning Description Schema
204 No Content The metadata was successfully deleted. None
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Merge Metadata Subtree

Code samples

# You can also use wget
curl -X POST https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta/{path} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta/{path} HTTP/1.1
Host: main.net955305.contentfabric.io
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta/{path}',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "Type": "movie",
  "Title": "Loop the Hoop",
  "Year": "1999",
  "Released": "17 Jun 1999",
  "Runtime": "99 min",
  "Rated": "PG",
  "Genres": [
    "Animation",
    "Comedy"
  ],
  "Directors": [
    {
      "name": "Andrew Hooper",
      "role": "director"
    },
    {
      "name": "Jackie Looper",
      "role": "co-director"
    }
  ],
  "Writers": [
    {
      "name": "Andrew Hooper",
      "roles": [
        "original story",
        "screenplay"
      ]
    },
    {
      "name": "Victoria Ringer",
      "roles": [
        "original story"
      ]
    }
  ],
  "Actors": [
    "Billy the Kid",
    "Jack and Jill",
    "Peter Pumpkin"
  ],
  "Languages": [
    "English",
    "Indonesian"
  ],
  "Country": "USA",
  "Poster": "MV5zg4MjM2NDQ4MV5nBnXkFtZTgwMzgy.jpg"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta/{path}',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta/{path}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta/{path}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta/{path}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta/{path}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta/{path}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /qlibs/{qlibid}/q/{qwtoken}/meta/{path}

Merge the provided metadata with the existing metadata at the given path. See Merge Metadata for more information.

Body parameter

{
  "Type": "movie",
  "Title": "Loop the Hoop",
  "Year": "1999",
  "Released": "17 Jun 1999",
  "Runtime": "99 min",
  "Rated": "PG",
  "Genres": [
    "Animation",
    "Comedy"
  ],
  "Directors": [
    {
      "name": "Andrew Hooper",
      "role": "director"
    },
    {
      "name": "Jackie Looper",
      "role": "co-director"
    }
  ],
  "Writers": [
    {
      "name": "Andrew Hooper",
      "roles": [
        "original story",
        "screenplay"
      ]
    },
    {
      "name": "Victoria Ringer",
      "roles": [
        "original story"
      ]
    }
  ],
  "Actors": [
    "Billy the Kid",
    "Jack and Jill",
    "Peter Pumpkin"
  ],
  "Languages": [
    "English",
    "Indonesian"
  ],
  "Country": "USA",
  "Poster": "MV5zg4MjM2NDQ4MV5nBnXkFtZTgwMzgy.jpg"
}

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qwtoken path string true The write token of the draft content object.
path path string true An arbitrary path to a subset of the metadata. Can be empty.
body body QMeta false Arbitrary metadata that will be merged.

Example responses

401 Response

{
  "errors": [
    {
      "op": "authentication",
      "kind": "invalid",
      "cause": "authorization header missing",
      "stacktrace": "..."
    }
  ]
}

Responses

Status Meaning Description Schema
204 No Content The metadata was successfully merged. None
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Replace Metadata Subtree

Code samples

# You can also use wget
curl -X PUT https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta/{path} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PUT https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta/{path} HTTP/1.1
Host: main.net955305.contentfabric.io
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta/{path}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "Type": "movie",
  "Title": "Loop the Hoop",
  "Year": "1999",
  "Released": "17 Jun 1999",
  "Runtime": "99 min",
  "Rated": "PG",
  "Genres": [
    "Animation",
    "Comedy"
  ],
  "Directors": [
    {
      "name": "Andrew Hooper",
      "role": "director"
    },
    {
      "name": "Jackie Looper",
      "role": "co-director"
    }
  ],
  "Writers": [
    {
      "name": "Andrew Hooper",
      "roles": [
        "original story",
        "screenplay"
      ]
    },
    {
      "name": "Victoria Ringer",
      "roles": [
        "original story"
      ]
    }
  ],
  "Actors": [
    "Billy the Kid",
    "Jack and Jill",
    "Peter Pumpkin"
  ],
  "Languages": [
    "English",
    "Indonesian"
  ],
  "Country": "USA",
  "Poster": "MV5zg4MjM2NDQ4MV5nBnXkFtZTgwMzgy.jpg"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta/{path}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.put 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta/{path}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta/{path}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta/{path}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta/{path}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta/{path}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

PUT /qlibs/{qlibid}/q/{qwtoken}/meta/{path}

Replace the existing metadata at the given path.

Body parameter

{
  "Type": "movie",
  "Title": "Loop the Hoop",
  "Year": "1999",
  "Released": "17 Jun 1999",
  "Runtime": "99 min",
  "Rated": "PG",
  "Genres": [
    "Animation",
    "Comedy"
  ],
  "Directors": [
    {
      "name": "Andrew Hooper",
      "role": "director"
    },
    {
      "name": "Jackie Looper",
      "role": "co-director"
    }
  ],
  "Writers": [
    {
      "name": "Andrew Hooper",
      "roles": [
        "original story",
        "screenplay"
      ]
    },
    {
      "name": "Victoria Ringer",
      "roles": [
        "original story"
      ]
    }
  ],
  "Actors": [
    "Billy the Kid",
    "Jack and Jill",
    "Peter Pumpkin"
  ],
  "Languages": [
    "English",
    "Indonesian"
  ],
  "Country": "USA",
  "Poster": "MV5zg4MjM2NDQ4MV5nBnXkFtZTgwMzgy.jpg"
}

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qwtoken path string true The write token of the draft content object.
path path string true An arbitrary path to a subset of the metadata. Can be empty.
body body QMeta false Arbitrary metadata that will replace existing metadata.

Example responses

401 Response

{
  "errors": [
    {
      "op": "authentication",
      "kind": "invalid",
      "cause": "authorization header missing",
      "stacktrace": "..."
    }
  ]
}

Responses

Status Meaning Description Schema
204 No Content The metadata was successfully replaced. None
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Delete Metadata Subtree

Code samples

# You can also use wget
curl -X DELETE https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta/{path} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

DELETE https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta/{path} HTTP/1.1
Host: main.net955305.contentfabric.io
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta/{path}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta/{path}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta/{path}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta/{path}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta/{path}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta/{path}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta/{path}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

DELETE /qlibs/{qlibid}/q/{qwtoken}/meta/{path}

Delete the existing metadata at the given path.

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qwtoken path string true The write token of the draft content object.
path path string true An arbitrary path to a subset of the metadata. Can be empty.

Example responses

401 Response

{
  "errors": [
    {
      "op": "authentication",
      "kind": "invalid",
      "cause": "authorization header missing",
      "stacktrace": "..."
    }
  ]
}

Responses

Status Meaning Description Schema
204 No Content The metadata was successfully deleted. None
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Get Object & Update Graph

Code samples

# You can also use wget
curl -X GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/links \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/links HTTP/1.1
Host: main.net955305.contentfabric.io
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/links',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/links',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/links',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/links', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/links");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/links", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/links', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /qlibs/{qlibid}/q/{qhit}/links

Example result for content hq__2ZFoswZSC9767e6dx1QMNjCJkP:

{
  "root": {
    "qid": "iq__4iJmtP2arpjbJSWuPreE6b",
    "hash_or_token": "hq__2ZFoswZSC9767e6dx1QMNjCJkP"
  },
  "object_dag": {
    "hq__2ZFoswZSC9767e6dx1QMNjCJkP": [
      "hq__2vVWZR5TGnWr7vkC6kS4kMaWks",
      "hq__3exvHew8gHqpsSRTQdfojbZQmv"
    ],
    "hq__2vVWZR5TGnWr7vkC6kS4kMaWks": [
      "hq__3HjDH4dSFt9jXk3Gr6Dz4BQGjy"
    ],
    "hq__3HjDH4dSFt9jXk3Gr6Dz4BQGjy": [
      "hq__42CciD9Snv5BVuzm4R9ZCsUFY9"
    ],
    "hq__3exvHew8gHqpsSRTQdfojbZQmv": [
      "hq__42CciD9Snv5BVuzm4R9ZCsUFY9"
    ],
    "hq__42CciD9Snv5BVuzm4R9ZCsUFY9": []
  },
  "auto_updates": {
    "order": [
      "hq__2vVWZR5TGnWr7vkC6kS4kMaWks",
      "hq__2ZFoswZSC9767e6dx1QMNjCJkP"
    ],
    "links": {
      "hq__2vVWZR5TGnWr7vkC6kS4kMaWks" : [
        {
          "hash": "hq__2vVWZR5TGnWr7vkC6kS4kMaWks",
          "path": "/links/0",
          "current": {
            "/": "/qfab/hq__3HjDH4dSFt9jXk3Gr6Dz4BQGjy/meta/version",
            "auto_update": {
              "tag": "latest"
            }
          },
          "updated": {
            "/": "/qfab/hq__3UM4dDit6SiemZCvqaNPpqh7SF/meta/version",
            "auto_update": {
              "tag": "latest"
            }
          }
        }
      ]
    }
  },
  "details": {
    "hq__2ZFoswZSC9767e6dx1QMNjCJkP": {
      "qid": "iq__4iJmtP2arpjbJSWuPreE6b",
      "meta": {
        "version": "0.0"
      }
    },
    "hq__2vVWZR5TGnWr7vkC6kS4kMaWks": {
      "qid": "iq__3sduHuJWPV3qUDFoEASkiX",
      "meta": {
        "version": "1.0"
      }
    },
    "hq__3HjDH4dSFt9jXk3Gr6Dz4BQGjy": {
      "qid": "iq__5CzzbsoZKg1cEaktzfgqK5",
      "meta": {
        "version": "2.0"
      }
    },
    "hq__3UM4dDit6SiemZCvqaNPpqh7SF": {
      "qid": "iq__5CzzbsoZKg1cEaktzfgqK5",
      "meta": {
        "version": "2.1"
      }
    },
    "hq__3exvHew8gHqpsSRTQdfojbZQmv": {
      "qid": "iq__PV7oMAMpBk4Up9uu8mGHxU",
      "meta": {
        "version": "3.0"
      }
    },
    "hq__42CciD9Snv5BVuzm4R9ZCsUFY9": {
      "qid": "iq__7j9DnfTLLbJUUy6q4ibTL9",
      "meta": {
        "version": "4.0"
      }
    }
  }
}

Retrieve the directed, acyclic graph (DAG) of content objects defined by absolute (inter-object) links in metadata.

If the query parameter auto_update is not set or set to false, the full DAG made up of all absolute links is returned.

If the query parameter auto_update is set to true, the DAG will only include content objects that are referenced with auto-update links. In this case, the result will include an order array that lists the content objects with pending updates in the order needed to achieve a fully updated hierarchy and details on the links that need to be updated for each object.

The query parameter update_tag allows to further restrict the selection of links to those with a matching auto-update tag. If not specified, all auto-update links are taken into account.

The details section of the result lists all content objects from the DAG with their content ID and metadata. The select and remove query parameter, which can be combined and specified multiple times, allow to restrict the returned metadata to specific items.

Failures to resolve links (e.g. caused by missing permissions to read the target content object) do not stop the processing of the request per default. Instead, resolution errors are added to a list of errors and returned in the result. In order to stop processing and fail the request if links cannot be resolved, set the query parameter ignore_errors to false.

See the metadata section for more information on links.

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qhit path string true A content hash, ID or write token.
auto_update query boolean false If true, only auto-update links are analyzed. If false, all links taken into account, but
update_tag query string false If set, restricts auto-update links to those with a matching tag. Otherwise all auto-update links are selected.
ignore_errors query boolean false If true, ignore errors during request processing. If false, stop processing if an error occurs.
select query array[string] false Metadata path to the subtree to retrieve. May be specified multiple times.
remove query array[string] false Metadata path of the subtree to remove from the result. May be specified multiple times.

Detailed descriptions

qhit: A content hash, ID or write token.

auto_update: If true, only auto-update links are analyzed. If false, all links taken into account, but no update information is returned.

update_tag: If set, restricts auto-update links to those with a matching tag. Otherwise all auto-update links are selected.

ignore_errors: If true, ignore errors during request processing. If false, stop processing if an error occurs.

select: Metadata path to the subtree to retrieve. May be specified multiple times.

remove: Metadata path of the subtree to remove from the result. May be specified multiple times.

Example responses

200 Response

{
  "root": {
    "qid": "iq__AAA",
    "hash_or_token": "hq__AAA"
  },
  "object_dag": {
    "hq__AAA": [
      "hq__BBB",
      "hq__CCC"
    ],
    "hq__BBB": [
      "hq__DDD"
    ],
    "hq__CCC": [],
    "hq__DDD": []
  },
  "auto_updates": {
    "order": [
      "hq__BBB",
      "hq__AAA"
    ],
    "links": {
      "hq__BBB": [
        {
          "hash": "hq__BBB",
          "path": "/public/links/link1",
          "current": {
            "/": "/qfab/hq__CCC/meta/public/name",
            ".": {
              "auto_update": {
                "tag": "latest"
              }
            }
          },
          "updated": {
            "/": "/qfab/hq__EEE/meta/public/name",
            ".": {
              "auto_update": {
                "tag": "latest"
              }
            }
          }
        }
      ]
    }
  },
  "details": {
    "hq__AAA": {
      "qid": "iq__AAA",
      "meta": {
        "public": {
          "name": "The Evening Before",
          "version": "2.0"
        }
      }
    },
    "hq__BBB": {
      "qid": "iq__BBB",
      "meta": {
        "public": {
          "name": "The Ring of the Lords",
          "version": "1.0"
        }
      }
    }
  },
  "errors": [
    {
      "qid": "iq__AAA",
      "hash_or_token": "hq__AAA",
      "error": {
        "kind": "permission denied",
        "op": "read meta",
        "link": {}
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK User-defined metadata. ObjectGraph
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Meta Change Notifications

Code samples

# You can also use wget
curl -X GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/watch/meta/{path} \
  -H 'Accept: text/event-stream' \
  -H 'Authorization: Bearer {access-token}'

GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/watch/meta/{path} HTTP/1.1
Host: main.net955305.contentfabric.io
Accept: text/event-stream

var headers = {
  'Accept':'text/event-stream',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/watch/meta/{path}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'text/event-stream',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/watch/meta/{path}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'text/event-stream',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/watch/meta/{path}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'text/event-stream',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/watch/meta/{path}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/watch/meta/{path}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"text/event-stream"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/watch/meta/{path}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'text/event-stream',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/watch/meta/{path}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /qlibs/{qlibid}/q/{qhit}/watch/meta/{path}

Subscribe to and retrieve notifications for content metadata updates for the given content and metadata path. This endpoint delivers notifications through Server-Sent Events (SSE).

Update notifications are delivered as JSON objects sent in data-only messages:

{
  "qid": ":qid",
  "latest": ":hash",
  "target": "/meta/some/path",
  "meta": {},
  "error": {}
}

Per default, the metadata returned in the event's meta field is un-resolved, i.e. metadata links will not be resolved. However, the endpoint accepts most query parameters of Get Metadata Subtree and therefore link resolution can be enabled with resolve.

error is an optional field that is present only if metadata retrieval fails.

See the metadata section for more information on links.

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qhit path string true A content hash, ID or write token.
path path string true An arbitrary path to a subset of the metadata. Can be empty.
resolve query boolean false If specified, all meta links in target metadata are resolved.
resolve_include_source query boolean false If specified, inlined metadata of resolved meta links is annotated with the source of the metadata:
resolve_ignore_errors query boolean false If specified, link resolution errors are ignored, and instead of the target metadata, the link itself is
link_depth query integer false If specified, absolute meta links in target metadata are resolved up to this depth.
select query array[string] false Metadata path to the subtree to retrieve. May be specified multiple times.
remove query array[string] false Metadata path of the subtree to remove from the result. May be specified multiple times.

Detailed descriptions

qhit: A content hash, ID or write token.

resolve: If specified, all meta links in target metadata are resolved.

resolve_include_source: If specified, inlined metadata of resolved meta links is annotated with the source of the metadata: ".":{"source":"HASH_OR_TOKEN"}

resolve_ignore_errors: If specified, link resolution errors are ignored, and instead of the target metadata, the link itself is returned and annotated with the error that occured during link resolution.

link_depth: If specified, absolute meta links in target metadata are resolved up to this depth.

select: Metadata path to the subtree to retrieve. May be specified multiple times.

remove: Metadata path of the subtree to remove from the result. May be specified multiple times.

Example responses

200 Response

401 Response

{
  "errors": [
    {
      "op": "authentication",
      "kind": "invalid",
      "cause": "authorization header missing",
      "stacktrace": "..."
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The subscription has succeeded. No data is returned initially. SSE events thereafter upon metadata change. Inline
401 Unauthorized Authentication information is missing or invalid ErrorRes
404 Not Found Error message returned if the requested entity does not exist. ErrorRes
default Default A generic error message. ErrorRes

Response Schema

Status Code 200

*the SSE event stream as defined by the SSE spec *

Name Type Required Restrictions Description

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Content Crypt

The Content Crypt is a data store for secret information that may be stored in a content object (e.g. Playout DRM keys).

Get Secret

Code samples

# You can also use wget
curl -X GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/crypt/{cryptPath} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/crypt/{cryptPath} HTTP/1.1
Host: main.net955305.contentfabric.io
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/crypt/{cryptPath}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/crypt/{cryptPath}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/crypt/{cryptPath}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/crypt/{cryptPath}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/crypt/{cryptPath}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/crypt/{cryptPath}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/crypt/{cryptPath}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /qlibs/{qlibid}/q/{qhit}/crypt/{cryptPath}

Retrieve the secret information stored at the provided path in the content crypt (e.g. playout drm keys).

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qhit path string true A content hash, ID or write token.
cryptPath path string true A content crypt path.

Detailed descriptions

qhit: A content hash, ID or write token.

Example responses

200 Response

{}

Responses

Status Meaning Description Schema
200 OK The secret Meta
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Files

Organize data in content objects as file and directory structure.

Creation / Modification

  1. Create a Files Job and submit the list of files that will be uploaded in one or multiple batch requests. For each file, its path, exact size and optional metadata (e.g. mime type) are specified.

    The fabric automatically maps files to parts in order to optimize part storage: small files are aggregated into a single part, large files are split across multiple parts. For each part, an Upload Job is returned that contains the list of files or file segments that are to be uploaded in order.

    Adding files is only one of multiple operations that can be specified in a Files Job: files can also be deleted, moved, copied, or their metadata updated. As these additional operations apply to existing files in the content object, they only make sense when creating new versions of existing content objects or when modifying a previous Files Job.

  2. Upload file data according to the generated upload jobs. For improved performance, upload jobs may be performed in parallel.

    In case of upload failures, retrieve the status of the corresponding upload job to find out at which position the upload should be resumed.

  3. Once all data is uploaded, finalize the files. The fabric will by check that all necessary file data has been uploaded and will optimize the file metadata structures.

Reading File Metadata

Example file metadata:

{
  "files" : {
    ".": {
      "type": "directory"
    },
    "html": {
      ".": {
        "type": "directory"
      },
      "index.html": {
        ".": {
          "mime_type": "text/html",
          "parts": [ 0 ],
          "size": 3144
        }
      }
    },
    "images": {
      ".": {
        "type": "directory"
      },
      "logo.png": {
        ".": {
          "parts": [ 1 ],
          "size": 46943
        }
      }
    }
  }
}

The directory structure and file information is stored as regular metadata of the content object under the files key. Each item (directory or file) is stored as an object labelled with its name and using an embedded . key to store the item's metadata like type (file or directory), size, mime-type, etc.

Downloading Files

The files API provides a download endpoint for retrieving a file identified by its path. It supports the standard HTTP Range header to retrieve partial files.

The file hierarchy supports symbolic links to other files or directories similar to a Unix filesystem. Links are created in a Files Job (just like regular files), but obviously don't require a subsequent data upload, since they merely point to another file or directory.

File links may be relative, pointing to other files or directories within the same content object, or absolute by targeting an entry in another content object. See file links for details.

Create Files Job

Code samples

# You can also use wget
curl -X POST https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs HTTP/1.1
Host: main.net955305.contentfabric.io
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "seq": 0,
  "seq_complete": false,
  "ops": [
    {
      "type": "file",
      "path": "images/logo_small.png",
      "mime_type": "image/png",
      "size": 14525
    },
    {
      "type": "file",
      "path": "images/logo_large.png",
      "mime_type": "image/png",
      "size": 46943
    },
    {
      "type": "link",
      "path": "images/logo.png",
      "link": {
        "/": "./files/images/logo_large.png"
      }
    },
    {
      "op": "del",
      "path": "images/logo-medium.png"
    }
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /qlibs/{qlibid}/q/{qwtoken}/file_jobs

Create a new Files Job and optionally advertise file operations.

The request to create a files job can take two forms:

Body parameter

{
  "seq": 0,
  "seq_complete": false,
  "ops": [
    {
      "type": "file",
      "path": "images/logo_small.png",
      "mime_type": "image/png",
      "size": 14525
    },
    {
      "type": "file",
      "path": "images/logo_large.png",
      "mime_type": "image/png",
      "size": 46943
    },
    {
      "type": "link",
      "path": "images/logo.png",
      "link": {
        "/": "./files/images/logo_large.png"
      }
    },
    {
      "op": "del",
      "path": "images/logo-medium.png"
    }
  ]
}

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qwtoken path string true The write token of the draft content object.
body body FilesJobCreationReq false none

Example responses

201 Response

{
  "id": "iqfj16SKDCEjA3qkN3trengGMW",
  "jobs": [
    "iqfuREaBmkZxonEiiFAXtj9cxC",
    "iqfu6ktBZcJNvXmbQt8N2riZtg"
  ]
}

Responses

Status Meaning Description Schema
201 Created Id of the 'files job' and list of upload jobs in case of a single batch request. FilesJobUploadsRes
400 Bad Request the request contains both an non-zero ops and a seq field ErrorRes
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Add More Operations to Files Job

Code samples

# You can also use wget
curl -X POST https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid} HTTP/1.1
Host: main.net955305.contentfabric.io
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "seq": 0,
  "seq_complete": false,
  "ops": [
    {
      "type": "file",
      "path": "images/logo_small.png",
      "mime_type": "image/png",
      "size": 14525
    },
    {
      "type": "file",
      "path": "images/logo_large.png",
      "mime_type": "image/png",
      "size": 46943
    },
    {
      "type": "link",
      "path": "images/logo.png",
      "link": {
        "/": "./files/images/logo_large.png"
      }
    },
    {
      "op": "del",
      "path": "images/logo-medium.png"
    }
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}

The request specifies a list of additional file operations to perform. It must follow a prior request to create a Files Job. Set seq_complete to true to indicate the last request in the sequence. In that case, retrieve the list of upload jobs with "List Upload Jobs".

Body parameter

{
  "seq": 0,
  "seq_complete": false,
  "ops": [
    {
      "type": "file",
      "path": "images/logo_small.png",
      "mime_type": "image/png",
      "size": 14525
    },
    {
      "type": "file",
      "path": "images/logo_large.png",
      "mime_type": "image/png",
      "size": 46943
    },
    {
      "type": "link",
      "path": "images/logo.png",
      "link": {
        "/": "./files/images/logo_large.png"
      }
    },
    {
      "op": "del",
      "path": "images/logo-medium.png"
    }
  ]
}

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qwtoken path string true The write token of the draft content object.
filesjobid path string true Id of the files job.
body body FilesJobCreationReq false none

Example responses

400 Response

{
  "errors": [
    {
      "op": "authentication",
      "kind": "invalid",
      "cause": "authorization header missing",
      "stacktrace": "..."
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The request was accepted and will be processed None
201 Created Returned when the sequence is complete and the operations will be performed. None
400 Bad Request A generic error message. ErrorRes
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Status of a Files Job

Code samples

# You can also use wget
curl -X GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid} \
  -H 'Accept: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid} HTTP/1.1
Host: main.net955305.contentfabric.io
Accept: application/json
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}

Retrieve the progress of the construction status of a Files Job. The response contains the list of received 'seq' as well as the 'complete' status.

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qwtoken path string true The write token of the draft content object.
filesjobid path string true Id of the files job.
Accept header string true none

Enumerated Values

Parameter Value
Accept application/json

Example responses

200 Response

{
  "id": "iqfj16SKDCEjA3qkN3trengGMW",
  "seqs": [
    1,
    2,
    3
  ],
  "seq_complete": true
}

Responses

Status Meaning Description Schema
200 OK The status was successfully retrieved FilesJobCreationStatusRes
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

List Upload Jobs

Code samples

# You can also use wget
curl -X GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/uploads \
  -H 'Accept: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/uploads HTTP/1.1
Host: main.net955305.contentfabric.io
Accept: application/json
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/uploads',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/uploads',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/uploads',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/uploads', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/uploads");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/uploads", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/uploads', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/uploads

Retrieve the upload job IDs for a Files Job.

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qwtoken path string true The write token of the draft content object.
filesjobid path string true Id of the files job.
Accept header string true none

Enumerated Values

Parameter Value
Accept application/json

Example responses

200 Response

{
  "id": "iqfj16SKDCEjA3qkN3trengGMW",
  "jobs": [
    "iqfuREaBmkZxonEiiFAXtj9cxC",
    "iqfu6ktBZcJNvXmbQt8N2riZtg"
  ]
}

Responses

Status Meaning Description Schema
200 OK Upload jobs were successfully retrieved. FilesJobUploadsRes
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Status of an Upload Job

Code samples

# You can also use wget
curl -X GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/uploads/{jobid} \
  -H 'Accept: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/uploads/{jobid} HTTP/1.1
Host: main.net955305.contentfabric.io
Accept: application/json
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/uploads/{jobid}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/uploads/{jobid}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/uploads/{jobid}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/uploads/{jobid}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/uploads/{jobid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/uploads/{jobid}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/uploads/{jobid}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/uploads/{jobid}

Retrieve the status of an Upload Job in a Files Job. The response contains the list of files in the job and their upload status.

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qwtoken path string true The write token of the draft content object.
filesjobid path string true Id of the files job.
jobid path string true Id of an upload job
Accept header string true none
start query integer false Paging: the index of the first file to return.
limit query integer false Paging: the maximum number of files to retrieve

Detailed descriptions

start: Paging: the index of the first file to return.

limit: Paging: the maximum number of files to retrieve

Enumerated Values

Parameter Value
Accept application/json

Example responses

200 Response

{
  "id": "iqfuREaBmkZxonEiiFAXtj9cxC",
  "next": 1,
  "total": 2,
  "files": [
    {
      "path": "string",
      "size": 123,
      "off": 0,
      "len": 123,
      "rem": 0
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Status was successfully retrieved. FilesUploadJobRes
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Upload File Data

Code samples

# You can also use wget
curl -X POST https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/{jobid} \
  -H 'Content-Type: application/octet-stream' \
  -H 'Accept: application/json' \
  -H 'Content-type: application/octet-stream' \
  -H 'Authorization: Bearer {access-token}'

POST https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/{jobid} HTTP/1.1
Host: main.net955305.contentfabric.io
Content-Type: application/octet-stream
Accept: application/json
Content-type: application/octet-stream

var headers = {
  'Content-Type':'application/octet-stream',
  'Accept':'application/json',
  'Content-type':'application/octet-stream',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/{jobid}',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = 'null';
const headers = {
  'Content-Type':'application/octet-stream',
  'Accept':'application/json',
  'Content-type':'application/octet-stream',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/{jobid}',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/octet-stream',
  'Accept' => 'application/json',
  'Content-type' => 'application/octet-stream',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/{jobid}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/octet-stream',
  'Accept': 'application/json',
  'Content-type': 'application/octet-stream',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/{jobid}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/{jobid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/octet-stream"},
        "Accept": []string{"application/json"},
        "Content-type": []string{"application/octet-stream"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/{jobid}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/octet-stream',
    'Accept' => 'application/json',
    'Content-type' => 'application/octet-stream',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/{jobid}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/{jobid}

Upload binary data for a previously created upload job

If an error occurs during the upload or bytes are still expected a request to retrieve the current state of the job can be performed in order to resume the upload

Body parameter

null

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qwtoken path string true The write token of the draft content object.
filesjobid path string true Id of the files job.
jobid path string true Id of an upload job
Content-type header string true none
body body any(binary) false The binary data that gets appended to the part. The part is finalized when complete.

Enumerated Values

Parameter Value
Content-type application/octet-stream

Example responses

200 Response

{
  "content": {
    "id": "iq__6D1qLem852ggNcEYcAyvgT",
    "write_token": "tqw_EGheZaihN4Z1DX3VE6EVGLHiSWZSM6j4n",
    "type": "hq__QmRDQwpgAMkc3TDsnvwmv2VSgg3zqNNFcMWKSdxxMX4QxU"
  },
  "part": {
    "hash": "hqp_QmYw62E6J1wUQbJrqVbbttR1Bun5KQmUJAfPks6Ctx37Bx -- if finalized",
    "write_token": "tqp_8qqHM6Jbx6JWDbpRjmvMVg6BpmnirFfBhS9s -- if draft",
    "size": 8587043
  }
}

Responses

Status Meaning Description Schema
200 OK bytes upload successfully completed QPartInfo
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Resume the Files job

Code samples

# You can also use wget
curl -X PUT https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/resume \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PUT https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/resume HTTP/1.1
Host: main.net955305.contentfabric.io
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/resume',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "defaults": {
    "op": "add",
    "encryption_key": "string",
    "access": {
      "protocol": "string",
      "platform": "string",
      "path": "string",
      "storage_endpoint": {},
      "storage_options": {},
      "cloud_credentials": {}
    },
    "access_per_file": {
      "property1": {
        "protocol": "string",
        "platform": "string",
        "path": "string",
        "storage_endpoint": {},
        "storage_options": {},
        "cloud_credentials": {}
      },
      "property2": {
        "protocol": "string",
        "platform": "string",
        "path": "string",
        "storage_endpoint": {},
        "storage_options": {},
        "cloud_credentials": {}
      }
    }
  },
  "clear_resolve": true
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/resume',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.put 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/resume',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/resume', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/resume");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/resume", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/resume', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

PUT /qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/resume

Resume may be used to retry a job after transient ingest failures and/or to clear errors resulting from wrong ingest paths with the "clear_resolve" option. If "clear_resolve" is specified, the faulty operations are removed and returned in the response with an explanatory description of the error.

Body parameter

{
  "defaults": {
    "op": "add",
    "encryption_key": "string",
    "access": {
      "protocol": "string",
      "platform": "string",
      "path": "string",
      "storage_endpoint": {},
      "storage_options": {},
      "cloud_credentials": {}
    },
    "access_per_file": {
      "property1": {
        "protocol": "string",
        "platform": "string",
        "path": "string",
        "storage_endpoint": {},
        "storage_options": {},
        "cloud_credentials": {}
      },
      "property2": {
        "protocol": "string",
        "platform": "string",
        "path": "string",
        "storage_endpoint": {},
        "storage_options": {},
        "cloud_credentials": {}
      }
    }
  },
  "clear_resolve": true
}

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qwtoken path string true The write token of the draft content object.
filesjobid path string true Id of the files job.
body body FilesJobResumeReq false none

Example responses

202 Response

{
  "failed_ops": [
    {
      "op": {
        "op": "add",
        "path": "string",
        "type": "file",
        "security_groups": [
          "string"
        ],
        "mime_type": "string",
        "size": 0,
        "copy_move_source_path": "string",
        "link": null,
        "metadata": {
          "property1": {},
          "property2": {}
        },
        "ingest": {
          "type": "key",
          "path": "string",
          "size": 0,
          "etag": "string"
        },
        "reference": {
          "type": "key",
          "path": "string",
          "size": 0,
          "etag": "string"
        },
        "encryption": {
          "scheme": "none"
        }
      },
      "error": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
202 Accepted The request was accepted and ingest was resumed FilesJobResumeRes
401 Unauthorized Authentication information is missing or invalid ErrorRes
410 Gone Ingest completed and resuming is not possible. None
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Finalize Files

Code samples

# You can also use wget
curl -X POST https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/files \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/files HTTP/1.1
Host: main.net955305.contentfabric.io
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/files',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/files',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/files',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/files', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/files");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/files", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/files', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /qlibs/{qlibid}/q/{qwtoken}/files

Finalize the files in the content object by checking that all necessary file data has been uploaded and optimizing the file metadata structures. Finalization fails if any upload jobs have not completed successfully.

After finalization, no more files can be added.

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qwtoken path string true The write token of the draft content object.

Example responses

401 Response

{
  "errors": [
    {
      "op": "authentication",
      "kind": "invalid",
      "cause": "authorization header missing",
      "stacktrace": "..."
    }
  ]
}

Responses

Status Meaning Description Schema
201 Created bytes upload successfully completed None
401 Unauthorized Authentication information is missing or invalid ErrorRes
404 Not Found already finalized or not found None
409 Conflict some part was not finalized (job did not complete) None
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

List files

Code samples

# You can also use wget
curl -X GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/files_list/{path} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/files_list/{path} HTTP/1.1
Host: main.net955305.contentfabric.io
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/files_list/{path}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/files_list/{path}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/files_list/{path}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/files_list/{path}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/files_list/{path}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/files_list/{path}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/files_list/{path}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /qlibs/{qlibid}/q/{qhit}/files_list/{path}

List all files at a given path.

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qhit path string true A content hash, ID or write token.
path path string true An arbitrary path to a subset of the metadata. Can be empty.

Detailed descriptions

qhit: A content hash, ID or write token.

Example responses

200 Response

{
  "Type": "movie",
  "Title": "Loop the Hoop",
  "Year": "1999",
  "Released": "17 Jun 1999",
  "Runtime": "99 min",
  "Rated": "PG",
  "Genres": [
    "Animation",
    "Comedy"
  ],
  "Directors": [
    {
      "name": "Andrew Hooper",
      "role": "director"
    },
    {
      "name": "Jackie Looper",
      "role": "co-director"
    }
  ],
  "Writers": [
    {
      "name": "Andrew Hooper",
      "roles": [
        "original story",
        "screenplay"
      ]
    },
    {
      "name": "Victoria Ringer",
      "roles": [
        "original story"
      ]
    }
  ],
  "Actors": [
    "Billy the Kid",
    "Jack and Jill",
    "Peter Pumpkin"
  ],
  "Languages": [
    "English",
    "Indonesian"
  ],
  "Country": "USA",
  "Poster": "MV5zg4MjM2NDQ4MV5nBnXkFtZTgwMzgy.jpg"
}

Responses

Status Meaning Description Schema
200 OK The files list was successfully retrieved QMeta
401 Unauthorized Authentication information is missing or invalid ErrorRes
404 Not Found not found None
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Download or List Files

Code samples

# You can also use wget
curl -X GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/files/{path} \
  -H 'Accept: application/octet-stream' \
  -H 'Range: bytes=1000-1999' \
  -H 'Accept: image/*' \
  -H 'X-Content-Fabric-Decryption-Mode: none' \
  -H 'X-Content-Fabric-Image-Height: 0' \
  -H 'X-Content-Fabric-Image-Width: 0' \
  -H 'X-Content-Fabric-Set-Content-Disposition: string' \
  -H 'X-Content-Fabric-Storage-Access: string' \
  -H 'Authorization: Bearer {access-token}'

GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/files/{path} HTTP/1.1
Host: main.net955305.contentfabric.io
Accept: application/octet-stream
Range: bytes=1000-1999
Accept: image/*
X-Content-Fabric-Decryption-Mode: none
X-Content-Fabric-Image-Height: 0
X-Content-Fabric-Image-Width: 0
X-Content-Fabric-Set-Content-Disposition: string
X-Content-Fabric-Storage-Access: string

var headers = {
  'Accept':'application/octet-stream',
  'Range':'bytes=1000-1999',
  'Accept':'image/*',
  'X-Content-Fabric-Decryption-Mode':'none',
  'X-Content-Fabric-Image-Height':'0',
  'X-Content-Fabric-Image-Width':'0',
  'X-Content-Fabric-Set-Content-Disposition':'string',
  'X-Content-Fabric-Storage-Access':'string',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/files/{path}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/octet-stream',
  'Range':'bytes=1000-1999',
  'Accept':'image/*',
  'X-Content-Fabric-Decryption-Mode':'none',
  'X-Content-Fabric-Image-Height':'0',
  'X-Content-Fabric-Image-Width':'0',
  'X-Content-Fabric-Set-Content-Disposition':'string',
  'X-Content-Fabric-Storage-Access':'string',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/files/{path}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/octet-stream',
  'Range' => 'bytes=1000-1999',
  'Accept' => 'image/*',
  'X-Content-Fabric-Decryption-Mode' => 'none',
  'X-Content-Fabric-Image-Height' => '0',
  'X-Content-Fabric-Image-Width' => '0',
  'X-Content-Fabric-Set-Content-Disposition' => 'string',
  'X-Content-Fabric-Storage-Access' => 'string',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/files/{path}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/octet-stream',
  'Range': 'bytes=1000-1999',
  'Accept': 'image/*',
  'X-Content-Fabric-Decryption-Mode': 'none',
  'X-Content-Fabric-Image-Height': '0',
  'X-Content-Fabric-Image-Width': '0',
  'X-Content-Fabric-Set-Content-Disposition': 'string',
  'X-Content-Fabric-Storage-Access': 'string',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/files/{path}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/files/{path}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/octet-stream"},
        "Range": []string{"bytes=1000-1999"},
        "Accept": []string{"image/*"},
        "X-Content-Fabric-Decryption-Mode": []string{"none"},
        "X-Content-Fabric-Image-Height": []string{"0"},
        "X-Content-Fabric-Image-Width": []string{"0"},
        "X-Content-Fabric-Set-Content-Disposition": []string{"string"},
        "X-Content-Fabric-Storage-Access": []string{"string"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/files/{path}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/octet-stream',
    'Range' => 'bytes=1000-1999',
    'Accept' => 'image/*',
    'X-Content-Fabric-Decryption-Mode' => 'none',
    'X-Content-Fabric-Image-Height' => '0',
    'X-Content-Fabric-Image-Width' => '0',
    'X-Content-Fabric-Set-Content-Disposition' => 'string',
    'X-Content-Fabric-Storage-Access' => 'string',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/files/{path}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /qlibs/{qlibid}/q/{qhit}/files/{path}

Download or list the file at the given path.

Download a file

The request accepts an optional HTTP Range header to download only a specific section of the file.

List Files

In order to list files rather than downloading them, add a list query parameter to the request:

GET .../files/images?list or GET .../files/images?list=true

See List Files.

Retrieve file info only

If only the file info (via response status and headers) is needed, then use the HEAD HTTP method:

HEAD .../files/images/IMG_1234.jpg

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qhit path string true A content hash, ID or write token.
path path string true An arbitrary path to a subset of the metadata. Can be empty.
bytes query string false Defines a byte range to download instead of the entire entity. Follows the specification of an HTTP Byte Range header as defined in RFC 7233 section 2.1. Supports a suffix byte range. Does not support multiple byte ranges.
Range header string false A standard HTTP Byte Range header as defined in RFC 7233 section 2.1. Supports a suffix byte range. Does not support multiple byte ranges.
Accept header string false An HTTP Accept header
header-accept query array[string] false A value that will be treated as if specified in an Accept request header.
X-Content-Fabric-Decryption-Mode header string false A header specifying the decryption mode
header-x_decryption_mode query string false A value that will be treated as if specified in an X-Content-Fabric-Decryption-Mode request header.
X-Content-Fabric-Image-Height header integer false A header specifying a height for downloaded image files.
header-x_image_height query integer false A value that will be treated as if specified in an X-Content-Fabric-Image-Height request header.
X-Content-Fabric-Image-Width header integer false A header specifying a width for downloaded image files.
header-x_image_width query integer false A value that will be treated as if specified in an X-Content-Fabric-Image-Width request header.
X-Content-Fabric-Set-Content-Disposition header string false A header specifying a Content-Disposition for downloaded image files.
header-x_set_content_disposition query string false A value that will be treated as if specified in an X-Content-Fabric-Set-Content-Disposition request header.
X-Content-Fabric-Storage-Access header string false A header specifying a storage access as a base64 encoded value of the json of a CloudAccess.
header-x_storage_access query string false A value that will be treated as if specified in an X-Content-Fabric-Storage-Access request header.

Detailed descriptions

qhit: A content hash, ID or write token.

header-accept: A value that will be treated as if specified in an Accept request header. Useful in cases where request headers cannot be specified, for example in HTML links: <img href="...?header-accept=image/*"/>

header-x_decryption_mode: A value that will be treated as if specified in an X-Content-Fabric-Decryption-Mode request header. Useful in cases where request headers cannot be specified, for example in HTML links.

X-Content-Fabric-Image-Height: A header specifying a height for downloaded image files. Upscaling is not allowed: specifying a height larger than the image's actual height returns the image unchanged.

header-x_image_height: A value that will be treated as if specified in an X-Content-Fabric-Image-Height request header. Useful in cases where request headers cannot be specified, for example in HTML links.

X-Content-Fabric-Image-Width: A header specifying a width for downloaded image files.

header-x_image_width: A value that will be treated as if specified in an X-Content-Fabric-Image-Width request header. Useful in cases where request headers cannot be specified, for example in HTML links.

X-Content-Fabric-Set-Content-Disposition: A header specifying a Content-Disposition for downloaded image files.

header-x_set_content_disposition: A value that will be treated as if specified in an X-Content-Fabric-Set-Content-Disposition request header. Useful in cases where request headers cannot be specified, for example in HTML links.

X-Content-Fabric-Storage-Access: A header specifying a storage access as a base64 encoded value of the json of a CloudAccess. see #/components/schemas/CloudAccess

header-x_storage_access: A value that will be treated as if specified in an X-Content-Fabric-Storage-Access request header. Useful in cases where request headers cannot be specified, for example in HTML links.

Enumerated Values

Parameter Value
X-Content-Fabric-Decryption-Mode none
X-Content-Fabric-Decryption-Mode decrypt
X-Content-Fabric-Decryption-Mode reencrypt
header-x_decryption_mode none
header-x_decryption_mode decrypt
header-x_decryption_mode reencrypt

Example responses

200 Response

401 Response

{
  "errors": [
    {
      "op": "authentication",
      "kind": "invalid",
      "cause": "authorization header missing",
      "stacktrace": "..."
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The file content was successfully retrieved Inline
206 Partial Content The binary data of the part for the specified byte range as a single byte stream. Inline
401 Unauthorized Authentication information is missing or invalid ErrorRes
404 Not Found Error message returned if the requested entity does not exist. ErrorRes
409 Conflict Upload of the file is not yet finished ErrorRes
default Default A generic error message. ErrorRes

Response Schema

Response Headers

Status Header Type Format Description
206 Content-Range string range of the selected bytes returned as described in RFC 7233 section 4.
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

File Info

Code samples

# You can also use wget
curl -X HEAD https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/files/{path} \
  -H 'Range: bytes=1000-1999' \
  -H 'Accept: image/*' \
  -H 'X-Content-Fabric-Decryption-Mode: none' \
  -H 'X-Content-Fabric-Image-Height: 0' \
  -H 'X-Content-Fabric-Image-Width: 0' \
  -H 'X-Content-Fabric-Set-Content-Disposition: string' \
  -H 'X-Content-Fabric-Storage-Access: string' \
  -H 'Authorization: Bearer {access-token}'

HEAD https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/files/{path} HTTP/1.1
Host: main.net955305.contentfabric.io

Range: bytes=1000-1999
Accept: image/*
X-Content-Fabric-Decryption-Mode: none
X-Content-Fabric-Image-Height: 0
X-Content-Fabric-Image-Width: 0
X-Content-Fabric-Set-Content-Disposition: string
X-Content-Fabric-Storage-Access: string

var headers = {
  'Range':'bytes=1000-1999',
  'Accept':'image/*',
  'X-Content-Fabric-Decryption-Mode':'none',
  'X-Content-Fabric-Image-Height':'0',
  'X-Content-Fabric-Image-Width':'0',
  'X-Content-Fabric-Set-Content-Disposition':'string',
  'X-Content-Fabric-Storage-Access':'string',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/files/{path}',
  method: 'head',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Range':'bytes=1000-1999',
  'Accept':'image/*',
  'X-Content-Fabric-Decryption-Mode':'none',
  'X-Content-Fabric-Image-Height':'0',
  'X-Content-Fabric-Image-Width':'0',
  'X-Content-Fabric-Set-Content-Disposition':'string',
  'X-Content-Fabric-Storage-Access':'string',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/files/{path}',
{
  method: 'HEAD',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Range' => 'bytes=1000-1999',
  'Accept' => 'image/*',
  'X-Content-Fabric-Decryption-Mode' => 'none',
  'X-Content-Fabric-Image-Height' => '0',
  'X-Content-Fabric-Image-Width' => '0',
  'X-Content-Fabric-Set-Content-Disposition' => 'string',
  'X-Content-Fabric-Storage-Access' => 'string',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.head 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/files/{path}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Range': 'bytes=1000-1999',
  'Accept': 'image/*',
  'X-Content-Fabric-Decryption-Mode': 'none',
  'X-Content-Fabric-Image-Height': '0',
  'X-Content-Fabric-Image-Width': '0',
  'X-Content-Fabric-Set-Content-Disposition': 'string',
  'X-Content-Fabric-Storage-Access': 'string',
  'Authorization': 'Bearer {access-token}'
}

r = requests.head('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/files/{path}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/files/{path}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("HEAD");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Range": []string{"bytes=1000-1999"},
        "Accept": []string{"image/*"},
        "X-Content-Fabric-Decryption-Mode": []string{"none"},
        "X-Content-Fabric-Image-Height": []string{"0"},
        "X-Content-Fabric-Image-Width": []string{"0"},
        "X-Content-Fabric-Set-Content-Disposition": []string{"string"},
        "X-Content-Fabric-Storage-Access": []string{"string"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("HEAD", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/files/{path}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'bytes=1000-1999',
    'Accept' => 'image/*',
    'X-Content-Fabric-Decryption-Mode' => 'none',
    'X-Content-Fabric-Image-Height' => '0',
    'X-Content-Fabric-Image-Width' => '0',
    'X-Content-Fabric-Set-Content-Disposition' => 'string',
    'X-Content-Fabric-Storage-Access' => 'string',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('HEAD','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/files/{path}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

HEAD /qlibs/{qlibid}/q/{qhit}/files/{path}

Retrieve only info (via status code and headers) for the file at the given path.

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qhit path string true A content hash, ID or write token.
path path string true An arbitrary path to a subset of the metadata. Can be empty.
bytes query string false Defines a byte range to download instead of the entire entity. Follows the specification of an HTTP Byte Range header as defined in RFC 7233 section 2.1. Supports a suffix byte range. Does not support multiple byte ranges.
Range header string false A standard HTTP Byte Range header as defined in RFC 7233 section 2.1. Supports a suffix byte range. Does not support multiple byte ranges.
Accept header string false An HTTP Accept header
header-accept query array[string] false A value that will be treated as if specified in an Accept request header.
X-Content-Fabric-Decryption-Mode header string false A header specifying the decryption mode
header-x_decryption_mode query string false A value that will be treated as if specified in an X-Content-Fabric-Decryption-Mode request header.
X-Content-Fabric-Image-Height header integer false A header specifying a height for downloaded image files.
header-x_image_height query integer false A value that will be treated as if specified in an X-Content-Fabric-Image-Height request header.
X-Content-Fabric-Image-Width header integer false A header specifying a width for downloaded image files.
header-x_image_width query integer false A value that will be treated as if specified in an X-Content-Fabric-Image-Width request header.
X-Content-Fabric-Set-Content-Disposition header string false A header specifying a Content-Disposition for downloaded image files.
header-x_set_content_disposition query string false A value that will be treated as if specified in an X-Content-Fabric-Set-Content-Disposition request header.
X-Content-Fabric-Storage-Access header string false A header specifying a storage access as a base64 encoded value of the json of a CloudAccess.
header-x_storage_access query string false A value that will be treated as if specified in an X-Content-Fabric-Storage-Access request header.

Detailed descriptions

qhit: A content hash, ID or write token.

header-accept: A value that will be treated as if specified in an Accept request header. Useful in cases where request headers cannot be specified, for example in HTML links: <img href="...?header-accept=image/*"/>

header-x_decryption_mode: A value that will be treated as if specified in an X-Content-Fabric-Decryption-Mode request header. Useful in cases where request headers cannot be specified, for example in HTML links.

X-Content-Fabric-Image-Height: A header specifying a height for downloaded image files. Upscaling is not allowed: specifying a height larger than the image's actual height returns the image unchanged.

header-x_image_height: A value that will be treated as if specified in an X-Content-Fabric-Image-Height request header. Useful in cases where request headers cannot be specified, for example in HTML links.

X-Content-Fabric-Image-Width: A header specifying a width for downloaded image files.

header-x_image_width: A value that will be treated as if specified in an X-Content-Fabric-Image-Width request header. Useful in cases where request headers cannot be specified, for example in HTML links.

X-Content-Fabric-Set-Content-Disposition: A header specifying a Content-Disposition for downloaded image files.

header-x_set_content_disposition: A value that will be treated as if specified in an X-Content-Fabric-Set-Content-Disposition request header. Useful in cases where request headers cannot be specified, for example in HTML links.

X-Content-Fabric-Storage-Access: A header specifying a storage access as a base64 encoded value of the json of a CloudAccess. see #/components/schemas/CloudAccess

header-x_storage_access: A value that will be treated as if specified in an X-Content-Fabric-Storage-Access request header. Useful in cases where request headers cannot be specified, for example in HTML links.

Enumerated Values

Parameter Value
X-Content-Fabric-Decryption-Mode none
X-Content-Fabric-Decryption-Mode decrypt
X-Content-Fabric-Decryption-Mode reencrypt
header-x_decryption_mode none
header-x_decryption_mode decrypt
header-x_decryption_mode reencrypt

Responses

Status Meaning Description Schema
200 OK The file content was successfully retrieved None
206 Partial Content The binary data of the part for the specified byte range as a single byte stream None
401 Unauthorized Authentication information is missing or invalid None
404 Not Found The requested entity does not exist. None
409 Conflict Upload of the file is not yet finished None

Files V1 (Deprecated)

Organize data in content objects as file and directory structure.

Note: V1 of the API is deprecated. Use V2 instead.

The "Finalize Files" and "Download File" endpoints are the same for V1 and the current version of Files. Consult documentation in the "Files" section.

Create Upload Jobs

Code samples

# You can also use wget
curl -X POST https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/upload_jobs \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/upload_jobs HTTP/1.1
Host: main.net955305.contentfabric.io
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/upload_jobs',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '[
  {
    "path": "/var/log/messages",
    "type": "file",
    "security_groups": [
      "sg1, sg2"
    ],
    "mime_type": "text/plain",
    "size": 1024
  }
]';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/upload_jobs',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/upload_jobs',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/upload_jobs', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/upload_jobs");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/upload_jobs", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/upload_jobs', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /qlibs/{qlibid}/q/{qwtoken}/upload_jobs

Create one or multiple file upload jobs based on the list of files and their sizes that will be uploaded in subsequent requests.

Body parameter

[
  {
    "path": "/var/log/messages",
    "type": "file",
    "security_groups": [
      "sg1, sg2"
    ],
    "mime_type": "text/plain",
    "size": 1024
  }
]

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qwtoken path string true The write token of the draft content object.
body body FilesUploadReq false The list of files that need to be uploaded

Example responses

201 Response

{
  "upload_jobs": [
    {
      "id": "iqfuBzVpvomEYEDM6N5Xy1JVAW",
      "files": [
        {
          "path": "/var/log/messages",
          "size": 1024,
          "off": 0,
          "len": 1024,
          "rem": 1024
        }
      ]
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The request was successfull but contained no file so no job was created None
201 Created List of jobs needed to upload the files FilesUploadRes
400 Bad Request No file was provided in the request or the request is malformed ErrorRes
401 Unauthorized Authentication information is missing or invalid ErrorRes
409 Conflict One or more files in the request were already submitted in a previous request for the same content. ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Upload File Data V1

Code samples

# You can also use wget
curl -X POST https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/upload_jobs/{jobid} \
  -H 'Content-Type: application/octet-stream' \
  -H 'Accept: application/json' \
  -H 'Content-type: application/octet-stream' \
  -H 'Authorization: Bearer {access-token}'

POST https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/upload_jobs/{jobid} HTTP/1.1
Host: main.net955305.contentfabric.io
Content-Type: application/octet-stream
Accept: application/json
Content-type: application/octet-stream

var headers = {
  'Content-Type':'application/octet-stream',
  'Accept':'application/json',
  'Content-type':'application/octet-stream',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/upload_jobs/{jobid}',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = 'null';
const headers = {
  'Content-Type':'application/octet-stream',
  'Accept':'application/json',
  'Content-type':'application/octet-stream',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/upload_jobs/{jobid}',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/octet-stream',
  'Accept' => 'application/json',
  'Content-type' => 'application/octet-stream',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/upload_jobs/{jobid}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/octet-stream',
  'Accept': 'application/json',
  'Content-type': 'application/octet-stream',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/upload_jobs/{jobid}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/upload_jobs/{jobid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/octet-stream"},
        "Accept": []string{"application/json"},
        "Content-type": []string{"application/octet-stream"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/upload_jobs/{jobid}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/octet-stream',
    'Accept' => 'application/json',
    'Content-type' => 'application/octet-stream',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/upload_jobs/{jobid}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /qlibs/{qlibid}/q/{qwtoken}/upload_jobs/{jobid}

Upload binary data for a previously created upload job.

Important: the data has to be uploaded in the exact order and conforming to the byte ranges specified in the upload job.

If an error occurs during the upload, a request to get the status of the upload job prvoides the necesary information needed to resume/retry the data upload.

Body parameter

null

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qwtoken path string true The write token of the draft content object.
jobid path string true Id of an upload job
Content-type header string true none
body body any(binary) false The binary data that gets appended to the part. The part is finalized when complete.

Enumerated Values

Parameter Value
Content-type application/octet-stream

Example responses

200 Response

{
  "content": {
    "id": "iq__6D1qLem852ggNcEYcAyvgT",
    "write_token": "tqw_EGheZaihN4Z1DX3VE6EVGLHiSWZSM6j4n",
    "type": "hq__QmRDQwpgAMkc3TDsnvwmv2VSgg3zqNNFcMWKSdxxMX4QxU"
  },
  "part": {
    "hash": "hqp_QmYw62E6J1wUQbJrqVbbttR1Bun5KQmUJAfPks6Ctx37Bx -- if finalized",
    "write_token": "tqp_8qqHM6Jbx6JWDbpRjmvMVg6BpmnirFfBhS9s -- if draft",
    "size": 8587043
  }
}

Responses

Status Meaning Description Schema
200 OK bytes upload successfully completed QPartInfo
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Get Upload Status

Code samples

# You can also use wget
curl -X GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/upload_jobs/{jobid} \
  -H 'Accept: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/upload_jobs/{jobid} HTTP/1.1
Host: main.net955305.contentfabric.io
Accept: application/json
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/upload_jobs/{jobid}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/upload_jobs/{jobid}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/upload_jobs/{jobid}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/upload_jobs/{jobid}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/upload_jobs/{jobid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/upload_jobs/{jobid}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/upload_jobs/{jobid}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /qlibs/{qlibid}/q/{qwtoken}/upload_jobs/{jobid}

Retrieve the current status of an upload job. If no job ID is specified, the status of all jobs is returned.

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qwtoken path string true The write token of the draft content object.
jobid path string true Id of an upload job
Accept header string true none

Enumerated Values

Parameter Value
Accept application/json

Example responses

200 Response

{
  "upload_jobs": [
    {
      "id": "iqfuBzVpvomEYEDM6N5Xy1JVAW",
      "files": [
        {
          "path": "/var/log/messages",
          "size": 1024,
          "off": 0,
          "len": 1024,
          "rem": 1024
        }
      ]
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The status was successfully retrieved FilesUploadRes
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Bitcode

Bitcode-related functions.

Get Content Representation

Code samples

# You can also use wget
curl -X GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/rep/{path} \
  -H 'Accept: */*' \
  -H 'Accept: image/*' \
  -H 'Authorization: Bearer {access-token}'

GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/rep/{path} HTTP/1.1
Host: main.net955305.contentfabric.io
Accept: */*
Accept: image/*

var headers = {
  'Accept':'*/*',
  'Accept':'image/*',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/rep/{path}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'*/*',
  'Accept':'image/*',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/rep/{path}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => '*/*',
  'Accept' => 'image/*',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/rep/{path}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': '*/*',
  'Accept': 'image/*',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/rep/{path}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/rep/{path}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"*/*"},
        "Accept": []string{"image/*"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/rep/{path}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 '*/*',
    'Accept' => 'image/*',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/rep/{path}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /qlibs/{qlibid}/q/{qhit}/rep/{path}

Retrieve a representation of the content object by calling its associated bitcode. The path parameter is passed to the bitcode and allows it to return different presentations depending on its value.

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qhit path string true A content hash, ID or write token.
path path string true An arbitrary path to a subset of the metadata. Can be empty.
Accept header string false An HTTP Accept header
header-accept query array[string] false A value that will be treated as if specified in an Accept request header.
fnParams query object false Parameters to the bitcode function call.

Detailed descriptions

qhit: A content hash, ID or write token.

header-accept: A value that will be treated as if specified in an Accept request header. Useful in cases where request headers cannot be specified, for example in HTML links: <img href="...?header-accept=image/*"/>

Example responses

200 Response

401 Response

{
  "errors": [
    {
      "op": "authentication",
      "kind": "invalid",
      "cause": "authorization header missing",
      "stacktrace": "..."
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The content representation as defined by the bitcode. string
401 Unauthorized Authentication information is missing or invalid ErrorRes
404 Not Found Error message returned if the requested entity does not exist. ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
200 Content-Type string the returned content type
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Get Content Representation (POST)

Code samples

# You can also use wget
curl -X POST https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/rep/{path} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/octet-stream' \
  -H 'Accept: image/*' \
  -H 'X-Content-Fabric-Decryption-Mode: none' \
  -H 'X-Content-Fabric-Set-Content-Disposition: string' \
  -H 'Authorization: Bearer {access-token}'

POST https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/rep/{path} HTTP/1.1
Host: main.net955305.contentfabric.io
Content-Type: application/json
Accept: application/octet-stream
Accept: image/*
X-Content-Fabric-Decryption-Mode: none
X-Content-Fabric-Set-Content-Disposition: string

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/octet-stream',
  'Accept':'image/*',
  'X-Content-Fabric-Decryption-Mode':'none',
  'X-Content-Fabric-Set-Content-Disposition':'string',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/rep/{path}',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/octet-stream',
  'Accept':'image/*',
  'X-Content-Fabric-Decryption-Mode':'none',
  'X-Content-Fabric-Set-Content-Disposition':'string',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/rep/{path}',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/octet-stream',
  'Accept' => 'image/*',
  'X-Content-Fabric-Decryption-Mode' => 'none',
  'X-Content-Fabric-Set-Content-Disposition' => 'string',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/rep/{path}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/octet-stream',
  'Accept': 'image/*',
  'X-Content-Fabric-Decryption-Mode': 'none',
  'X-Content-Fabric-Set-Content-Disposition': 'string',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/rep/{path}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/rep/{path}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/octet-stream"},
        "Accept": []string{"image/*"},
        "X-Content-Fabric-Decryption-Mode": []string{"none"},
        "X-Content-Fabric-Set-Content-Disposition": []string{"string"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/rep/{path}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Accept' => 'application/octet-stream',
    'Accept' => 'image/*',
    'X-Content-Fabric-Decryption-Mode' => 'none',
    'X-Content-Fabric-Set-Content-Disposition' => 'string',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/rep/{path}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /qlibs/{qlibid}/q/{qhit}/rep/{path}

Retrieve a representation of the content object by calling its associated bitcode. The path parameter and request body is passed to the bitcode and allows it to return different presentations depending on its value.

Body parameter

{}

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qhit path string true A content hash, ID or write token.
path path string true An arbitrary path to a subset of the metadata. Can be empty.
Accept header string false An HTTP Accept header
header-accept query array[string] false A value that will be treated as if specified in an Accept request header.
X-Content-Fabric-Decryption-Mode header string false A header specifying the decryption mode
header-x_decryption_mode query string false A value that will be treated as if specified in an X-Content-Fabric-Decryption-Mode request header.
X-Content-Fabric-Set-Content-Disposition header string false A header specifying a Content-Disposition for downloaded image files.
header-x_set_content_disposition query string false A value that will be treated as if specified in an X-Content-Fabric-Set-Content-Disposition request header.
body body object false A valid JSON object as defined by the called bitcode.

Detailed descriptions

qhit: A content hash, ID or write token.

header-accept: A value that will be treated as if specified in an Accept request header. Useful in cases where request headers cannot be specified, for example in HTML links: <img href="...?header-accept=image/*"/>

header-x_decryption_mode: A value that will be treated as if specified in an X-Content-Fabric-Decryption-Mode request header. Useful in cases where request headers cannot be specified, for example in HTML links.

X-Content-Fabric-Set-Content-Disposition: A header specifying a Content-Disposition for downloaded image files.

header-x_set_content_disposition: A value that will be treated as if specified in an X-Content-Fabric-Set-Content-Disposition request header. Useful in cases where request headers cannot be specified, for example in HTML links.

Enumerated Values

Parameter Value
X-Content-Fabric-Decryption-Mode none
X-Content-Fabric-Decryption-Mode decrypt
X-Content-Fabric-Decryption-Mode reencrypt
header-x_decryption_mode none
header-x_decryption_mode decrypt
header-x_decryption_mode reencrypt

Example responses

200 Response

401 Response

{
  "errors": [
    {
      "op": "authentication",
      "kind": "invalid",
      "cause": "authorization header missing",
      "stacktrace": "..."
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The content representation as defined by the bitcode. Inline
401 Unauthorized Authentication information is missing or invalid ErrorRes
404 Not Found Error message returned if the requested entity does not exist. ErrorRes
default Default A generic error message. ErrorRes

Response Schema

Response Headers

Status Header Type Format Description
200 Content-Type string the returned content type
200 Content-Disposition string the content disposition if header to set content disposition was used
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Call Bitcode Function

Code samples

# You can also use wget
curl -X GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/call/{func} \
  -H 'Accept: application/octet-stream' \
  -H 'Authorization: Bearer {access-token}'

GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/call/{func} HTTP/1.1
Host: main.net955305.contentfabric.io
Accept: application/octet-stream

var headers = {
  'Accept':'application/octet-stream',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/call/{func}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/octet-stream',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/call/{func}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/octet-stream',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/call/{func}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/octet-stream',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/call/{func}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/call/{func}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/octet-stream"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/call/{func}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/octet-stream',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/call/{func}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /qlibs/{qlibid}/q/{qhit}/call/{func}

Call the given bitcode function and return its result.

The function name as well as all parameters are specified in the URL.

The bitcode function will receive as first parameter the QLib ID, as second parameter the content hash, and then the key-value pairs from the URL as a list of tuples.

For example, this URL path:
/qlibs/ilibBif1DV8Yi6fzEqzfDsv9dY/q/hq__QmT3aofVbzmsCL426SNbcXrFxtvX92grdi5UWNvaybPHBq/call/func1?arg1=v1&arg2=v2
produces these arguments:
arg[0] = "ilibBif1DV8Yi6fzEqzfDsv9dY"
arg[1] = "hq__QmT3aofVbzmsCL426SNbcXrFxtvX92grdi5UWNvaybPHBq"
arg[2] = "arg1"
arg[3] = "v1"
arg[4] = "arg2"
arg[5] = "v2"

If the function call returns nothing, the request is HTTP answered with a 200 status code and no body.

Otherwise the function is expected to return the content type as first return argument, and additional information according to the content type. Two types are supported: application/octet-stream and application/json

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qhit path string true A content hash, ID or write token.
func path string true An bitcode function name.
fnParams query object false Parameters to the bitcode function call.

Detailed descriptions

qhit: A content hash, ID or write token.

Example responses

200 Response

401 Response

{
  "errors": [
    {
      "op": "authentication",
      "kind": "invalid",
      "cause": "authorization header missing",
      "stacktrace": "..."
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The result of the bitcode function call. Inline
401 Unauthorized Authentication information is missing or invalid ErrorRes
404 Not Found Error message returned if the requested entity does not exist. ErrorRes
default Default A generic error message. ErrorRes

Response Schema

Response Headers

Status Header Type Format Description
200 Content-Type string the returned content type
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Call Post Bitcode Function

Code samples

# You can also use wget
curl -X POST https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/call/{func} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/octet-stream' \
  -H 'Content-type: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/call/{func} HTTP/1.1
Host: main.net955305.contentfabric.io
Content-Type: application/json
Accept: application/octet-stream
Content-type: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/octet-stream',
  'Content-type':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/call/{func}',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/octet-stream',
  'Content-type':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/call/{func}',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/octet-stream',
  'Content-type' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/call/{func}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/octet-stream',
  'Content-type': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/call/{func}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/call/{func}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/octet-stream"},
        "Content-type": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/call/{func}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Accept' => 'application/octet-stream',
    'Content-type' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/call/{func}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /qlibs/{qlibid}/q/{qhit}/call/{func}

Call the given bitcode function and return its result.

The function name is specified in the URL, parameters are passed in the json body.

Body parameter

{}

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qhit path string true A content hash, ID or write token.
func path string true An bitcode function name.
Content-type header string true none
body body object false Parameters of the function.

Detailed descriptions

qhit: A content hash, ID or write token.

Enumerated Values

Parameter Value
Content-type application/json

Example responses

200 Response

401 Response

{
  "errors": [
    {
      "op": "authentication",
      "kind": "invalid",
      "cause": "authorization header missing",
      "stacktrace": "..."
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The result of the bitcode function call. Inline
201 Created The result of the bitcode function call. Inline
401 Unauthorized Authentication information is missing or invalid ErrorRes
404 Not Found Error message returned if the requested entity does not exist. ErrorRes
default Default A generic error message. ErrorRes

Response Schema

Response Headers

Status Header Type Format Description
200 Content-Type string the returned content type
201 Content-Type string the returned content type
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Call Function on Bitcode Module

Code samples

# You can also use wget
curl -X GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/bc/{module}/{func}/{path} \
  -H 'Accept: application/octet-stream' \
  -H 'Authorization: Bearer {access-token}'

GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/bc/{module}/{func}/{path} HTTP/1.1
Host: main.net955305.contentfabric.io
Accept: application/octet-stream

var headers = {
  'Accept':'application/octet-stream',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/bc/{module}/{func}/{path}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/octet-stream',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/bc/{module}/{func}/{path}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/octet-stream',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/bc/{module}/{func}/{path}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/octet-stream',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/bc/{module}/{func}/{path}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/bc/{module}/{func}/{path}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/octet-stream"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/bc/{module}/{func}/{path}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/octet-stream',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/bc/{module}/{func}/{path}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /qlibs/{qlibid}/q/{qhit}/bc/{module}/{func}/{path}

Call the given function on the given bitcode module and return its result.

Module name, function name as well as all parameters are specified in the URL.

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qhit path string true A content hash, ID or write token.
module path string true An bitcode module name.
func path string true An bitcode function name.
path path string true An arbitrary path to a subset of the metadata. Can be empty.
fnParams query object false Parameters to the bitcode function call.

Detailed descriptions

qhit: A content hash, ID or write token.

Example responses

200 Response

401 Response

{
  "errors": [
    {
      "op": "authentication",
      "kind": "invalid",
      "cause": "authorization header missing",
      "stacktrace": "..."
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The result of the bitcode function call. Inline
401 Unauthorized Authentication information is missing or invalid ErrorRes
404 Not Found Error message returned if the requested entity does not exist. ErrorRes
default Default A generic error message. ErrorRes

Response Schema

Response Headers

Status Header Type Format Description
200 Content-Type string the returned content type
200 Content-Disposition string the content disposition if available
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Call Post Function on Bitcode Function

Code samples

# You can also use wget
curl -X POST https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/bc/{module}/{func}/{path} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/octet-stream' \
  -H 'Content-type: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/bc/{module}/{func}/{path} HTTP/1.1
Host: main.net955305.contentfabric.io
Content-Type: application/json
Accept: application/octet-stream
Content-type: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/octet-stream',
  'Content-type':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/bc/{module}/{func}/{path}',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/octet-stream',
  'Content-type':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/bc/{module}/{func}/{path}',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/octet-stream',
  'Content-type' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/bc/{module}/{func}/{path}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/octet-stream',
  'Content-type': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/bc/{module}/{func}/{path}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/bc/{module}/{func}/{path}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/octet-stream"},
        "Content-type": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/bc/{module}/{func}/{path}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Accept' => 'application/octet-stream',
    'Content-type' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://main.net955305.contentfabric.io/qlibs/{qlibid}/q/{qhit}/bc/{module}/{func}/{path}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /qlibs/{qlibid}/q/{qhit}/bc/{module}/{func}/{path}

Call the given function on the given bitcode module and return its result.

The module and function name are specified in the URL, parameters are passed in the json body.

Body parameter

{}

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qhit path string true A content hash, ID or write token.
module path string true An bitcode module name.
func path string true An bitcode function name.
Content-type header string true none
body body object false Parameters of the function.

Detailed descriptions

qhit: A content hash, ID or write token.

Enumerated Values

Parameter Value
Content-type application/json

Example responses

200 Response

401 Response

{
  "errors": [
    {
      "op": "authentication",
      "kind": "invalid",
      "cause": "authorization header missing",
      "stacktrace": "..."
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The result of the bitcode function call. Inline
401 Unauthorized Authentication information is missing or invalid ErrorRes
404 Not Found Error message returned if the requested entity does not exist. ErrorRes
default Default A generic error message. ErrorRes

Response Schema

Response Headers

Status Header Type Format Description
200 Content-Type string the returned content type
200 Content-Disposition string the content disposition if available
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Content Versions

Content Versions

List Content Versions

Code samples

# You can also use wget
curl -X GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/qid/{qid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/qid/{qid} HTTP/1.1
Host: main.net955305.contentfabric.io
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/qid/{qid}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/qid/{qid}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/qid/{qid}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://main.net955305.contentfabric.io/qlibs/{qlibid}/qid/{qid}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/qid/{qid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/qid/{qid}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://main.net955305.contentfabric.io/qlibs/{qlibid}/qid/{qid}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /qlibs/{qlibid}/qid/{qid}

List all versions of the content with the given ID. If the query parameter details is specified, additional data is returned for each version. Note that this may result in increased query time, especially for contents with many versions.

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qid path string true The ID of the content object.
details query boolean false Retrieve additional details (currently content type hash, qlib ID, and size stats)

Detailed descriptions

details: Retrieve additional details (currently content type hash, qlib ID, and size stats)

Example responses

200 Response

{
  "id": "iq__6D1qLem852ggNcEYcAyvgT",
  "versions": [
    {
      "id": "iq__6D1qLem852ggNcEYcAyvgT",
      "hash": "hq__QmctSY6kRDT1GJ7S69W7Ta7PEsvyWCCZahTFDAxXmjQXXh",
      "type": "hq__QmRDQwpgAMkc3TDsnvwmv2VSgg3zqNNFcMWKSdxxMX4QxU",
      "size_stats": {
        "parts": 5,
        "size": "675 B",
        "size_bytes": 675
      }
    },
    {
      "id": "iq__6D1qLem852ggNcEYcAyvgT",
      "hash": "hq__QmZPdxKM4wyvHG4En3LoAtZ9cQE9KL2MVNsEN17etCN2cA",
      "type": "hq__QmRDQwpgAMkc3TDsnvwmv2VSgg3zqNNFcMWKSdxxMX4QxU",
      "size_stats": {
        "parts": 5,
        "size": "575 B",
        "size_bytes": 575
      }
    }
  ],
  "size_stats": {
    "parts": 8,
    "size": "1.1 KB",
    "size_bytes": 1150
  }
}

Responses

Status Meaning Description Schema
200 OK The versions of the content. QVersions
default Default unexpected error ErrorRes

Create Content Version

Code samples

# You can also use wget
curl -X POST https://main.net955305.contentfabric.io/qlibs/{qlibid}/qid/{qid} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://main.net955305.contentfabric.io/qlibs/{qlibid}/qid/{qid} HTTP/1.1
Host: main.net955305.contentfabric.io
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/qid/{qid}',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "type": "hq__QmRDQwpgAMkc3TDsnvwmv2VSgg3zqNNFcMWKSdxxMX4QxU",
  "meta": {
    "genre": "sci-fi",
    "year": "2018"
  },
  "copy_from": "hq__QmPLzvrE9cmWJv6wcXczTwRsYok8znbnKMjYjd8gAUtJgD"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/qid/{qid}',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/qid/{qid}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://main.net955305.contentfabric.io/qlibs/{qlibid}/qid/{qid}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/qid/{qid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/qid/{qid}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://main.net955305.contentfabric.io/qlibs/{qlibid}/qid/{qid}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /qlibs/{qlibid}/qid/{qid}

Create a new version of the content with the given ID. The new version will be a regular draft content object as if created with the Create Draft Content API, except that it will inherit all parts and metadata from the latest version of this content.

Body parameter

{
  "type": "hq__QmRDQwpgAMkc3TDsnvwmv2VSgg3zqNNFcMWKSdxxMX4QxU",
  "meta": {
    "genre": "sci-fi",
    "year": "2018"
  },
  "copy_from": "hq__QmPLzvrE9cmWJv6wcXczTwRsYok8znbnKMjYjd8gAUtJgD"
}

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qid path string true The ID of the content object.
body body QCreateReq true All fields of the content creation request are optional. If specified, they replace the respective value that was inherited from the latest version.

Detailed descriptions

body: All fields of the content creation request are optional. If specified, they replace the respective value that was inherited from the latest version.

Example responses

201 Response

{
  "id": "iq__6D1qLem852ggNcEYcAyvgT",
  "write_token": "tqw_EGheZaihN4Z1DX3VE6EVGLHiSWZSM6j4n",
  "type": "hq__QmRDQwpgAMkc3TDsnvwmv2VSgg3zqNNFcMWKSdxxMX4QxU",
  "size_stats": {
    "parts": 5,
    "size": "575 B",
    "size_bytes": 575
  }
}

Responses

Status Meaning Description Schema
201 Created The new version of the content. QInfo
default Default unexpected error ErrorRes

Delete Content

Code samples

# You can also use wget
curl -X DELETE https://main.net955305.contentfabric.io/qlibs/{qlibid}/qid/{qid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

DELETE https://main.net955305.contentfabric.io/qlibs/{qlibid}/qid/{qid} HTTP/1.1
Host: main.net955305.contentfabric.io
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/qid/{qid}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/qid/{qid}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/qid/{qid}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://main.net955305.contentfabric.io/qlibs/{qlibid}/qid/{qid}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/qid/{qid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/qid/{qid}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://main.net955305.contentfabric.io/qlibs/{qlibid}/qid/{qid}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

DELETE /qlibs/{qlibid}/qid/{qid}

Delete the given content and all of its versions.

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
qid path string true The ID of the content object.

Example responses

401 Response

{
  "errors": [
    {
      "op": "authentication",
      "kind": "invalid",
      "cause": "authorization header missing",
      "stacktrace": "..."
    }
  ]
}

Responses

Status Meaning Description Schema
204 No Content The content was successfully deleted. None
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Name Service

Name Service

Create or update a name mapping

Code samples

# You can also use wget
curl -X PUT https://main.net955305.contentfabric.io/qlibs/{qlibid}/naming \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PUT https://main.net955305.contentfabric.io/qlibs/{qlibid}/naming HTTP/1.1
Host: main.net955305.contentfabric.io
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/naming',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "name": "string",
  "target": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/naming',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.put 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/naming',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://main.net955305.contentfabric.io/qlibs/{qlibid}/naming', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/naming");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/naming", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','https://main.net955305.contentfabric.io/qlibs/{qlibid}/naming', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

PUT /qlibs/{qlibid}/naming

The name service allows creating mutable, human-readable name mappings for target content object hashes, content write tokens or other names.

Body parameter

{
  "name": "string",
  "target": "string"
}

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
body body NameMapping true .

Example responses

401 Response

{
  "errors": [
    {
      "op": "authentication",
      "kind": "invalid",
      "cause": "authorization header missing",
      "stacktrace": "..."
    }
  ]
}

Responses

Status Meaning Description Schema
204 No Content The request was accepted. None
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Resolves a name mapping

Code samples

# You can also use wget
curl -X GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/naming/{name} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://main.net955305.contentfabric.io/qlibs/{qlibid}/naming/{name} HTTP/1.1
Host: main.net955305.contentfabric.io
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/naming/{name}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/naming/{name}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/naming/{name}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://main.net955305.contentfabric.io/qlibs/{qlibid}/naming/{name}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/naming/{name}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/naming/{name}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://main.net955305.contentfabric.io/qlibs/{qlibid}/naming/{name}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /qlibs/{qlibid}/naming/{name}

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
name path string true the name to resolve

Example responses

200 Response

{
  "name": "string",
  "target": "string"
}

Responses

Status Meaning Description Schema
200 OK The name mapping NameMapping
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Delete a name mapping

Code samples

# You can also use wget
curl -X DELETE https://main.net955305.contentfabric.io/qlibs/{qlibid}/naming/{name} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

DELETE https://main.net955305.contentfabric.io/qlibs/{qlibid}/naming/{name} HTTP/1.1
Host: main.net955305.contentfabric.io
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/naming/{name}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955305.contentfabric.io/qlibs/{qlibid}/naming/{name}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://main.net955305.contentfabric.io/qlibs/{qlibid}/naming/{name}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://main.net955305.contentfabric.io/qlibs/{qlibid}/naming/{name}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/qlibs/{qlibid}/naming/{name}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://main.net955305.contentfabric.io/qlibs/{qlibid}/naming/{name}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://main.net955305.contentfabric.io/qlibs/{qlibid}/naming/{name}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

DELETE /qlibs/{qlibid}/naming/{name}

Parameters

Name In Type Required Description
qlibid path string true The ID of the content library.
name path string true the name to resolve

Example responses

401 Response

{
  "errors": [
    {
      "op": "authentication",
      "kind": "invalid",
      "cause": "authorization header missing",
      "stacktrace": "..."
    }
  ]
}

Responses

Status Meaning Description Schema
204 No Content The name mapping was deleted None
401 Unauthorized Authentication information is missing or invalid ErrorRes
default Default A generic error message. ErrorRes

Response Headers

Status Header Type Format Description
401 WWW-Authenticate string A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"

Metrics

Provides runtime metrics about the given fabric node.

Get Metrics

Code samples

# You can also use wget
curl -X GET https://main.net955305.contentfabric.io/metrics \
  -H 'Accept: application/json'

GET https://main.net955305.contentfabric.io/metrics HTTP/1.1
Host: main.net955305.contentfabric.io
Accept: application/json

var headers = {
  'Accept':'application/json'

};

$.ajax({
  url: 'https://main.net955305.contentfabric.io/metrics',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json'

};

fetch('https://main.net955305.contentfabric.io/metrics',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://main.net955305.contentfabric.io/metrics',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://main.net955305.contentfabric.io/metrics', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955305.contentfabric.io/metrics");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://main.net955305.contentfabric.io/metrics", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

 'application/json',
    
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://main.net955305.contentfabric.io/metrics', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

GET /metrics

Retrieve fabric node metrics. Authorization through ACLs.

Parameters

Name In Type Required Description
select query array[string] false Metadata path to the subtree to retrieve. May be specified multiple times.
remove query array[string] false Metadata path of the subtree to remove from the result. May be specified multiple times.

Detailed descriptions

select: Metadata path to the subtree to retrieve. May be specified multiple times.

remove: Metadata path of the subtree to remove from the result. May be specified multiple times.

Example responses

200 Response

{}

Responses

Status Meaning Description Schema
200 OK Fabric node metrics Inline
default Default A generic error message. ErrorRes

Response Schema

Schemas

NameMapping

{
  "name": "string",
  "target": "string"
}

Properties

Name Type Required Description
name string false none
target string false none

QLibList

[
  "ilibPACFbXkPSawEKi7KnfwCfb",
  "ilibPAFjkXc4C3xajfjkZt6Kgm"
]

A list of content library IDs.

Properties

None

QLibCreateReq

{
  "meta": {
    "name": "ACME Advertisement Library",
    "description": "ACME Advertisement Library is a collection of all advertisement material produced for ACME, Inc."
  },
  "private_meta": {
    "instructions": "Publishing content to the library is governed by internal corporate policy ACME-IP-3897."
  }
}

Properties

Name Type Required Description
meta QLibMeta false Arbitrary public content library metadata. Can be any valid JSON structure. Public metadata is stored in the content space and is searchable.
private_meta object false Arbitrary private metadata of the content library. Private metadata is stored in the content object that is created for the library.
» additionalProperties object false none

QLibCreateRes

{
  "id": "ilibALz6VjbpBdkRbte5CPPhJi",
  "qid": "iq__ALz6VjbpBdkRbte5CPPhJi"
}

Properties

Name Type Required Description
id string true Content library ID
qid string true ID of the content object that is created for the library.

QLibInfo

{
  "id": "ilibALz6VjbpBdkRbte5CPPhJi",
  "qid": "iq__ALz6VjbpBdkRbte5CPPhJi",
  "meta": {
    "name": "ACME Advertisement Library",
    "description": "ACME Advertisement Library is a collection of all advertisement material produced for ACME, Inc."
  }
}

Properties

Name Type Required Description
id string false Content library ID
qid string false ID of the content object that is created for the library.
meta QLibMeta false Arbitrary public content library metadata. Can be any valid JSON structure. Public metadata is stored in the content space and is searchable.

QList

{
  "contents": [
    {
      "id": "iq__6D1qLem852ggNcEYcAyvgT",
      "versions": [
        {
          "id": "iq__6D1qLem852ggNcEYcAyvgT",
          "hash": "hq__QmZPdxKM4wyvHG4En3LoAtZ9cQE9KL2MVNsEN17etCN2cA",
          "type": "hq__QmRDQwpgAMkc3TDsnvwmv2VSgg3zqNNFcMWKSdxxMX4QxU",
          "meta": {
            "genre": "Animation",
            "title": "Finding Dory",
            "year": 2016
          }
        }
      ]
    },
    {
      "id": "iq__L9LkebHK3QQ7q3rWxmWs55",
      "versions": [
        {
          "id": "iq__L9LkebHK3QQ7q3rWxmWs55",
          "hash": "hq__QmRDQwpgAMkc3TDsnvwmv2VSgg3zqNNFcMWKSdxxMX4QxU",
          "type": "",
          "meta": {
            "bitcode": "video.bc"
          }
        }
      ]
    }
  ],
  "paging": {
    "first": "0",
    "last": "10",
    "next": "5",
    "previous": "0",
    "items": 12,
    "current": 0,
    "pages": 3,
    "limit": 5
  }
}

Properties

Name Type Required Description
contents [QVersions] false The selected content object information
paging PagingRes false Paging information returned for API requests that support result paging.
errors [QListError] false Errors encountered while reading content objects

QListError

{
  "error": "string",
  "item": {
    "id": "string",
    "hash": "string",
    "type": "string",
    "meta": {
      "Type": "movie",
      "Title": "Loop the Hoop",
      "Year": "1999",
      "Released": "17 Jun 1999",
      "Runtime": "99 min",
      "Rated": "PG",
      "Genres": [
        "Animation",
        "Comedy"
      ],
      "Directors": [
        {
          "name": "Andrew Hooper",
          "role": "director"
        },
        {
          "name": "Jackie Looper",
          "role": "co-director"
        }
      ],
      "Writers": [
        {
          "name": "Andrew Hooper",
          "roles": [
            "original story",
            "screenplay"
          ]
        },
        {
          "name": "Victoria Ringer",
          "roles": [
            "original story"
          ]
        }
      ],
      "Actors": [
        "Billy the Kid",
        "Jack and Jill",
        "Peter Pumpkin"
      ],
      "Languages": [
        "English",
        "Indonesian"
      ],
      "Country": "USA",
      "Poster": "MV5zg4MjM2NDQ4MV5nBnXkFtZTgwMzgy.jpg"
    },
    "size_stats": {
      "parts": 5,
      "size": "575 B",
      "size_bytes": 575
    }
  }
}

An error encountered while listing content objects.

Properties

Name Type Required Description
error string false the description of the error
item QVersion false Information about a content version.

FilesUploadReq

[
  {
    "path": "/var/log/messages",
    "type": "file",
    "security_groups": [
      "sg1, sg2"
    ],
    "mime_type": "text/plain",
    "size": 1024
  }
]

Request to create upload jobs. The 'op' field in FileOperation items must be omitted (all items are 'add').

Properties

Name Type Required Description
anonymous [FileOperation] false Request to create upload jobs. The 'op' field in FileOperation items must be omitted (all items are 'add').

FilesJobCreationReq

{
  "seq": 0,
  "seq_complete": false,
  "ops": [
    {
      "type": "file",
      "path": "images/logo_small.png",
      "mime_type": "image/png",
      "size": 14525
    },
    {
      "type": "file",
      "path": "images/logo_large.png",
      "mime_type": "image/png",
      "size": 46943
    },
    {
      "type": "link",
      "path": "images/logo.png",
      "link": {
        "/": "./files/images/logo_large.png"
      }
    },
    {
      "op": "del",
      "path": "images/logo-medium.png"
    }
  ]
}

Request to create a Files Job or add more file operations to an existing Job. In a Files Job creation request, 'ops' may be present in the following 2 cases:

Properties

Name Type Required Description
seq integer false the sequence number, starting at 0. Specifies the order in a sequence of requests.
seq_complete boolean false if true or omitted, this is the last request in a sequence.
defaults FilesJobDefaults false Default values for files operation in a FilesJobCreationReq Notes about encryption: * The string representing the encryption key is the KID of a primary key. For encrypting it is not necessary to include the secret key in the primary key sent to the API. * Also - even if the defaults include an encryption key, each file op must specify its encryption/scheme as cgck. > Example: json { "op": "ingest-copy", "encryption_key": "kp__xyz", "access": { "protocol": "s3", "platform": "aws", "path": "bucket-1/folder1/", "storage_endpoint": { "region": "eu-central-1" }, "cloud_credentials":{ "access_key_id": "IKIAXXX", "secret_access_key": "abcdef" } } }
encryption_key string false the encryption key to use during ingest operations
ops [FileOperation] false the file operations to be performed.

FilesJobDefaults

{
  "op": "add",
  "encryption_key": "string",
  "access": {
    "protocol": "string",
    "platform": "string",
    "path": "string",
    "storage_endpoint": {},
    "storage_options": {},
    "cloud_credentials": {}
  },
  "access_per_file": {
    "property1": {
      "protocol": "string",
      "platform": "string",
      "path": "string",
      "storage_endpoint": {},
      "storage_options": {},
      "cloud_credentials": {}
    },
    "property2": {
      "protocol": "string",
      "platform": "string",
      "path": "string",
      "storage_endpoint": {},
      "storage_options": {},
      "cloud_credentials": {}
    }
  }
}

Default values for files operation in a FilesJobCreationReq

Notes about encryption:

Example:

{
  "op": "ingest-copy",
  "encryption_key": "kp__xyz",
  "access": {
    "protocol": "s3",
    "platform": "aws",
    "path": "bucket-1/folder1/",
    "storage_endpoint": {
      "region": "eu-central-1"
    },
    "cloud_credentials":{
      "access_key_id": "IKIAXXX",
      "secret_access_key": "abcdef"
    }
  }
}

Properties

Name Type Required Description
op string false the default operation if omitted in 'op'.
encryption_key string false content encryption key or the empty string
access CloudAccess false Access definition for remote storage or Cloud.
access_per_file object false map file path to storage access for ingest-copy or add-reference operation if different from the default.
» additionalProperties CloudAccess false Access definition for remote storage or Cloud.

Enumerated Values

Property Value
op add
op ingest-copy
op add-reference

CloudAccess

{
  "protocol": "string",
  "platform": "string",
  "path": "string",
  "storage_endpoint": {},
  "storage_options": {},
  "cloud_credentials": {}
}

Access definition for remote storage or Cloud.

Properties

Name Type Required Description
protocol string false Cloud protocol (e.g. 's3')
platform string false Platform where the cloud exists (e.g. 'aws')
path string false Path to the cloud objects, including the bucket (e.g. bucket/path/)
storage_endpoint object false Endpoint to access the cloud. * format of endpoint is storage dependant. * Example: AWS Endpoint
storage_options object false Options used with the cloud. * format of options is storage dependant. * Example: AWS Options
cloud_credentials object false Credentials to access the cloud. * format of credentials is storage dependant. * Example: AWS Credentials

AwsEndpoint

{
  "host": "string",
  "port": 0,
  "protocol": "http",
  "region": "string"
}

Credentials to access the AWS cloud

Properties

Name Type Required Description
host string false Host of the endpoint (e.g. s3.amazonaws.com). Leave empty to use defaults.
port integer false Port of the endpont (leave empty to use default)
protocol string false Transport protocol
region string false AWS region (e.g. eu-central-1)

Enumerated Values

Property Value
protocol http
protocol https

AwsOptions

{
  "storage_class": "string",
  "server_side_encryption": "string",
  "server_side_encryption_key_id": "string"
}

Storage options

Properties

Name Type Required Description
storage_class string false none
server_side_encryption string false none
server_side_encryption_key_id string false none

AwsCredentials

{
  "access_key_id": "string",
  "secret_access_key": "string",
  "signed_url": "string",
  "session_token": "string",
  "iam_role_name": "string",
  "iam_role_arn": "string",
  "iam_role_external_id": "string",
  "iam_role_session_name": "string"
}

Credentials to access the AWS cloud

Properties

Name Type Required Description
access_key_id string false The AWS Access Key ID
secret_access_key string false The AWS Secret Access Key for the Access Key ID
signed_url string false An AWS signed url. When used the path in the cloud access may be left empty. The signed url is ignored if 'access_key_id' is set.
session_token string false none
iam_role_name string false none
iam_role_arn string false none
iam_role_external_id string false none
iam_role_session_name string false none

EncryptionSpec

{
  "scheme": "none"
}

encryption information

Properties

Name Type Required Description
scheme string false none

Enumerated Values

Property Value
scheme none
scheme cgck

FileOperation

{
  "op": "add",
  "path": "string",
  "type": "file",
  "security_groups": [
    "string"
  ],
  "mime_type": "string",
  "size": 0,
  "copy_move_source_path": "string",
  "link": null,
  "metadata": {
    "property1": {},
    "property2": {}
  },
  "ingest": {
    "type": "key",
    "path": "string",
    "size": 0,
    "etag": "string"
  },
  "reference": {
    "type": "key",
    "path": "string",
    "size": 0,
    "etag": "string"
  },
  "encryption": {
    "scheme": "none"
  }
}

Add file:

{
  "op": "add",
  "type": "file",
  "path": "images/logo_small.png",
  "mime_type": "image/png",
  "size": 14525
}

Add directory:

{
  "op": "add",
  "type": "directory",
  "path": "empty_folder"
}

Add link:

{
  "op": "add",
  "type": "link",
  "path": "images/logo.png",
  "link": {
    "/": "./files/images/logo_large.png"
  },
  "mime_type": "application/custom-png"
}

Delete file, directory or link:

{
  "op": "del",
  "path": "images/logo.png"
}

Move file or link:

{
  "op": "move",
  "copy_move_source_path": "images/logo.png",
  "path": "images/logo_renamed.png"
}

Copy a file or link:

{
  "op": "copy",
  "copy_move_source_path": "images/logo.png",
  "path": "images/logo_copy.png"
}

Ingest-copy a file or files:

{
  "op": "ingest-copy",
  "ingest": {
    "type":"key",
    "source":"images/en/logo.png"
  },
  "path": "images/logo_copy.png"
}

{
  "op": "ingest-copy",
  "ingest": {
    "type":"folder",
    "source":"images/en/"
  },
  "path": "images"
}

An operation to add, move, copy or delete files, directories or symbolic links. The operation op defaults to add if omitted and the type type defaults to file.

add

Adds a new file, directory or link.

del

Deletes the file, link or directory at path. Deleting a directory first removes all files in the directory.

move

Moves (renames) the file or link at copy_move_source_path to the new path.

copy

Creates a copy of the file or link at copy_move_source_path at the new path path.

ingest-copy

Creates a copy of the file or of files at ingest/source at the new path path.

add-reference

Creates a reference to the file or to files at reference/source at the new path path.

Properties

Name Type Required Description
op string false The operation to perform. Defaults to add if omitted.
path string true Target path of the file. This is the path at which the file will be available for subsequent download. The root path is /, path segments are separated by /. Example: /html/index.html.
type string false The type. Defaults to file if omitted.
security_groups [string] false The security groups
mime_type string false The Mime-Type that will be returned as Content-Type header by the file download API.
size integer false The size of the file in bytes. Required for add operations.
copy_move_source_path string false The source path required for copy or move operations.
link FileLink false a file link
metadata object false custom file metadata (nested objects not supported)
» additionalProperties object false none
ingest ExternalRef false the ingest source for ingest file operation
reference ExternalRef false the referenced source for add-reference file operation
encryption EncryptionSpec false encryption information for the file

Enumerated Values

Property Value
op add
op del
op copy
op move
op mod
op ingest-copy
op add-reference
type file
type directory
type link

Relative file link:

{
  "/": "./files/logos"
}

Absolute file link:

{
  "/": "/qfab/hq__ABC/files/global_assets/logos/corp_logo1.png"
}

A symbolic link to another file or directory. A link is a JSON object with the special "/" property, whose value contains the link's target (i.e. what it points to).

The target of a relative file link always starts with the ./files link selector, followed by the absolute path of a file or directory in the same Content Object's file hierarchy.

The target of an absolute file link always starts with /qfab/qh__ABC/files, followed by the absolute path of a file or directory in the target content object and where

Properties

Name Type Required Description
anonymous string false The link's target

FilesJobResumeReq

{
  "defaults": {
    "op": "add",
    "encryption_key": "string",
    "access": {
      "protocol": "string",
      "platform": "string",
      "path": "string",
      "storage_endpoint": {},
      "storage_options": {},
      "cloud_credentials": {}
    },
    "access_per_file": {
      "property1": {
        "protocol": "string",
        "platform": "string",
        "path": "string",
        "storage_endpoint": {},
        "storage_options": {},
        "cloud_credentials": {}
      },
      "property2": {
        "protocol": "string",
        "platform": "string",
        "path": "string",
        "storage_endpoint": {},
        "storage_options": {},
        "cloud_credentials": {}
      }
    }
  },
  "clear_resolve": true
}

Used to resume ingest jobs. It is similar to FilesJobCreationReq but contains only defaults (e.g. with cloud access) and encryption key.

Properties

Name Type Required Description
defaults FilesJobDefaults false Default values for files operation in a FilesJobCreationReq Notes about encryption: * The string representing the encryption key is the KID of a primary key. For encrypting it is not necessary to include the secret key in the primary key sent to the API. * Also - even if the defaults include an encryption key, each file op must specify its encryption/scheme as cgck. > Example: json { "op": "ingest-copy", "encryption_key": "kp__xyz", "access": { "protocol": "s3", "platform": "aws", "path": "bucket-1/folder1/", "storage_endpoint": { "region": "eu-central-1" }, "cloud_credentials":{ "access_key_id": "IKIAXXX", "secret_access_key": "abcdef" } } }
clear_resolve boolean false set to true to clear resolution errors (e.g. to remove erroneous ingest paths)

FilesJobResumeRes

{
  "failed_ops": [
    {
      "op": {
        "op": "add",
        "path": "string",
        "type": "file",
        "security_groups": [
          "string"
        ],
        "mime_type": "string",
        "size": 0,
        "copy_move_source_path": "string",
        "link": null,
        "metadata": {
          "property1": {},
          "property2": {}
        },
        "ingest": {
          "type": "key",
          "path": "string",
          "size": 0,
          "etag": "string"
        },
        "reference": {
          "type": "key",
          "path": "string",
          "size": 0,
          "etag": "string"
        },
        "encryption": {
          "scheme": "none"
        }
      },
      "error": "string"
    }
  ]
}

Properties

Name Type Required Description
failed_ops [FailedIngest] false operations that were cleared because of a failure

FailedIngest

{
  "op": {
    "op": "add",
    "path": "string",
    "type": "file",
    "security_groups": [
      "string"
    ],
    "mime_type": "string",
    "size": 0,
    "copy_move_source_path": "string",
    "link": null,
    "metadata": {
      "property1": {},
      "property2": {}
    },
    "ingest": {
      "type": "key",
      "path": "string",
      "size": 0,
      "etag": "string"
    },
    "reference": {
      "type": "key",
      "path": "string",
      "size": 0,
      "etag": "string"
    },
    "encryption": {
      "scheme": "none"
    }
  },
  "error": "string"
}

Properties

Name Type Required Description
op FileOperation false > Add file: json { "op": "add", "type": "file", "path": "images/logo_small.png", "mime_type": "image/png", "size": 14525 } > Add directory: json { "op": "add", "type": "directory", "path": "empty_folder" } > Add link: json { "op": "add", "type": "link", "path": "images/logo.png", "link": { "/": "./files/images/logo_large.png" }, "mime_type": "application/custom-png" } > Delete file, directory or link: json { "op": "del", "path": "images/logo.png" } > Move file or link: json { "op": "move", "copy_move_source_path": "images/logo.png", "path": "images/logo_renamed.png" } > Copy a file or link: json { "op": "copy", "copy_move_source_path": "images/logo.png", "path": "images/logo_copy.png" } > Ingest-copy a file or files: json { "op": "ingest-copy", "ingest": { "type":"key", "source":"images/en/logo.png" }, "path": "images/logo_copy.png" } { "op": "ingest-copy", "ingest": { "type":"folder", "source":"images/en/" }, "path": "images" } An operation to add, move, copy or delete files, directories or symbolic links. The operation op defaults to add if omitted and the type type defaults to file. ### add Adds a new file, directory or link. * Adding a file will result in an upload job for the file's data. size and path are mandatory. * Directories are usually created as needed from the paths of files and links, but may also be explicitly created with type directory. This is especially useful to create empty directories. * A Link behaves like a symbolic link in Unix filesystems: it points to another file or directory (its target). Downloading a Link will actually download the content of its target. See file links for details. Also, a link allows overriding the mime_type and security_groups properties of the target. ### del Deletes the file, link or directory at path. Deleting a directory first removes all files in the directory. ### move Moves (renames) the file or link at copy_move_source_path to the new path. ### copy Creates a copy of the file or link at copy_move_source_path at the new path path. ### ingest-copy Creates a copy of the file or of files at ingest/source at the new path path. ### add-reference Creates a reference to the file or to files at reference/source at the new path path.
error string false none

FilesJobCreationRes

{
  "id": "iqfj16SKDCEjA3qkN3trengGMW",
  "jobs": [
    "iqfuREaBmkZxonEiiFAXtj9cxC",
    "iqfu6ktBZcJNvXmbQt8N2riZtg"
  ]
}

Properties

None

FilesJobCreationStatusRes

{
  "id": "iqfj16SKDCEjA3qkN3trengGMW",
  "seqs": [
    1,
    2,
    3
  ],
  "seq_complete": true
}

represents the status of a 'files job' creation

Properties

Name Type Required Description
id string false the id of the files job
seqs [integer] false list of items already received in the files job sequence
seq_complete boolean false true if the files job sequence is complete
status string false IN_PROGRESS
error string false error string
add_reference AddReferenceStatus false status of the add-reference operations
ingest_copy IngestCopyStatus false status of the ingest-copy operations

FilesJobUploadsRes

{
  "id": "iqfj16SKDCEjA3qkN3trengGMW",
  "jobs": [
    "iqfuREaBmkZxonEiiFAXtj9cxC",
    "iqfu6ktBZcJNvXmbQt8N2riZtg"
  ]
}

Contains upload job IDs. When received in response to a Files Job creation request, the upload job IDs are present only in case the request was a single batch.

Properties

Name Type Required Description
id string false the id of the files job
jobs [string] false list of upload jobs ids
error string false summary of any error found

FilesUploadJobRes

{
  "id": "iqfuREaBmkZxonEiiFAXtj9cxC",
  "next": 1,
  "total": 2,
  "files": [
    {
      "path": "string",
      "size": 123,
      "off": 0,
      "len": 123,
      "rem": 0
    }
  ]
}

Properties

Name Type Required Description
id string false the id of the upload job
next integer false the index of the next file that can be retrieved to continue the list
total integer false the total number of files in the upload jobs
files [FileChunk] false [status of a file in an upload job]

FileChunk

{
  "path": "string",
  "size": 0,
  "off": 0,
  "len": 0,
  "skip": 0,
  "rem": 0,
  "encrypted": {
    "size": 0,
    "off": 0,
    "len": 0,
    "skip": 0,
    "rem": 0
  },
  "external_ref": {
    "path": "string",
    "off": 0,
    "len": 0
  }
}

status of a file in an upload job

Properties

Name Type Required Description
path string false path of the file
size integer false number of bytes in the source file
off integer false offset in the file at which to start the upload
len integer false number of file bytes to upload
skip integer false the number of bytes to skip when resuming an upload
rem integer false the remaining number of bytes to upload
encrypted Encrypted false upload information of encrypted file
external_ref FileExternalRef false the external reference for ingest-copy or add-reference

Encrypted

{
  "size": 0,
  "off": 0,
  "len": 0,
  "skip": 0,
  "rem": 0
}

upload information of encrypted file

Properties

Name Type Required Description
size integer false number of bytes of the encrypted source file
off integer false offset in the encrypted file at which to start the upload
len integer false number of encrypted file bytes to upload
skip integer false the number of encrypted bytes to skip when resuming an upload
rem integer false the remaining number of bytes to upload

FileExternalRef

{
  "path": "string",
  "off": 0,
  "len": 0
}

the external reference for ingest-copy or add-reference

Properties

Name Type Required Description
path string false path of the file
off integer false offset in the file at which to start the ingest
len integer false number of file bytes to ingest

UploadJob

{
  "id": "iqfuBzVpvomEYEDM6N5Xy1JVAW",
  "files": [
    {
      "path": "/var/log/messages",
      "size": 1024,
      "off": 0,
      "len": 1024,
      "lb": 2
    }
  ]
}

an upload job represents files to upload together

Properties

Name Type Required Description
id string false the id of the upload job
files [FileChunk] false [status of a file in an upload job]

FilesUploadRes

{
  "upload_jobs": [
    {
      "id": "iqfuBzVpvomEYEDM6N5Xy1JVAW",
      "files": [
        {
          "path": "/var/log/messages",
          "size": 1024,
          "off": 0,
          "len": 1024,
          "rem": 1024
        }
      ]
    }
  ]
}

response to a create jobs or job status requests

Properties

Name Type Required Description
upload_jobs [UploadJob] false [an upload job represents files to upload together]

ExternalRef

{
  "type": "key",
  "path": "string",
  "size": 0,
  "etag": "string"
}

Properties

Name Type Required Description
type string false The source type. * key: the source is a single file * folder the source is a folder. Only direct children files in the folder are ingested. * prefix the source consists in all files whose paths starts with the given prefix, hence looking as a recursive folder.
path string false the external source path (ingest or reference)
size integer false the size of the file as stated by the system. This is a server provided field.
etag string false the etag of the file as stated by the system. This is a server provided field.

Enumerated Values

Property Value
type key
type folder
type prefix

AddReferenceStatus

{
  "done": true,
  "progress": {
    "total": 0,
    "completed": 0
  }
}

status of the add-reference operations

Properties

Name Type Required Description
done boolean false true if all references were resolved
progress Progress false none

Progress

{
  "total": 0,
  "completed": 0
}

Properties

Name Type Required Description
total integer false count of total
completed integer false count of completed

IngestCopyStatus

{
  "done": true,
  "progress": {
    "files": {
      "total": 0,
      "completed": 0,
      "failed": 0,
      "in_progress": 0,
      "details": {
        "property1": {
          "size": 0,
          "written": 0,
          "percent": 0
        },
        "property2": {
          "size": 0,
          "written": 0,
          "percent": 0
        }
      }
    },
    "bytes": {
      "total": 0,
      "completed": 0
    }
  }
}

status of the ingest-copy operations

Properties

Name Type Required Description
done boolean false true if all references were resolved
progress IngestCopyProgress false none

IngestCopyProgress

{
  "files": {
    "total": 0,
    "completed": 0,
    "failed": 0,
    "in_progress": 0,
    "details": {
      "property1": {
        "size": 0,
        "written": 0,
        "percent": 0
      },
      "property2": {
        "size": 0,
        "written": 0,
        "percent": 0
      }
    }
  },
  "bytes": {
    "total": 0,
    "completed": 0
  }
}

Properties

Name Type Required Description
files FilesProgress false none
bytes Progress false none

FilesProgress

{
  "total": 0,
  "completed": 0,
  "failed": 0,
  "in_progress": 0,
  "details": {
    "property1": {
      "size": 0,
      "written": 0,
      "percent": 0
    },
    "property2": {
      "size": 0,
      "written": 0,
      "percent": 0
    }
  }
}

Properties

Name Type Required Description
total integer false count of total files
completed integer false count of completed files
failed integer false count of failed files
in_progress integer false count of in-progress files
details object false none
» additionalProperties FileProgress false none

FileProgress

{
  "size": 0,
  "written": 0,
  "percent": 0
}

Properties

Name Type Required Description
size integer false file size in bytes
written integer false count of written bytes
percent number false percent of completion (a float in [0.0, 100.0])

QVersion

{
  "id": "string",
  "hash": "string",
  "type": "string",
  "meta": {
    "Type": "movie",
    "Title": "Loop the Hoop",
    "Year": "1999",
    "Released": "17 Jun 1999",
    "Runtime": "99 min",
    "Rated": "PG",
    "Genres": [
      "Animation",
      "Comedy"
    ],
    "Directors": [
      {
        "name": "Andrew Hooper",
        "role": "director"
      },
      {
        "name": "Jackie Looper",
        "role": "co-director"
      }
    ],
    "Writers": [
      {
        "name": "Andrew Hooper",
        "roles": [
          "original story",
          "screenplay"
        ]
      },
      {
        "name": "Victoria Ringer",
        "roles": [
          "original story"
        ]
      }
    ],
    "Actors": [
      "Billy the Kid",
      "Jack and Jill",
      "Peter Pumpkin"
    ],
    "Languages": [
      "English",
      "Indonesian"
    ],
    "Country": "USA",
    "Poster": "MV5zg4MjM2NDQ4MV5nBnXkFtZTgwMzgy.jpg"
  },
  "size_stats": {
    "parts": 5,
    "size": "575 B",
    "size_bytes": 575
  }
}

Information about a content version.

Properties

Name Type Required Description
id string false The content ID
hash string false The content hash
type string false The hash of another content containing custom bitcode
meta QMeta false Arbitrary content metadata. Can be any valid JSON structure.
size_stats SizeStats false Size statistics for the content or content object.

QVersions

{
  "id": "iq__6D1qLem852ggNcEYcAyvgT",
  "versions": [
    {
      "id": "iq__6D1qLem852ggNcEYcAyvgT",
      "hash": "hq__QmctSY6kRDT1GJ7S69W7Ta7PEsvyWCCZahTFDAxXmjQXXh",
      "type": "hq__QmRDQwpgAMkc3TDsnvwmv2VSgg3zqNNFcMWKSdxxMX4QxU",
      "size_stats": {
        "parts": 5,
        "size": "675 B",
        "size_bytes": 675
      }
    },
    {
      "id": "iq__6D1qLem852ggNcEYcAyvgT",
      "hash": "hq__QmZPdxKM4wyvHG4En3LoAtZ9cQE9KL2MVNsEN17etCN2cA",
      "type": "hq__QmRDQwpgAMkc3TDsnvwmv2VSgg3zqNNFcMWKSdxxMX4QxU",
      "size_stats": {
        "parts": 5,
        "size": "575 B",
        "size_bytes": 575
      }
    }
  ],
  "size_stats": {
    "parts": 8,
    "size": "1.1 KB",
    "size_bytes": 1150
  }
}

Properties

Name Type Required Description
id string false The content ID
versions [QVersion] false [Information about a content version.]
size_stats SizeStats false Size statistics for the content or content object.

QCreateReq

{
  "type": "hq__QmRDQwpgAMkc3TDsnvwmv2VSgg3zqNNFcMWKSdxxMX4QxU",
  "meta": {
    "genre": "sci-fi",
    "year": "2018"
  },
  "copy_from": "hq__QmPLzvrE9cmWJv6wcXczTwRsYok8znbnKMjYjd8gAUtJgD"
}

Properties

Name Type Required Description
type string false The hash of another content containing custom bitcode
meta QMeta false Arbitrary content metadata. Can be any valid JSON structure.
copy_from string false The hash of a source content object. If provided, the new draft content object will be initialized with the content (metadata and parts) of the source content object.

QCreateRes

{
  "id": "iq__EigNHQ5cFjBFjTtrG39Yco",
  "type": "hq__QmRDQwpgAMkc3TDsnvwmv2VSgg3zqNNFcMWKSdxxMX4QxU",
  "write_token": "tqw_GAQdkSsjXirpDpWsADWQTxbZMsVxwcPK9"
}

Properties

Name Type Required Description
id string true The content ID
type string true The content type
write_token string true The content write token. It can be used to modify metadata, upload content parts, and finalize it.

QPartList

{
  "content": {
    "id": "iq__6D1qLem852ggNcEYcAyvgT",
    "hash": "hq__QmctSY6kRDT1GJ7S69W7Ta7PEsvyWCCZahTFDAxXmjQXXh",
    "type": "hq__QmRDQwpgAMkc3TDsnvwmv2VSgg3zqNNFcMWKSdxxMX4QxU"
  },
  "parts": [
    {
      "hash": "hqp_QmYw62E6J1wUQbJrqVbbttR1Bun5KQmUJAfPks6Ctx37Bx",
      "size": 8
    },
    {
      "hash": "hqp_QmSbmmRGN6rEVTh641Lb7mCzutXz3QrDnKGB4D31DkNTEy",
      "size": 6
    },
    {
      "hash": "hqp_QmVqc4HyLnbcZL6AdY22RuAUYJ3mCcHBnd2hz4mymKjPWf",
      "size": 6
    },
    {
      "hash": "hqp_QmepV9tKHRwvhusx5LfU6eZRXEnpX6XyjdkAUBNs1gBECE",
      "size": 6
    }
  ]
}

Properties

Name Type Required Description
content QInfo false none
parts [PartInfo] false none

QPartInfo

{
  "content": {
    "id": "iq__6D1qLem852ggNcEYcAyvgT",
    "write_token": "tqw_EGheZaihN4Z1DX3VE6EVGLHiSWZSM6j4n",
    "type": "hq__QmRDQwpgAMkc3TDsnvwmv2VSgg3zqNNFcMWKSdxxMX4QxU"
  },
  "part": {
    "hash": "hqp_QmYw62E6J1wUQbJrqVbbttR1Bun5KQmUJAfPks6Ctx37Bx -- if finalized",
    "write_token": "tqp_8qqHM6Jbx6JWDbpRjmvMVg6BpmnirFfBhS9s -- if draft",
    "size": 8587043
  }
}

Properties

Name Type Required Description
content QInfo false none
part PartInfo false none

QPartProofs

{
  "root_hash": "c7ca499116e787efed246946d3461c70982c045c2b4df2b53cef32d5e122f11f",
  "proofs": [
    {
      "byte_beg": 0,
      "byte_end": 10,
      "proof": [
        "c7ca499116e787efed246946d3461c70982c045c2b4df2b53cef32d5e122f11f"
      ]
    }
  ],
  "proof_data": {
    "c7ca499116e787efed246946d3461c70982c045c2b4df2b53cef32d5e122f11f": "+FyhIDUHLBrlRjUOC/p6sR1J3G8SnnLM1X7H62cSJbvRl8jxuDgAAAAAAAAAAAAAAAAAAAAACgAAAAAAAAA1Bywa5UY1Dgv6erEdSdxvEp5yzNV+x+tnEiW70ZfI8Q=="
  }
}

Properties

Name Type Required Description
root_hash string false The proof root hash of the part.
proofs [PartProof] false none
proof_data object false The combined keys and values of the proofs of the part.

PartProof

{
  "byte_beg": 0,
  "byte_end": 0,
  "proof": [
    "string"
  ]
}

Properties

Name Type Required Description
byte_beg integer false The starting byte number of the proof data range.
byte_end integer false The ending byte number of the proof data range.
proof [string] false none

QInfo

{
  "id": "iq__6D1qLem852ggNcEYcAyvgT",
  "write_token": "tqw_EGheZaihN4Z1DX3VE6EVGLHiSWZSM6j4n",
  "type": "hq__QmRDQwpgAMkc3TDsnvwmv2VSgg3zqNNFcMWKSdxxMX4QxU",
  "size_stats": {
    "parts": 5,
    "size": "575 B",
    "size_bytes": 575
  }
}

Properties

Name Type Required Description
id string false The content ID.
hash string false The content hash (if finalized).
write_token string false The content write token (if a draft content).
type string false The content type.
qlib_id string false The content library.
size_stats SizeStats false Size statistics for the content or content object.

QAudit

{
  "id": "iq__GRpjaXYVqvPdHqnpLYBb5N",
  "hash": "hq__tUTXn4yZ1RtrscF5AVjdFS2u9WAtbqris46QWHUERugopgcWHCoa74v8fDc9ZtU7Udzt",
  "salt": "aGVsbG93b3JsZA==",
  "samples": [
    0.2,
    0.4,
    0.8
  ],
  "audit_hash": "KJhme-dRxpkHAH7U-ZlCqkYdhQbOG3gc_eEvWbJgK2A="
}

Properties

Name Type Required Description
id string false The content ID.
hash string false The content hash.
salt string false The base64-encoded salt.
samples [number] false none
audit_hash string false The base64-encoded audit hash.

PartInfo

{
  "hash": "string",
  "write_token": "string",
  "size": 0
}

Properties

Name Type Required Description
hash string false The content part hash (if finalized).
write_token string false The content part write token (if draft part).
size integer false The size of the part in bytes.

SizeStats

{
  "parts": 5,
  "size": "575 B",
  "size_bytes": 575
}

Size statistics for the content or content object.

Properties

Name Type Required Description
parts integer false The number of content parts.
size string false The aggregate size of the content parts in human readable format.
size_bytes integer false The aggregate size of the content parts.

QSpaceConfigRes

{
  "node_id": "inod3jzKHgsuaBu3cqKu7t4N2fLLdkC4",
  "network": {
    "id": "inetGhR8rniCY8Uzgj8xNHyUBS",
    "seed_nodes": {
      "fabric_api": [
        "https://host-64-146-28-142.test.contentfabric.io",
        "https://host-64-145-252-6.test.contentfabric.io",
        "https://host-64-133-145-232.test.contentfabric.io"
      ],
      "ethereum_api": [
        "https://host-64-146-28-142.test.contentfabric.io/eth/",
        "https://host-64-145-252-6.test.contentfabric.io/eth/",
        "https://host-64-133-145-232.test.contentfabric.io/eth/"
      ]
    },
    "authority": {
      "type": "",
      "ethereum": null
    }
  },
  "qspace": {
    "id": "ispc2zqa4gZ8N3DH1QWakR2e5UowDLF1",
    "names": [
      "main"
    ],
    "type": "Ethereum",
    "ethereum": {
      "network_id": 955210,
      "url": "http://127.0.0.2:8545",
      "public_key": "knodwQV5xpcEenkCmhL8TRUREYwyWKpiJgGMxU2iodxtcbiP",
      "rpc_seed_nodes": [
        "64.137.243.135:8545",
        "64.136.19.5:8545"
      ]
    }
  }
}

Configuration of a QSpace

Properties

Name Type Required Description
node_id string false ID of the node who responded
network object false The network this node belongs to
» id string false ID of the network
» seed_nodes object false seed nodes of the network
»» fabric_api [string] false the seed URLs for the fabric API
»» ethereum_api [string] false the seed URLs for the ethereum API
» authority object false The network authority
»» type string false The type of authority (e.g. 'ethereum')
»» ethereum object false The ethereum authority (if type is 'ethereum')
»»» network_id integer false the Ethereum network ID
»»» url string false the Ethereum URL
»»» rpc_seed_nodes [string] false none
»»» seed_peers [string] false none
»»» genesis object false none
»» qspace object false The QSpace
»»» id string false the ID of the QSpace
»»» type string false the type of the QSpace - e.g. 'Ethereum'
»»» names [string] false the names assigned to this QSpace
»»» ethereum object false The ethereum authority (if type is 'ethereum')
»»»» network_id integer false the Ethereum network ID
»»»» url string false the Ethereum URL

SpaceMeta

{}

Arbitrary content space metadata. Can be any valid JSON structure.

Properties

None

QSpaceMeta

{
  "name": "ACME Content Space",
  "description": "A private content space for ACME, Inc."
}

Arbitrary content space metadata. Can be any valid JSON structure.

Properties

Name Type Required Description
additionalProperties object false none

LibMeta

{}

Arbitrary content library metadata. Can be any valid JSON structure.

Properties

None

QLibMeta

{
  "name": "ACME Advertisement Library",
  "description": "A collection of all advertisement material produced for ACME, Inc."
}

Arbitrary public content library metadata. Can be any valid JSON structure. Public metadata is stored in the content space and is searchable.

Properties

Name Type Required Description
additionalProperties object false none

Meta

{}

Arbitrary content metadata. Can be any valid JSON structure.

Properties

None

QMeta

{
  "Type": "movie",
  "Title": "Loop the Hoop",
  "Year": "1999",
  "Released": "17 Jun 1999",
  "Runtime": "99 min",
  "Rated": "PG",
  "Genres": [
    "Animation",
    "Comedy"
  ],
  "Directors": [
    {
      "name": "Andrew Hooper",
      "role": "director"
    },
    {
      "name": "Jackie Looper",
      "role": "co-director"
    }
  ],
  "Writers": [
    {
      "name": "Andrew Hooper",
      "roles": [
        "original story",
        "screenplay"
      ]
    },
    {
      "name": "Victoria Ringer",
      "roles": [
        "original story"
      ]
    }
  ],
  "Actors": [
    "Billy the Kid",
    "Jack and Jill",
    "Peter Pumpkin"
  ],
  "Languages": [
    "English",
    "Indonesian"
  ],
  "Country": "USA",
  "Poster": "MV5zg4MjM2NDQ4MV5nBnXkFtZTgwMzgy.jpg"
}

Arbitrary content metadata. Can be any valid JSON structure.

Properties

Name Type Required Description
additionalProperties object false none

BcRes

{
  "status": 0,
  "headers": {},
  "body": "string",
  "content_length": 0,
  "byte_range": {
    "off": 0,
    "len": 0
  }
}

Properties

Name Type Required Description
status integer false The status code.
headers object false Response headers.
body string false The content write token (if a draft content).
content_length integer false Length of the response body.
byte_range object false Byte range (if applicable).
» off integer false offset of the response
» len integer false length of the response

PagingRes

{
  "first": "0",
  "last": "10",
  "next": "5",
  "previous": "0",
  "items": 12,
  "current": 0,
  "pages": 3,
  "limit": 5
}

Paging information returned for API requests that support result paging.

Properties

Name Type Required Description
first integer true Index of the first page.
last integer true Index of the last page.
next integer true Index of the next page.
previous integer true Index of the previous page.
items integer true The total number of items available.
current integer true Index of the first item in the result set.
pages integer true The total number of available pages.
limit integer true The pagesize that was used in the request.

ObjectGraph

{
  "root": {
    "qid": "iq__AAA",
    "hash_or_token": "hq__AAA"
  },
  "object_dag": {
    "hq__AAA": [
      "hq__BBB",
      "hq__CCC"
    ],
    "hq__BBB": [
      "hq__DDD"
    ],
    "hq__CCC": [],
    "hq__DDD": []
  },
  "auto_updates": {
    "order": [
      "hq__BBB",
      "hq__AAA"
    ],
    "links": {
      "hq__BBB": [
        {
          "hash": "hq__BBB",
          "path": "/public/links/link1",
          "current": {
            "/": "/qfab/hq__CCC/meta/public/name",
            ".": {
              "auto_update": {
                "tag": "latest"
              }
            }
          },
          "updated": {
            "/": "/qfab/hq__EEE/meta/public/name",
            ".": {
              "auto_update": {
                "tag": "latest"
              }
            }
          }
        }
      ]
    }
  },
  "details": {
    "hq__AAA": {
      "qid": "iq__AAA",
      "meta": {
        "public": {
          "name": "The Evening Before",
          "version": "2.0"
        }
      }
    },
    "hq__BBB": {
      "qid": "iq__BBB",
      "meta": {
        "public": {
          "name": "The Ring of the Lords",
          "version": "1.0"
        }
      }
    }
  },
  "errors": [
    {
      "qid": "iq__AAA",
      "hash_or_token": "hq__AAA",
      "error": {
        "kind": "permission denied",
        "op": "read meta",
        "link": {}
      }
    }
  ]
}

Properties

Name Type Required Description
root object false Information about the root content object (i.e. the object for which the graph was created).
» qid string false The content ID of the root content object.
» hash_or_token string false The version hash or write token of the root content object.
object_dag object true The directed object graph formed by absolute links in metadata. Both the keys and the array items are content object hashes.
» additionalProperties [string] false none
auto_updates object true Optional information about auto-update links.
» order [string] false The order in which updates have to be performed in order to get a fully up-to-date object hierarchy. The first item in the array is the hash of the content object that needs to be updated first.
» links object false Information about the specific links that need to be updated.
»» additionalProperties [object] false none
»»» hash string true The hash of the content object in which the link is defined.
»»» path string true The path at which the link is defined.
»»» current Link true The current link, pointing to the out-of-date target object version.
»»» updated Link true The link to the updated target version (i.e. "current" should be replaced with "updated").
»» details object true Details about each content version listed in the object DAG, keyed by content hash.
»»» additionalProperties object false none
»»»» qid string true The content ID.
»»»» meta Meta true Selected content metadata.
»»» errors [LinkResolutionError] false Link resolution errors.

LinkResolutionError

{
  "qid": "iq__AAA",
  "hash_or_token": "hq__AAA",
  "error": {
    "kind": "permission denied",
    "op": "read meta",
    "link": {}
  }
}

A link resolution error. Content ID, hash or token are the ones of the source content object where the erroneous link is located. The link is included in the error.

Properties

Name Type Required Description
qid string false The content ID of the source content object where the erroneous link is located.
hash_or_token string false The version hash or write token of the source content object.
error Error false none

{
  "/": "/qfab/hq__CCC/meta/public/name",
  ".": {
    "auto_update": {
      "tag": "latest"
    },
    "container": "hq__AAA"
  }
}

A relative or absolute link.

Properties

Name Type Required Description
url string false The link target
. object false Internal link properties.
» auto_update object false Auto-update information.
»» tag string false The tag of the target content version.
» container string false The content hash or content write token of the object that contains the link.

QMetaOptions

{
  "resolve": true,
  "resolve_ignore_errors": true,
  "resolve_include_source": true,
  "select": [
    "/select/path/1",
    "/select/path/2"
  ],
  "remove": [
    "/remove/path/1",
    "/remove/path/2"
  ],
  "link_depth": 2
}

Options for metadata queries

Properties

Name Type Required Description
resolve boolean false If specified, all meta links in target metadata are resolved.
resolve_ignore_errors boolean false If specified, link resolution errors are ignored, and instead of the target metadata, the link itself is returned and annotated with the error that occured during link resolution.
resolve_include_source boolean false If specified, inlined metadata of resolved meta links is annotated with the source of the metadata: ".":{"source":"HASH_OR_TOKEN"}
link_depth integer false If specified, absolute meta links in target metadata are resolved up to this depth.
select [string] false Metadata paths to subtrees to retrieve.
remove [string] false Metadata paths of the subtrees to remove from the result.
query [string] false JSONPath-like query for metadata.

Errors

[
  {
    "op": "string",
    "kind": "string",
    "cause": {},
    "stacktrace": [
      "string"
    ],
    "property1": {},
    "property2": {}
  }
]

Properties

Name Type Required Description
anonymous [Error] false none

Error

{
  "op": "string",
  "kind": "string",
  "cause": {},
  "stacktrace": [
    "string"
  ],
  "property1": {},
  "property2": {}
}

Properties

Name Type Required Description
additionalProperties object false none
op string false The operation that caused the error.
kind string false The kind or error.
cause object false The cause of the error.
stacktrace [string] false An optional stacktrace.

ErrorRes

{
  "errors": [
    {
      "op": "authentication",
      "kind": "invalid",
      "cause": "authorization header missing",
      "stacktrace": "..."
    }
  ]
}

Properties

Name Type Required Description
errors Errors true none