Put the token in header: Authorization: Bearer <token>. For example Authorization: Bearer eyJhbGci...<snip>...yu5CSpyHI
HTTP request header Content-Type must be: application/vnd.api+json
Library
Use HTTP GET with endpoint: https://<cention api domain>/s/<workspace>/capi/json/c3_libraries to GET all. If the name of your Cention workspace is “demo” and the cention api domain is apid.cention.com then the endpoint would be: https://apid.cention.com/s/demo/capi/json/c3_libraries
Use HTTP GET with endpoint: https://<cention api domain>/s/<workspace>/capi/json/c3_libraries/<id> to GET single library with database ID id.
Questions under this library (c3_library_questions).
Query parameters
Field
Type
Description
data_url
Boolean
When true, any inlined area file archive image within library question will be parsed with data URL format where the file content is base64 encoded and embed inside library content.
External Library
Similar to library but only match library with external flag true and don’t return external attribute.
Use HTTP GET with endpoint: https://<cention api domain>/s/<workspace>/capi/json/c3_external_libraries to GET all libraries with external flag true.
Use HTTP GET with endpoint: https://<cention api domain>/s/<workspace>/capi/json/c3_external_libraries/<id> to GET single library with database ID id.
Questions under this library (c3_library_questions).
Query parameters
Field
Type
Description
data_url
Boolean
When true, any inlined area file archive image within library question will be parsed with data URL format where the file content is base64 encoded and embed inside library content.
Category
Use HTTP GET with endpoint: https://<cention api domain>/s/<workspace>/capi/json/c3_library_categories to GET all.
Use HTTP GET with endpoint: https://<cention api domain>/s/<workspace>/capi/json/c3_library_categories/<id> to GET single category with database ID id.
Data format return similar endpoint c3_libraries and c3_external_libraries.
Sample HTTP request body data format GET all:
{"data":[{"type":"c3_library_categories","id":"2","attributes":{"c3_id":2,"name":"greeting"},"relationships":{"questions":{"data":[{"type":"c3_library_questions","id":"5"}]}}}],"included":[{"type":"c3_library_questions","id":"5","attributes":{"answer":"ok\n","c3_id":5,"question":"<div dir=\"ltr\">first HELP me!<\/div>\n","subject":"help me!"},"links":{"self":{"href":"https:\/\/test.example.com\/capi\/json\/c3_library_questions\/5"}}}]}
Data.attributes
Field
Type
Description
name
String
Category name.
Data.relationships
Field
Type
Description
libraries
Object
Sub-libraries (c3_libraries).
categories
Object
Sub-categories (c3_library_categories).
questions
Object
Questions under this category (c3_library_questions).
Query parameters
Field
Type
Description
data_url
Boolean
When true, any inlined area file archive image within library question will be parsed with data URL format where the file content is base64 encoded and embed inside library content.
Library Question
Use HTTP GET with endpoint: https://<cention api domain>/s/<workspace>/capi/json/c3_library_questions to GET all.
Use HTTP GET with endpoint: https://<cention api domain>/s/<workspace>/capi/json/c3_libraries/<id>/questions to GET all questions belong to library id.
Use HTTP GET with endpoint: https://<cention api domain>/s/<workspace>/capi/json/c3_library_questions/<id> to GET single question with database ID id.
Sample HTTP request body data format for single question:
Attachments for the library question (c3_library_attachments).
Query parameters
Field
Type
Description
data_url
Boolean
When true, any inlined area file archive image within library question will be parsed with data URL format where the file content is base64 encoded and embed inside library content.
Query parameters for GET all
Field
Type
Description
filter[toplist]
Boolean
Shown only the top list questions.
q_filter[phrase]
String
Search phrase.
q_filter[option]
String
Either ‘all’, ‘question’, or ‘answer’. Search phrase on which part of the library.
Library Attachment
Use HTTP GET with endpoint: https://<cention api domain>/s/<workspace>/capi/json/c3_library_attachments/<id> to GET single library attachment with database ID id.
Use HTTP GET with endpoint:
https://<cention api domain>/s/<workspace>/capi/json/c3_library_questions/<id>/attachments to GET all attachments belong to question with database ID id.
Use HTTP GET with endpoint: https://<cention api domain>/s/<workspace>/capi/json/c3_area_archives/<id> to GET single library inlined area file archive image with database ID id.
Use HTTP GET with endpoint:
https://<cention api domain>/s/<workspace>/capi/json/c3_library_questions/<id>/embedded_archives to GET all inlined area file archived images belong to question with database ID id.
Sample HTTP request body data format single attachment: