API [ABS only]
The Advanced Browser Security API lets registered Advanced Browser Security administrators perform various tasks that can otherwise be performed only using the Advanced Browser Security Console.
Important: This page describes the Advanced Browser Security API. For details about the Perception Point API, see API [Perception Point X‑Ray]. |
This page includes the following topics:
Advanced Browser Security API overview
The Advanced Browser Security API lets you interact with the Advanced Browser Security data. Only service accounts can use the Advanced Browser Security API. Service accounts can use any programming language to run the Advanced Browser Security API commands.
You can also use Swagger to interact with the Advanced Browser Security API. Swagger's "Try it out" functionality lets you run and test the Advanced Browser Security API commands. You can find the Advanced Browser Security API in Swagger at the following location:
Note: The link to Swagger [above] is accessible after you sign-in to Perception Point X‑Ray. While you are signed-in to the Advanced Browser Security Console or Perception Point X‑Ray, no further authentication is required when using Swagger with the Advanced Browser Security API. |
API authentication
Authentication is required to run each Advanced Browser Security API command. For authentication, a Bearer token is generated which must be appended to all API calls as the Authorization Header. When you use service accounts to run the Advanced Browser Security API commands, you can use any programming language or environment to run the API commands. Service accounts use OAuth2 Client Credentials for authentication. For details, see API - Authentication for service accounts.
Constructing API commands [PowerShell]
When you use the Advanced Browser Security API, you use the Invoke-RestMethod cmdlet to send the required HTTPS requests.
For example, the Invoke-RestMethod cmdlet below retrieves the personal user details of the currently logged-in user.
Invoke-RestMethod -Method Get -Uri "https://xray.abs.perception-point.io/api/profile" -Headers $Headers
-
For details, on the Invoke-RestMethod cmdlet, see the official Microsoft documentation here.
Parameters
-Method
Can be any one of the standard methods: Get, Post, Patch, or Delete.
See Swagger for the required method for each cmdlet.
-Uri
See Swagger for the required Uri for each cmdlet.
-Headers
For the required -Headers parameter, you can use $Headers values that you got from the authentication procedures. For an example, see Generating an access token using PowerShell [example].
See also: