How to use the REST API feature on POSTMAN?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

Welcome Idira to LIVEcommunity!

Our community just got stronger! Explore new identity security resources, connect with experts, and discover more ways to learn and collaborate.

Meet Idira

How to use the REST API feature on POSTMAN?

L0 Member

I've already generated a Token but the documentation says there has to be a header parameter with name Authorization and value the token provided, and I need to point to EPM Server, on my particular caseI believe that the EPMServer is na171.epm.cyberark.com (which is the one the AUTH POST gave me) but the Status Code I get as a result is 404

 

Field_Content_versions_oct20__068Vy00000K0ly2IAB.png 

Field_Content_versions_oct20__068Vy00000K1WSCIA3.png

10 REPLIES 10

L5 Sessionator

How to Use Postman for No Code Development with CyberArk - Part 1: Install & Configure Postman loads of links on his description. - I also hear postman charge 700 a license now just so you know?

L4 Transporter

How to Use Postman for No Code Development with CyberArk - Part 1: Install & Configure Postman loads of links on his description. - I also hear postman charge 700 a license now just so you know?

L1 Bithead

​ Hi @Daniel Agustin Flores​ - I'm also in a same boat, getting the 404 error while calling the set list. Checking if you were able to solve the issue? Appreciate your response. Thanks!

L5 Sessionator

Setting Up EPM REST API in Postman

Authentication Header Setup

You've correctly understood that you need to include an Authorization header. According to the documentation:

  1. The Authorization header should be formatted as: 
  2. basic <Token>
  3.  
  4.  where 
  5. <Token>
  6.  
  7.  is the token you received from the EPM authentication API Get computers - Header parameters.
  8. In Postman, add a header with:
  • Key: 
    • Authorization
  • Value: 
    • basic <your_token>

URL Structure

The 404 error suggests your URL might be incorrect. For EPM REST APIs, the URL structure is:

 

https://<EPM_Server>/EPM/API/<Version>/<endpoint>

Where:

  • <EPM_Server>
  •  is your EPM server URL (you mentioned na171.epm.cyberark.com)
  • <Version>
  •  is optional (if omitted, it uses the latest version)
  • <endpoint>
  •  is the specific API endpoint you're trying to access

Important Considerations

  1. Server URL: Make sure you're using the correct EPM server URL. The documentation mentions:
    • For authentication, you use the dispatcher server name
  • For subsequent API calls, you should use the server URL returned in the 
  • ManagerURL
  •  
  •  field of the authentication response 
  1. Content-Type: For most EPM API calls, you need to set:
  • Key: 
    • Content-Type
  • Value: 
    • application/json
  1. URL Parameters: Ensure there are no spaces in the URL and avoid using unsupported characters (+ & %) in URL parameter values EPM authentication.

Example Request

Here's an example of how to structure a request to get computers in Postman:

  1. Method
  2. : POST
  3. URL
  4.  
  5. : 
  6. https://na171.epm.cyberark.com/EPM/API/Sets/407cddb6/SigninAudits/Search?offset=0&limit=250&sortBy=Date&sortDir=desc
  7. Headers
  8.  
  9. :
    • Authorization: basic <your_token>
    • Content-Type: application/json
  1. Body
  2.  
  3.  (raw, JSON):
  4.  
  5. {
  6. "filter": "aggregatedBy EQ \"mycompany-agent\\cyberark,mycompany-agent,success\""
  7. }

This example is based on the Get detailed sign in audit events documentation.

If you're still experiencing issues, double-check that you're using the correct server URL from the 

ManagerURL

 field in the authentication response, and verify that the specific endpoint path you're trying to access is correct.

L4 Transporter

Setting Up EPM REST API in Postman

Authentication Header Setup

You've correctly understood that you need to include an Authorization header. According to the documentation:

  1. The Authorization header should be formatted as: 
  2. basic <Token>
  3.  
  4.  where 
  5. <Token>
  6.  
  7.  is the token you received from the EPM authentication API Get computers - Header parameters.
  8. In Postman, add a header with:
  • Key: 
    • Authorization
  • Value: 
    • basic <your_token>

URL Structure

The 404 error suggests your URL might be incorrect. For EPM REST APIs, the URL structure is:

 

https://<EPM_Server>/EPM/API/<Version>/<endpoint>

Where:

  • <EPM_Server>
  •  is your EPM server URL (you mentioned na171.epm.cyberark.com)
  • <Version>
  •  is optional (if omitted, it uses the latest version)
  • <endpoint>
  •  is the specific API endpoint you're trying to access

