Major improvement to API

As more and more users make use of our API to automate data up- and download, connect Caplena to their own systems or even build entire solutions on top, we have made an effort to significantly improve the capabilities and ease-of-use of our API.

TL;DR

  • Instant automatic coding is computed by default if some conditions are met. If you do not require instant automatic coding, enable the async parameter to upload new rows, to make sure everything works as before.
  • Predicted codes will be written to the answers automatically, no need to call the codes-predicted endpoint anymore or open the frontend,
  • Switch to API key authentication if you are still using session authentication before May 15 2020.

Instant automatic coding

If you rely on the classification results to trigger some further logic, e.g. when routing support requests based on their text, or running a chatbot with them, this has just become much easier: If your plan includes API access, we will now try to do an instant classification by default. A few conditions have to be met, however:

  • You have to send a maximum of 20 responses at once and
  • You have to call the endpoint without the async option and
  • If you have reviewed answers on the project, the training 1 needs to have been triggered before at least once.

Integration of automated coding results

Until now, the results from the automatic coding had to be fetched from the codes-predicted endpoint and then written into the answer manually. Or, you had to open the frontend once in a while to get the predicted codes written.

This cumbersomeness is now obsolete: Automatically assigned codes will always be written into the answers directly after having been computed.

Authorization

Session authorization with email and password is not suited well for API use, especially from a security perspective. We have supported API keys for a while already, but until now you had to request them from our support team. Not anymore: You can now generate, disable and delete API keys directly on your Account Page.

Important: Session authentication for API usage will be deprecated on 15. May 2020. If you use session authentication currently, please switch to API keys.

Limitations and new validation

When adding new rows (POST /api/projects/{PROJECT_ID}/rows) or creating a project with rows (POST /api/projects) and calling it synchronously (without async query parameter), the following conditions are enforced newly:

  • A maximum of 20 rows can be uploaded at once
  • You cannot upload answers with reviewed: True
  • If there is no fine-tuned AI 1, or the fine-tuned AI fails to predict codes for some reason, the entire request will fail and the answers will not be saved

If you do not require instant automatic coding, we recommend enabling the async option, for which the above mentioned limitations to not apply

1 A fine-tuned AI is available if

  • there are no reviewed responses on a question and the question doesn't inherit from another one or
  • If training has been requested for your question and
    • The training has been requested less than 30 days ago or
    • Rows have been appended to the question synchronously within the last 30 days.