Authentication Using OAuth2.0

The API is used to generate an OAuth token for authentication in BigFix Runbook AI APIs. The token is obtained by making a POST request to the specified API URL with the required parameters. The generated token can then be used to access various BigFix Runbook AI APIs by including it in the Authorization header of the API requests.

Use this API to generate OAuth token for BigFix Runbook AI APIs if the authentication type is OAuth2.0.

Purpose: To generate OAuth token.
API URL: http://<API URL>:<API Port>/token
Authentication type: None
Method Type: POST
Header: "Content-Type", "application/x-www-form-urlencoded"
Body:
Key Value Remarks
grant_type password Fixed value
username APIuser@hcl.com Api user email
password User password User password

Output {

"access_token": "RGpuW4PeA7dABQ7e9s2gYM_Sq0I6B1B8FsNYJJNz29XkadREZhNr7oFRtCnAAa4JMyvsdfas34",

"token_type": "bearer",

"expires_in": 86399

}

Column Column type value Remarks
access_token string token This field provide token
token_type string bearer This field provide token_type
expires_in int time This field provide expire time(in Second)

Use of OAuth Token :

Purpose: To use OAuth Token to access BigFix Runbook AIAPI.
API URL: Any BigFix Runbook AIAPI as mentioned in the section 1, section 2, section 3, and section 4.
Authentication type: Bearer
Token value Token provided by upper API

Example: -

var client = new RestClient("http://localhost:26240/iAutomateAPI/Request/GetIncidentTicketData/19");

client.Timeout = -1;

var request = new RestRequest(Method.GET);

request.AddHeader("Authorization", "Bearer RGpuW4PeA7dABQ7e9s2gYM_Sq0I6B1B8FsNYJJNz29XkadREZhNr

7oFRtCnAAa4JMyvsdfas34");