Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table of Contents

Table of Contents
excludeTable of Contents

Panel
borderColorblack
titleBGColorpeachpuff
borderStylesolid
titleLearning resources


Where to download Postman

Postman is an API platform that you can use to construct and issue REST requests to interact with FOLIO's API, without having to write code in a programming language. 

Visit https://www.postman.com/ to either download the desktop app or to sign up for an account.

...

There is a web-based client available as well as desktop clients for Linux, Mac and Windows. Information about the different levels of account access can be found at https://www.postman.com/pricing/


Using Postman with FOLIO Snapshot

FOLIO Snapshot provides access to the REST API on a server that gets rebuilt daily.

https://folio-snapshot.dev.folio.org

Log into Snapshot as the admin user, then go to Settings/Software versions. In the Okapi services section are the details you will need, including the tenant name, 'diku' and the URL:

https://folio-snapshot-okapi.dev.folio.org

...

Image Added


Looking up the authentication token

API calls to FOLIO require a token that is used for authentication. Consequently, you will first need to GET this token with a POST request, sending the username and password as raw JSON in the body of your API request:

...

Image Added

You will also need the following key in your headers: 'x-okapi-tenant' with its corresponding value, 'diku'.

...

Image Added

The endpoint used is: https://folio-snapshot-okapi.dev.folio.org/authn/login

The type of request is: POST.

Header key: x-okapi-tenant, and value: diku.

Click 'Send' to transmit the API call to the server.

...

Image Added

The response provides a status code: '201 Created', which indicates success. The response headers include the x-okapi-token.

You will need to use the x-okapi-token in any API call you make. You do this, by adding it to your headers:

...

Image Added

You may paste the text string directly into the x-okapi-token header field, as above, or you can define a variable to hold the text.

...

Image Added

...

Tokens on Snapshot

...

change when the site is rebuilt, which happens daily. It can also change if someone logs in as diku_admin and then logs out. So if you are working with API calls on Snapshot, you will need to update the Okapi token each day.


Using Environment variables to store authentication information

If you choose to use the variable, you will then only need to update it in one place rather than in each request you define. You will find your variables in 'Environments' on the left of the Postman screen:

...

Image Removed

Postman is an API platform that you can use to construct and issue REST requests to interact with FOLIO's API.

Visit https://www.postman.com/ to sign up for an account. The free tier is restricted to 1000 API calls. There is a web-based client available as well as desktop clients for Linux, Mac and Windows.

FOLIO Snapshot provides access to the REST API on a server that gets rebuilt daily.

https://folio-snapshot.dev.folio.org

Log into Snapshot as the admin user, then go to Settings/Software versions. In the Okapi services section are the details you will need, including the tenant name, 'diku' and the URL:

https://folio-snapshot-okapi.dev.folio.org

Image Removed

API calls to FOLIO require a token that is used for authentication. Consequently, you will first need to GET this token with a POST request, sending the username and password as raw JSON in the body of your API request:

Image Removed

You will also need the following key in your headers: 'x-okapi-tenant' with its corresponding value, 'diku'.

Image Removed

The endpoint used is: https://folio-snapshot-okapi.dev.folio.org/authn/login

The type of request is: POST.

Header key: x-okapi-tenant, and value: diku.

Click 'Send' to transmit the API call to the server.

Image Removed

The response provides a status code: '201 Created', which indicates success. The response headers include the x-okapi-token.

You will need to use the x-okapi-token in any API call you make. You do this, by adding it to your headers:

Image Removed

You may paste the text string directly into the x-okapi-token header field, as above, or you can define a variable to hold the text.

Image Removed

The  token on Snapshot changes daily. If you choose to use the variable, you will then only need to update it in one place rather than in each request you define. You will find your variables in 'Environments' on the left of the Postman screen:

...

Image Added


Using Postman Collection Runner

Postman's collection runner tool provides a framework for doing some bulk operations without needing to write a script.

General information about Postman Runner is on the Postman website: https://learning.postman.com/docs/collections/running-collections/intro-to-collection-runs/

Note that only 25 runs of collection runner per month are allowed for Postman desktop app when used without Postman account or with free Postman account. This restriction exists since Februrary 2023 (Postman Blog).

For unlimited collection runners use Newman or K6.