How to connect to ATP via API

book

Article ID: 179105

calendar_today

Updated On:

Products

Symantec Products

Issue/Introduction

 

Resolution

If there is a need to use APIs while working on ATP then this article will help us to know the process of achieving access token which is required to connect to ATP.

We can refer to the below link for the ATP help guide:

https://help.symantec.com/api-doc/atp_2.2/EN_US/

 

We would require an API Rest client in order to perform the below steps:

  1. Go to ATP console>Settings>DataSharing>Add OAuth Client>generate Client ID & Client Secret.

  2. I will be using Rest console to perform the steps which can be downloaded from http://restconsole.com/ (Please note: This is not Symantec approved Rest client plugin, we may choose to use any other plugin if required).Open the Rest Console, type https://x.x.x.x (ATP IP)/atpapi/oauth2/tokens in Request URI in Target section.

  3. Open the Rest Console, type https://x.x.x.x (ATP IP)/atpapi/oauth2/tokens in Request URI in Target section.
  4. Check content type and mention application/json in Accept

  5. Choose POST from the Request Method Drop down menu like below:

  6. Check Content Headers box under Body section and mention application/x-www-form-urlencoded

  7. Edit RAW Body like below:

  8. Go to https://www.base64encode.org/ and copy your client id & client secret from the ATP console and paste like clientid:clientsecret in the text box and then click encode.

  9. Copy the encoded value from 2nd text box and paste it on Rest Console in Authorization like below:

  10. Click on the send button and we will recevice an access token like below:

  11. Now this access token can be used while using the APIs mentioned in the article: https://help.symantec.com/api-doc/atp_2.2/EN_US/

  12. Copy the access token and mention in the Authorization header like step#9. Please type Bearer instead of basic when using APIs once access token is generated:

 

Attachments