Skip FOLIO Project Navigation

REST api endpoints for Folio data, like listing of budgets?

Hi, I’ve desperately tried to find examples of REST api usage for data manipulation. I found api descriptions here: FOLIO Developers | Reference | API documentation

But what is the exact endpoint if my Folio instance is in address https://my-folio.com and I want to get list of all budgets (/finance/budgets)?

I guess API is versioned but I can’t find info about that.

Any help is much appreciated.

You’ll need to have the OKAPI URL for your Folio (more on OKAPI at okapi/guide.md at master · folio-org/okapi · GitHub) and a x-okapi-token and x-okapi-tenant defining in your http request header to interact with the APIs.

This wiki page may help get you started REST API: Getting started with Postman - Information and User Guides for FOLIO Apps - FOLIO Wiki

I also highly recommend joining the learning-apis channel in the Folio Slack channel (you can register for the Slack at slack-invitation.folio.org if you are not already on there)

An example cURL for this information on the Folio Snapshot hosted reference environment would be:

curl --location --request GET 'https://folio-snapshot-okapi.dev.folio.org/finance/budgets' \
--header 'authority: folio-snapshot-okapi.dev.folio.org' \
--header 'x-okapi-tenant: diku' \
--header 'accept-language: en-US' \
--header 'content-type: application/json' \
--header 'accept: application/json' \
--header 'x-okapi-token: <insert valid token here> \
--header 'sec-fetch-site: same-site' \
--header 'sec-fetch-mode: cors' \
--header 'sec-fetch-dest: empty' \
--header 'referer: https://folio-snapshot.dev.folio.org/'

You’ll need to use a valid x-okapi-token value for this to work where it says ‘<insert valid token here>’

Thank you for your help @ostephens. This gets me on the right track.
Is OKAPI url publicly available by default installation? Does it have to be?

Ah, found url from System Information. All good so far!

Yes - if you look login to a Folio tenant in a browser and then look at the network tab in the developer tools of the browser you’ll be able to see the calls to the APIs that are being done to deliver the web UI

1 Like

Thanks again, I got list of budgets now and I also joined the slack channel, thanks for the tip!

2 Likes