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.net955210.contentfabric.io/config \
  -H 'Accept: application/json'

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

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

};

$.ajax({
  url: 'https://main.net955210.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.net955210.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.net955210.contentfabric.io/config',
  params: {
  }, headers: headers

p JSON.parse(result)

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

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

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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.net955304.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

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
elvgeo eu-west

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.net955210.contentfabric.io/qspace/meta \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

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

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

};

$.ajax({
  url: 'https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qspace/meta', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qspace/meta \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PUT https://main.net955210.contentfabric.io/qspace/meta HTTP/1.1
Host: main.net955210.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.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qspace/meta', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qspace/meta/{path} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

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

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

};

$.ajax({
  url: 'https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qspace/meta/{path}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qspace/meta/{path} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PUT https://main.net955210.contentfabric.io/qspace/meta/{path} HTTP/1.1
Host: main.net955210.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.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qspace/meta/{path}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

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

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

};

$.ajax({
  url: 'https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://main.net955210.contentfabric.io/qlibs HTTP/1.1
Host: main.net955210.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.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PUT https://main.net955210.contentfabric.io/qlibs/{qlibid} HTTP/1.1
Host: main.net955210.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.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

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

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

};

$.ajax({
  url: 'https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

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

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

};

$.ajax({
  url: 'https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/meta \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

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

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

};

$.ajax({
  url: 'https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/meta', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/meta \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PUT https://main.net955210.contentfabric.io/qlibs/{qlibid}/meta HTTP/1.1
Host: main.net955210.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.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/meta', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/meta/{path} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

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

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

};

$.ajax({
  url: 'https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/meta/{path}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/meta/{path} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PUT https://main.net955210.contentfabric.io/qlibs/{qlibid}/meta/{path} HTTP/1.1
Host: main.net955210.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.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/meta/{path}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

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

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

};

$.ajax({
  url: 'https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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
  &cache_id=982c0089-c12f-4316-834d-b5599aa8fb98

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.
cache_id query string false Caching identifier. Use the cache_id returned in the previous result for faster execution of the next query.

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.

cache_id: Caching identifier. Use the cache_id returned in the previous result for faster execution of the next query. Omitting the cache_id will trigger full retrieval of a new result set.

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": {
    "cache_id": "982c0089-c12f-4316-834d-b5599aa8fb98",
    "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.net955210.contentfabric.io/qlibs/{qlibid}/q \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://main.net955210.contentfabric.io/qlibs/{qlibid}/q HTTP/1.1
Host: main.net955210.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.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qid} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PUT https://main.net955210.contentfabric.io/qlibs/{qlibid}/q/{qid} HTTP/1.1
Host: main.net955210.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.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qid}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/data HTTP/1.1
Host: main.net955210.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.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/data', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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": "tqpwJzPucS2FGswgD4PMahLi7PqBVn2oLhNAy -- 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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qwtoken} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

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

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

};

$.ajax({
  url: 'https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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"
}

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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qhash} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

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

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

};

$.ajax({
  url: 'https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qhash}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qhit} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

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

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

};

$.ajax({
  url: 'https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qhit}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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.

Detailed descriptions

qhit: A content hash, ID or write token.

Example responses

200 Response

{
  "id": "iq__6D1qLem852ggNcEYcAyvgT",
  "write_token": "tqw_EGheZaihN4Z1DX3VE6EVGLHiSWZSM6j4n",
  "type": "hq__QmRDQwpgAMkc3TDsnvwmv2VSgg3zqNNFcMWKSdxxMX4QxU"
}

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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qhit} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

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

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

};

$.ajax({
  url: 'https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qhit}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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"

Download Part

Code samples

# You can also use wget
curl -X GET https://main.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qhit}/data/{qphash} HTTP/1.1
Host: main.net955210.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.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qhit}/data/{qphash}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qhit}/data/{qphash}/proofs HTTP/1.1
Host: main.net955210.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.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qhit}/data/{qphash}/proofs', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qhit}/parts \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

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

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

};

$.ajax({
  url: 'https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qhit}/parts', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/parts \
  -H 'Content-Type: application/octet-stream' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://main.net955210.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/parts HTTP/1.1
Host: main.net955210.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.net955210.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',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955210.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',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://main.net955210.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',
  'Authorization': 'Bearer {access-token}'
}

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

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://main.net955210.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',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

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

try {
    $response = $client->request('POST','https://main.net955210.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.
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.

Example responses

201 Response

{
  "content": {
    "id": "iq__6D1qLem852ggNcEYcAyvgT",
    "write_token": "tqw_EGheZaihN4Z1DX3VE6EVGLHiSWZSM6j4n",
    "type": "hq__QmRDQwpgAMkc3TDsnvwmv2VSgg3zqNNFcMWKSdxxMX4QxU"
  },
  "part": {
    "hash": "hqp_QmYw62E6J1wUQbJrqVbbttR1Bun5KQmUJAfPks6Ctx37Bx -- if finalized",
    "write_token": "tqpwJzPucS2FGswgD4PMahLi7PqBVn2oLhNAy -- 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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/parts/{qpwtoken} HTTP/1.1
Host: main.net955210.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.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/parts/{qpwtoken}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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": "tqpwJzPucS2FGswgD4PMahLi7PqBVn2oLhNAy -- 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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qhit}/parts/{qpht} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

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

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

};

$.ajax({
  url: 'https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qhit}/parts/{qpht}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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": "tqpwJzPucS2FGswgD4PMahLi7PqBVn2oLhNAy -- 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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/parts/{qpht} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

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

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

};

$.ajax({
  url: 'https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/parts/{qpht}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qhit}/meta \
  -H 'Accept: application/json' \
  -H 'Accept: image/*' \
  -H 'Authorization: Bearer {access-token}'

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

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

};

$.ajax({
  url: 'https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qhit}/meta', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qhit}/meta/{path} \
  -H 'Accept: application/json' \
  -H 'Accept: image/*' \
  -H 'Authorization: Bearer {access-token}'

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

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

};

$.ajax({
  url: 'https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qhit}/meta/{path}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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 section on metadata 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"

Merge Metadata

Code samples

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

POST https://main.net955210.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta HTTP/1.1
Host: main.net955210.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.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PUT https://main.net955210.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta HTTP/1.1
Host: main.net955210.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.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

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

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

};

$.ajax({
  url: 'https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta/{path} HTTP/1.1
Host: main.net955210.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.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta/{path}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta/{path} HTTP/1.1
Host: main.net955210.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.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta/{path}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta/{path} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

DELETE https://main.net955210.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta/{path} HTTP/1.1
Host: main.net955210.contentfabric.io
Accept: application/json

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

};

$.ajax({
  url: 'https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/meta/{path}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qhit}/links \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

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

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

};

$.ajax({
  url: 'https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qhit}/links', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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.

See the section on metadata 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.
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.

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"
        }
      }
    }
  }
}

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"

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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs HTTP/1.1
Host: main.net955210.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.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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 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"

Add More Operations to Files Job

Code samples

# You can also use wget
curl -X POST https://main.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid} HTTP/1.1
Host: main.net955210.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.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid} HTTP/1.1
Host: main.net955210.contentfabric.io
Accept: application/json
Accept: application/json

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

};

$.ajax({
  url: 'https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/uploads HTTP/1.1
Host: main.net955210.contentfabric.io
Accept: application/json
Accept: application/json

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

};

$.ajax({
  url: 'https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/uploads', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/uploads/{jobid} HTTP/1.1
Host: main.net955210.contentfabric.io
Accept: application/json
Accept: application/json

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

};

$.ajax({
  url: 'https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/uploads/{jobid}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/{jobid} HTTP/1.1
Host: main.net955210.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.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/{jobid}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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": "tqpwJzPucS2FGswgD4PMahLi7PqBVn2oLhNAy -- 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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/resume HTTP/1.1
Host: main.net955210.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.net955210.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": {}
    }
  },
  "clear_resolve": true
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/file_jobs/{filesjobid}/resume', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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": {}
    }
  },
  "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": null,
      "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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/files \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

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

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

};

$.ajax({
  url: 'https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/files', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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"

Download a File

Code samples

# You can also use wget
curl -X GET https://main.net955210.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-Set-Content-Disposition: string' \
  -H 'Authorization: Bearer {access-token}'

GET https://main.net955210.contentfabric.io/qlibs/{qlibid}/q/{qhit}/files/{path} HTTP/1.1
Host: main.net955210.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-Set-Content-Disposition: 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-Set-Content-Disposition':'string',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://main.net955210.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-Set-Content-Disposition':'string',
  'Authorization':'Bearer {access-token}'

};

fetch('https://main.net955210.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-Set-Content-Disposition' => 'string',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://main.net955210.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-Set-Content-Disposition': 'string',
  'Authorization': 'Bearer {access-token}'
}

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

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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-Set-Content-Disposition": []string{"string"},
        "Authorization": []string{"Bearer {access-token}"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://main.net955210.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-Set-Content-Disposition' => 'string',
    'Authorization' => 'Bearer {access-token}',
    
    );

$client = new \GuzzleHttp\Client();

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

try {
    $response = $client->request('GET','https://main.net955210.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 data of the file at the given path. The request accepts an optional HTTP Range header to download only a specific section of the file.

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-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.

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-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 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
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"

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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/upload_jobs HTTP/1.1
Host: main.net955210.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.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/upload_jobs', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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
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 V1

Code samples

# You can also use wget
curl -X POST https://main.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/upload_jobs/{jobid} HTTP/1.1
Host: main.net955210.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.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/upload_jobs/{jobid}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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": "tqpwJzPucS2FGswgD4PMahLi7PqBVn2oLhNAy -- 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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/upload_jobs/{jobid} HTTP/1.1
Host: main.net955210.contentfabric.io
Accept: application/json
Accept: application/json

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

};

$.ajax({
  url: 'https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qwtoken}/upload_jobs/{jobid}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qhit}/rep/{path} \
  -H 'Accept: */*' \
  -H 'Accept: image/*' \
  -H 'Authorization: Bearer {access-token}'

GET https://main.net955210.contentfabric.io/qlibs/{qlibid}/q/{qhit}/rep/{path} HTTP/1.1
Host: main.net955210.contentfabric.io
Accept: */*
Accept: image/*

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

};

$.ajax({
  url: 'https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qhit}/rep/{path}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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.

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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qhit}/rep/{path} HTTP/1.1
Host: main.net955210.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.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qhit}/rep/{path}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qhit}/call/{func} \
  -H 'Accept: application/octet-stream' \
  -H 'Authorization: Bearer {access-token}'

GET https://main.net955210.contentfabric.io/qlibs/{qlibid}/q/{qhit}/call/{func} HTTP/1.1
Host: main.net955210.contentfabric.io
Accept: application/octet-stream

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

};

$.ajax({
  url: 'https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qhit}/call/{func}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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 LLVM 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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qhit}/call/{func} HTTP/1.1
Host: main.net955210.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.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/q/{qhit}/call/{func}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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"

Content Versions

Content Versions

List Content Versions

Code samples

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

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

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

};

$.ajax({
  url: 'https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/qid/{qid}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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.

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

200 Response

{
  "id": "iq__6D1qLem852ggNcEYcAyvgT",
  "versions": [
    {
      "id": "iq__6D1qLem852ggNcEYcAyvgT",
      "hash": "hq__QmctSY6kRDT1GJ7S69W7Ta7PEsvyWCCZahTFDAxXmjQXXh",
      "type": "hq__QmRDQwpgAMkc3TDsnvwmv2VSgg3zqNNFcMWKSdxxMX4QxU"
    },
    {
      "id": "iq__6D1qLem852ggNcEYcAyvgT",
      "hash": "hq__QmZPdxKM4wyvHG4En3LoAtZ9cQE9KL2MVNsEN17etCN2cA",
      "type": "hq__QmRDQwpgAMkc3TDsnvwmv2VSgg3zqNNFcMWKSdxxMX4QxU"
    }
  ]
}

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.net955210.contentfabric.io/qlibs/{qlibid}/qid/{qid} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://main.net955210.contentfabric.io/qlibs/{qlibid}/qid/{qid} HTTP/1.1
Host: main.net955210.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.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/qid/{qid}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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"
}

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.net955210.contentfabric.io/qlibs/{qlibid}/qid/{qid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

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

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

};

$.ajax({
  url: 'https://main.net955210.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.net955210.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.net955210.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.net955210.contentfabric.io/qlibs/{qlibid}/qid/{qid}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://main.net955210.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.net955210.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.net955210.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