API access | EPM-L
You can use the Endpoint Privilege Management for Linux (EPM-L) API to automate tasks and pull data into your own scripts and tools. To call the API, you need a personal access token and the site ID of your tenant.
Prerequisites
- You have an account on the BeyondTrust Pathfinder Platform with access to EPM-L.
- You have a terminal with a Bash-compatible shell and
curlinstalled.
Call the EPM-L API
-
Create a personal access token. For instructions, see Create a personal access token.
-
Copy the token and store it in a safe place.
Treat your token like a password. Anyone who has it can call the API as you.
-
While signed in to the BeyondTrust Platform, open a new browser tab and go to
https://app.beyondtrust.io/api/platform/currentSite.The browser displays a JSON response with details about your site.
-
Find the
siteIdvalue in the response, and then copy it. -
Open a terminal.
-
Set the API base URL. Replace
<siteId>with the value you copied in step 4:export EPML_URL="https://api.beyondtrust.io/site/<siteId>/epm/linux" -
Set your personal access token. Replace
<personal access token>with the token you created in step 1:export EPML_PAT="<personal access token>" -
Send a test request to the API:
curl -s -H "Authorization: Bearer $EPML_PAT" \ -H "Accept: application/json" \ "$EPML_URL/epml/clientpkg"If the request succeeds, the API returns a JSON response with client package details. If you receive an authorization error, check that your token is correct and has not expired. If you receive a not found error, check the site ID in your URL.
Updated about 2 hours ago