Get an Authorization Token
Before you begin
- Deploy Proficy Historian for AWS.
- Install an API platform (such as Postman).
About this task
Procedure
- Access an API platform, and request for an authorization token.
-
Enter values as described in the following table, and submit.
Note: The names of these fields may vary depending on the API platform that you are using.
Field Description Token name Provide a name for the token. Grant type Select Client Credentials. Access token URL Enter a value in the following format: https://<NLB DNS>:9090/oauth/token
Tip: To find the NLB DNS:- Access the EKS cluster on which you have deployed Proficy Historian for AWS.
- Access the EC2 instance.
- In the navigation pane, under Load Balancing, select Load Balancers.
- Select the load balancer for which you want to find the DNS.
- In the Description section, copy the DNS name.
Client ID Enter historian_rest_api. Client secret Enter the value you entered in the Password field under Proficy Authentication Configuration when you created the stack. The token is generated. You can use this token to use REST APIs. -
Use the following command to authenticate the REST API authentication with
password credentials:
curl -d "client_id=<value>&client_secret=<value>&grant_type=password&username=<value>&password=<value>&token_format=opaque&response_type=token" https://nlb-dns:9090/oauth/token
For example:curl -d "client_id=server1.admin&client_secret=adminsecret&grant_type=password&username=user1&password=pwd123&token_format=opaque&response_type=token" https://nlb-dns:9090/oauth/token
The following image shows an example of OAuth access. The actual token text is blurred for security concerns.
Client applications can access data using service the REST API endpoints. Your application makes an HTTP request and parses the response. You can use any web-development language to access the APIs.