Important Considerations

  1. Server URL: Make sure you're using the correct EPM server URL. The documentation mentions:
    • For authentication, you use the dispatcher server name
  • For subsequent API calls, you should use the server URL returned in the 
  • ManagerURL
  •  
  •  field of the authentication response 
  1. Content-Type: For most EPM API calls, you need to set:
  • Key: 
    • Content-Type
  • Value: 
    • application/json
  1. URL Parameters: Ensure there are no spaces in the URL and avoid using unsupported characters (+ & %) in URL parameter values EPM authentication.

Example Request

Here's an example of how to structure a request to get computers in Postman:

  1. Method
  2. : POST
  3. URL
  4.  
  5. : 
  6. https://na171.epm.cyberark.com/EPM/API/Sets/407cddb6/SigninAudits/Search?offset=0&limit=250&sortBy=Date&sortDir=desc
  7. Headers
  8.  
  9. :
    • Authorization: basic <your_token>
    • Content-Type: application/json
  1. Body
  2.  
  3.  (raw, JSON):
  4.  
  5. {
  6. "filter": "aggregatedBy EQ \"mycompany-agent\\cyberark,mycompany-agent,success\""
  7. }

This example is based on the Get detailed sign in audit events documentation.

If you're still experiencing issues, double-check that you're using the correct server URL from the 

ManagerURL

 field in the authentication response, and verify that the specific endpoint path you're trying to access is correct.

L5 Sessionator

L4 Transporter

Thanks @Touseef-ur rehman​ this is helpful. I made the progress.

 

I'm trying to create a filter query to filter out the Administrative Privileges Requests (user requests) from EPM events, but not finding any luck. Below script I'm using, checking if you can help me with the correct script. Thanks in advance!

 

{

"filter": "eventType EQ \"userRequest\""

}

 

You'll need to use the EPM query language for filtering events.

For filtering events in EPM, you need to use the correct syntax and field names. The EPM query language allows you to create filters using operators like EQ (equals), AND, OR, etc.

When making API requests to retrieve events, you should use the "Get detailed raw events" or "Get aggregated events" endpoints, depending on whether you want individual or aggregated event data.

Here's how you can structure your filter query:

 

{

"filter": "eventType EQ \"Administrative Privileges Request\""

}

If you need to be more specific, you might want to combine multiple conditions using AND/OR operators. For example:

 

{

"filter": "eventType EQ \"Administrative Privileges Request\" AND status EQ \"Pending\""

}

The exact field names and values should match what's available in your EPM environment. The EPM query language documentation provides more details on how to construct these filters.

When making your request, ensure you're using the correct endpoint structure:

 

POST https://<EPM_Server>/EPM/API/<Version>/Sets/<setId>/Events/Search

With headers:

  • Authorization: basic <Token>
  • Content-Type: application/json

Examples of similar API calls can be found in the Get detailed raw events and Get aggregated events documentation.

 

 

All feedback is reviewed by the team.

Answer based on the following sources:

Get detailed raw events

docs.cyberark.com/epm

Get aggregated events

docs.cyberark.com/epm

 

You'll need to use the EPM query language for filtering events.

For filtering events in EPM, you need to use the correct syntax and field names. The EPM query language allows you to create filters using operators like EQ (equals), AND, OR, etc.

When making API requests to retrieve events, you should use the "Get detailed raw events" or "Get aggregated events" endpoints, depending on whether you want individual or aggregated event data.

Here's how you can structure your filter query:

 

{

"filter": "eventType EQ \"Administrative Privileges Request\""

}

If you need to be more specific, you might want to combine multiple conditions using AND/OR operators. For example:

 

{

"filter": "eventType EQ \"Administrative Privileges Request\" AND status EQ \"Pending\""

}

The exact field names and values should match what's available in your EPM environment. The EPM query language documentation provides more details on how to construct these filters.

When making your request, ensure you're using the correct endpoint structure:

 

POST https://<EPM_Server>/EPM/API/<Version>/Sets/<setId>/Events/Search

With headers:

  • Authorization: basic <Token>
  • Content-Type: application/json

Examples of similar API calls can be found in the Get detailed raw events and Get aggregated events documentation.

 

 

All feedback is reviewed by the team.

Answer based on the following sources:

Get detailed raw events

docs.cyberark.com/epm

Get aggregated events

docs.cyberark.com/epm

 

  • 567 Views
  • 10 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!