For administrators
Catalog API
Keys that let other systems read the app catalog.
What this is
The catalog API lets another system, such as your school's intranet, show your apps as cards of its own, so nobody has to come to the portal to find them. It only reads. Publishing and settings stay in cyantula. You need this page when you want to create or revoke the tokens such a system uses, or to add a webhook that tells it when the catalog changed.
There are two kinds of token:
- A server token stays on a server. It may also ask what one person sees, if you allow it.
- A browser token goes into a web page on the origins you name. It only ever reads what is meant for everybody or for one group.
Where to find it
- Open Admin, then the card Apps & integrations.
- Click Catalog API.
What you see
- A card Catalog API with the explanation above and the button New token.
- A list of tokens, or No tokens yet. One row per token: its name, then its kind (
serverorbrowser), may ask per person when it is allowed to, the origins of a browser token, the first characters of the token, and last used with its age, or never used. Each row has Add webhook and Revoke. - Under a token, one line per webhook: its address and last delivery with the answer it got, or nothing delivered yet. Each has Send a test and Remove.
- A note at the bottom with the address to call and what you can filter on: group (one class), tag, category, q (a search) and, for a server token that may, for (an e-mail address). It also says that webhooks receive
catalog.changed, signed in the headerX-Cyantula-Signature.
How to create a token
- Click New token.
- Fill in Name, for example the name of the system that will use it.
- Choose one kind:
- Server: the intranet's own server calls the API. Tick May ask what one person sees only for a server you trust to say truthfully who is looking.
- Browser: a web page shows the cards with the ready-made element. Fill in Pages on these origins may use it, one or more origins such as
https://intranet.school.be, separated by spaces or commas.
- Click Create token. It stays disabled until there is a name, and for a browser token at least one origin.
- The window Copy this token now shows the token once. Copy it. Under To start with: you get a ready command for a server token, or the snippet to paste into the web page for a browser token.
- Click Done.
You know it works when you call the catalog address with the token and get the apps back. The row then shows last used instead of never used.
How to add a webhook
A webhook tells the other system that something a card shows has changed, so it can fetch the catalog again instead of asking every minute.
- On the token's row, click Add webhook.
- Enter the URL the other system listens on.
- Click Add webhook.
- The window Copy the signing secret now shows the secret once. Copy it into the receiving system, which uses it to check the signature. Click Done.
- Click Send a test. The line under the token shows the answer in last delivery.
How to revoke a token
- Click Revoke on the token's row.
- Confirm with Revoke token in the window Revoke “name”?
- The row disappears from the list.
When something looks wrong
- The test delivery got 500. (or another number, or no answer): the receiving address did not accept the call. Check the address and that the system is reachable from this server.
- A red notice with a message at the top of the page: the action did not go through. Read it, correct the field and try again.
- A system that suddenly gets nothing: its token was probably revoked.
Good to know
- Only admins can create and revoke tokens.
- The token and the signing secret are shown once. If you lose one, revoke the token, or remove the webhook, and create a new one.
- Revoking cannot be undone. Whatever uses the token stops getting the catalog at once, and its webhooks stop too.
- Remove on a webhook asks no confirmation.
- Tokens used for keeping people in step with your own administration are on the page People sync & GDPR, not here.