Folio ERM APIs
Folio ERM Agreement API
A draft Open API Specification (OAS) v3 is available at https://raw.githubusercontent.com/ostephens/folio-erm-agreements-api-os/main/dist.yaml
This file can be downloaded and used to generate API Collections in Postman (join the #learning-apis channel on the Folio Slack for more information). The OAS definition can also be pasted directly into the Swagger API editor to get an interactive version of the API
If using Postman, see https://folio-org.atlassian.net/wiki/x/IYA6J for advice on setting up Postman to work with FOLIO
Folio ERM License RAML
RAML files for mod-licenses available at https://github.com/folio-org/mod-licenses/tree/master/ramls
Hey @Owen Stephens , do you want to update the pre-request script on this page? This one (cudos to Mark Arnold) is working with both the new RTR and the old authentication method:
let path = pm.environment.get("baseUrl") + "/authn/login-with-expiry"; let cookieJar = pm.cookies.jar(); let xOkapiTenant = pm.environment.get("x-okapi-tenant"); pm.sendRequest({ url: path, method: 'POST', header: { 'Content-Type': 'application/json', 'Accept': 'application/json', 'x-okapi-tenant': xOkapiTenant }, body: { mode: 'raw', raw: JSON.stringify({ username: pm.environment.get("username"), password: pm.environment.get("password") }) } }, function (err, response) { // Fall back to authn/login if authn/login-with-expiry is not found if (response.code === 404) { path = pm.environment.get("baseUrl") + "/authn/login"; pm.sendRequest({ url: path, method: 'POST', header: { 'Content-Type': 'application/json', 'Accept': 'application/json', 'x-okapi-tenant': xOkapiTenant }, body: { mode: 'raw', raw: JSON.stringify({ username: pm.environment.get("username"), password: pm.environment.get("password") }) } }, function (err, fallbackResponse) { if (fallbackResponse) { let token = fallbackResponse.headers.get("x-okapi-token"); console.log(token); pm.environment.set("x-okapi-token", token); } }); } else { // Continue with the response from authn/login-with-expiry if (response) { let token = response.headers.get("x-okapi-token"); console.log(token); pm.environment.set("x-okapi-token", token); // Optionally set the token expiration if needed from the response pm.environment.set("RTR-access-expiration", response.json().accessTokenExpiration); } } });