Skip to end of banner
Go to start of banner

REST API: Getting started with Postman

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

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

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:

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


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.

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:

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.

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:


  • No labels