Call Bitcode Function
GET/qlibs/:qlibid/q/:qhit/call/:func
Call the given bitcode function and return its result.
The function name as well as all parameters are specified in the URL.
The bitcode function will receive as first parameter the QLib ID, as second parameter the content hash, and then the key-value pairs from the URL as a list of tuples.
For example, this URL path:
/qlibs/ilibBif1DV8Yi6fzEqzfDsv9dY/q/hq__QmT3aofVbzmsCL426SNbcXrFxtvX92grdi5UWNvaybPHBq/call/func1?arg1=v1&arg2=v2
produces these arguments:
arg[0] = "ilibBif1DV8Yi6fzEqzfDsv9dY"
arg[1] = "hq__QmT3aofVbzmsCL426SNbcXrFxtvX92grdi5UWNvaybPHBq"
arg[2] = "arg1"
arg[3] = "v1"
arg[4] = "arg2"
arg[5] = "v2"
If the function call returns nothing, the request is HTTP answered with a 200 status code and no body.
Otherwise the function is expected to return the content type as first return
argument, and additional information according to the content type.
Two types are supported: application/octet-stream and application/json
-
application/octet-stream: expects only a single additional argument: the binary content.
-
application/json: accepts a list of additional key-value pairs. They will be marshaled to a standard json object.
Request
Responses
- 200
- 201
- 206
- 401
- 404
- 416
- default
The result of a bitcode call.
Response Headers
the returned content type
the content disposition if available
The result of a bitcode call.
Response Headers
the returned content type
the content disposition if available
partial result if request was made with Range header
Response Headers
the returned content type
the content disposition if available
range of the selected bytes returned as described in RFC 7233 section 4.
Authentication information is missing or invalid
Response Headers
A standard "WWW Authenticate" header of the form Basic realm="Eluvio Content Fabric API"
Error message returned if the requested entity does not exist.
Error message returned if the requested byte range is not satisfiable.
A generic error message.