This repository has been archived by the owner on Aug 22, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Create a Content Library
Serban Simu edited this page Nov 3, 2018
·
2 revisions
A Content Library is created in a Content Space
.
It is identified by an ID of the form ilib7ZTNtob8RpatynHQy3sS1w
API reference: content-libraries
Note: this is only allowed in a dev
Content Fabric
instance configured for authentication bypass
curl -X POST http://q.contentfabric.io/qlibs
{"id":"ilib7ZTNtob8RpatynHQy3sS1w","qid":"iq__7ZTNtob8RpatynHQy3sS1w"}
This will return the library ID. To check the library object:
curl http://localhost:8008/qlibs/ilib7ZTNtob8RpatynHQy3sS1w
{"id":"ilib7ZTNtob8RpatynHQy3sS1w","qid":"iq__7ZTNtob8RpatynHQy3sS1w"}
To list the contents of the library:
curl http://localhost:8008/qlibs/ilib7ZTNtob8RpatynHQy3sS1w/q
Given a Content Space
, for example ispcjALidS82U9EjuffFUnFWE32dHGG
- Execute a blockchain transaction on the
Content Space
contractcreateLibrary
- Retrieve the resulting transaction ID
txid
and contract address.
- Create an authorization token - How to Create an Authorization Token
- Use your blockchain address
addr
and the transaction ID obtained abovetxid
- Convert the contract address to a Content Fabric multi-format
- For example
TODO
- Create the Content Library
curl -X POST http://q.contentfabric.io/qlibs -H "Authorization: Bearer ********"
{"id":"ilib7ZTNtob8RpatynHQy3sS1w","qid":"iq__7ZTNtob8RpatynHQy3sS1w"}