[BETA] Create a knowledge base publication

Create a publication of your school's knowledge base, a text, a video or a link, in one of its categories, so that students find the information your school already keeps elsewhere. The response carries the identifier only: read the publication back, with its position, its inherited audience and its cover, with GET /v3/knowledge-base/publications/:id.

Your school needs the API option and the knowledge base feature.

Types and body

type is text (a page written in the editor), video (a video the app plays from its URL) or link (a page the app opens from its URL). The body of each language holds the HTML of a text, reduced to what the Edusign editor produces (scripts, event handlers and unknown tags are removed) and limited to 65,535 bytes once reduced; for a video or a link it holds the http(s) URL, required in every language and limited to 65,535 bytes too, as Edusign stores it. Any http(s) URL is accepted for a video, not only YouTube.

Languages

content gives the title and the body in each language: fr, en, es or it. language is required when more than one item is sent and defaults to the school language otherwise (fr when the school language is not one of the four); a language sent twice answers 400 DUPLICATE_IN_REQUEST.

Audience

When audience is absent, the publication takes its category's audience and groups, and that inherited audience is never refused. audience.type is all (everyone), unauthenticated (the public part of your white-label app only) or authenticated (the students of the app), restricted to groupIds or groupExternalReferenceIds for authenticated only. Every group must be an active group of your school: an unknown one answers 404 GROUP_NOT_FOUND, an archived one 409 GROUP_ARCHIVED, a reference carried by several active groups 409 GROUP_EXTERNAL_REFERENCE_NOT_UNIQUE, both lists together 400 GROUP_IDENTIFIER_AMBIGUOUS. all and unauthenticated need a public white-label app (403 PUBLIC_AUDIENCE_REQUIRES_WHITE_LABEL).

A publication is never wider than its category: in an all category, any audience; in an authenticated category without groups, authenticated with or without groups; in an authenticated category with groups, authenticated with groups that are a non-empty subset of the category's; in an unauthenticated category, unauthenticated only. Anything wider answers 409 KNOWLEDGE_BASE_PARENT_VISIBILITY_CONFLICT.

Position

The publication is placed at order among the items of its category, categories and publications together, from 0: the items from that position on move down one. Without order, or with one beyond the last position, it goes last. Two creations at the same moment never get the same position.

Cover

coverImageUrl gives the https URL of the cover: it is downloaded, checked (JPEG, PNG or WebP, 10 MB at most), scanned for viruses, resized and stored after the response. The cover appears once that succeeds; when it fails, the publication has no cover, the failure is logged and the creation stands.

The publication is visible in the app unless hidden: true. A new publication is never synchronized with the campus chatbot, and nothing is sent to it. The publication and its texts are saved together, or not at all. A category is found in your school only: an unknown id, another school's category or a publication answers 404 KNOWLEDGE_BASE_CATEGORY_NOT_FOUND. Every other invalid request answers 400 VALIDATION_ERROR with the fields in errors.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
enum
required

text: a page written in the editor, video: a video the app plays from its URL, link: a page the app opens from its URL.

Allowed:
string
required
length ≥ 1

The category to file the publication in. A publication as category answers 404 KNOWLEDGE_BASE_CATEGORY_NOT_FOUND.

content
array of objects
required
length ≤ 4

The title and the body of the publication in each of its languages: the HTML of a text, the http(s) URL of a video or a link, required in every language. A language sent twice is refused with DUPLICATE_IN_REQUEST.

content*
audience
object

Who reads the publication. Inherited from the category when absent. Never wider than the category's.

integer
0 to 9007199254740991

The position among the items of the parent, from 0; the items from that position on move down one. Absent or beyond the last position means last.

boolean

true hides the publication from the student app. Visible by default.

uri
length ≤ 2048

An https URL of the cover (JPEG, PNG or WebP, 10 MB at most), downloaded, checked, scanned and stored after the response.

Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json