REST API call to get an access token required in Events API call

Prev Next

The Events API call expects an access token in its request parameters. To generate the access token, use this call.

POST request URL

https://iam.cloud.trellix.com/iam/v1.0/token

Request Parameters

Provide these parameters as a "body" type parameter to get the access token.

Parameter

Description

Parameter type

Data type

Required

Default

scope

epo.evt.r dp.im.r is the value required for scope. Allows user to access data loss prevention threat events for

Body

String

Yes

epo.evt.r dp.im.r

client_id

Client Id of your account. To obtain the client Id, go to https://auth.ui.trellix.com/support.html.

Body

String

Yes

NA

grant_type

"password" is the grant type

Body

String

Yes

password

username

ePO - SaaS tenant username.

Body

String

Yes

NA

password

ePO - SaaS tenant password.

Body

String

Yes

NA

Sample POST request URL

https://iam.cloud.trellix.com/iam/v1.0/token

Sample cURL command

curl -L -k -XPOST 'https://iam.cloud.trellix.com/iam/v1.0/token' --data "username=<admin_username>" --data "password=<admin_password>" --data "client_id=xxxxxxxxxxxxxx" --data "grant_type=password" --data-urlencode "scope=epo.evt.r dp.im.r" -H "accept: application/json" -H "content-type: application/x-www-form-urlencoded" -H "cache-control: no-cache"

Response code

Returns the access token, which is required to execute the Events API call. Enter the access token for the Authorization: Bearer Type parameter in the Events API call. The access token is valid for an hour (3600s). After the token expires, you can get a new token before executing the API call.

Sample access token

eyJ0eXAiOiJKV1QiLCJhbGciOixxxxx1NiIsIng1dCI6IkpjRlAxUlpONnJ3OEJ1OWt5YzJRQmVDUmxfYyIsImtpZCI6IkpjRlAxUlpONnJ3OEJ1OWt5YzJRQmVDUmxfYyJ9.eyJpc3MiOiJodHRwczovL2lhbS5tY2FmZWUtY2xvdWQuY29tL2lhbS92MS4wIiwibmJmIjoxNjgxOTE0ODkxLCJzdWIiOiIwMHVmOGFyOXhkQm45ZVRvMTJwNyIsInNjb3BlIjoiZHAuaW0uciBlcG8uZXZ0LnIgb3BlbmlkIiwidGVuYW50X2lkIjoiMUU0QUI1MzItMDhDNC00MEE0LUI4NUEtODAxQ0I4RUU5MTE1IiwiYXVkIjoibWNhZmVlIiwiZ2l2ZW5fbmFtZSI6Im12aXNpb24iLCJjbGllbnRfaWQiOiIwb2FlOHE5cTJ5MElaT1lVbTBoNyIsImxvY2FsZSI6ImVuX1VTIiwiZXhwIjoxNjgxOTE4NTAxLCJpZHAiOiIwMG9ocDFkbTNyZ3pnQVF2MzJwNiIsImVtYWlsIjoibXZpc2lvbi5lMmUrNlVTVzAwNEBnbWFpbC5jb20iLCJmYW1pbHlfbmFtZSI6ImUyZTZVU1cwMDQiLCJ0b2tlbl9pZCI6IjVTamJ6dXBCeE54czhQWVUtTkhFMzk1QUIiLCJ6b25laW5mbyI6IiIsImxvZ2luX2hpbnQiOiJtdmlzaW9uLmUyZSs2VVNXMDA0QGdtYWlsLmNvbSIsIm5vbmNlIjoiIn0.dn43VNVFJxracRY9MrBVSGRBzElf_awMF6mhK1N_nxxxxxxxxxxxxxxxxxxxxx-NNMd26Syi-uRsVFFz9Vygpz5thO3Al4dBibZCYakXg8Tt_T6cIRKbQggjP72ZuLBe9Q6ZCIt3GJmL2W7PxgZYE35VWlCgQXZuh6ySxPG3YQCEKSk6UFb2etDUmQBtmPuMxa0yFT9XlI5mEZEYGLfei2TX7W_ItDIGPtv-KIUK1eYZrIxU5rmWqVv1pcTlcf-7IOUcD_XPJVw7ZUqwhXIOpcQuzhC0jgnE_MLk-bUHb9nK3iYwSNj8GiNlfpjLuSugq-WHFgQNbo6IS-EjtO2ifFGrQ

Status and error codes

Code

Description

200 OK

Shows the access token.

400 Bad request

The request parameters or format might be invalid.

401 Unauthorized

Unauthorized access.

403 Forbidden

Forbidden.