FAQ content

LibGuides API: v1.2 endpoints

In this article

If you subscribe to LibGuides CMS, you have access to the LibGuides API. API stands for Application Programming Interface and it allows you to display and process your LibGuides CMS content outside of your system.

Please note: The API is intended for users with advanced technical knowledge and coding skills. We strongly recommend using the API in server-side applications to avoid revealing your client ID and secret to the web.

The API offers more flexibility than widgets, but they also require more extensive coding knowledge and are more complicated than just copying and pasting.

The v1.2 API endpoints include requests that allow you to create and update data for your A-Z Databases list. To return data for guides, accounts, subjects, and other assets, please see the v1.1 endpoints. (A search API endpoint is not available at this time. Instead, consider using a Search Box widget.)


API Authentication

In order for your application to request data using the v1.2 endpoints, it must obtain an access token. This requires authorization using a valid client ID and client secret, which you can create by registering an application in your LibGuides API Authentication settings.

To create a new application and obtain its client ID & secret:

the API option in the Tools menu

  1. Log into LibGuides, click on Tools in the navigation bar, and select API from the dropdown.

the API Authentication tab

  1. On the API landing page, click on the API Authentication tab.

the Create New Application button

  1. Under the Applications section, click the Create New Application button.

overview of creating a new api authentication, part 2

  1. In the Add/Edit Application modal window, enter a name in the Application Name field.
  2. Optionally, you can describe the purpose of this application (such as where it's used) in the Application Description field.
  3. For the Scope setting, select the checkbox next to each permission this application should be granted. This will determine which requests the application is allowed to make.
    • Get list of A-Z assets: allows access to GET requests.
    • Create A-Z asset(s): allows access to POST requests.
    • Update A-Z asset(s): allows access to PUT requests.
  4. Click Save to create the new application. It will appear in the list of applications, along with its client ID and secret.
    • Click on its Edit () icon to make changes to the application's name, description, or scopes.
    • Click on the Regenerate () icon to generate a new client secret for this application.
    • Click on the Delete () icon to permanently delete the application.

the Applications table showing an application, its ID, and secret

The LibApps v1.2 API uses OAuth 2.0 for authentication and supports the Client Credentials grant type. The API Authentication page provides you with the request URL for your region, along with the required POST fields to use for requesting an access token in your application.

Once you have your access token, send it via the Authorization header in your API requests. For example:

Authorization: Bearer your-token-goes-here

Available v1.2 endpoints

The following endpoints are available in the v1.2 API:

  • GET /1.2/az: returns assets from your A-Z Databases list.
  • PUT /1.2/az/:id: updates the information of a specific A-Z Database asset.
  • PUT /1.2/az/collection: updates the information of multiple A-Z Database assets.
  • POST /1.2/az: creates a single A-Z Database asset.
  • POST /1.2/az/collection: creates multiple A-Z Database assets.

To access the full documentation for these endpoints (including the necessary request URLs, parameters, and request/response examples):

the API option in the Tools menu

  1. Log into LibGuides, click on Tools in the navigation bar, and select API from the dropdown.

the Endpoints v1.2 tab

  1. On the API landing page, go to the Endpoints v1.2 tab.

the Details column

  1. To view the full documentation for each endpoint, click on its Show Endpoint Details () icon in the Details column. The Route Details modal window will appear containing the endpoint's request URL, query string parameters, and examples.