REST API Integration
This feature enables seamless data integration between the TSFA platform and third-party systems using REST APIs. External applications can securely access and leverage TSFA-specific data by authenticating with a Client ID and Client Secret. This integration allows users to incorporate TSFA data into device orchestration systems or data visualization tools without logging into the TSFA portal.
Key Capabilities for Licensed Devices
With API access, users can:
- View device information.
- Access event logs.
- Add, delete, and edit labels.
- Update severity settings for their device fleet.
- Upgrade or downgrade the FWS Agent.
- Modify notification settings.
Current Limitations
- Running on-demand measurements through the API is not currently supported.
- Re-generating API credentials via the TSFA portal is not yet available.
Integrating REST APIs Using Client ID and Client Secret Authentication
This guide provides IT and Security administrators with a step-by-step approach to integrating REST APIs securely with platforms like Microsoft Intune, ServiceNow, Ansible, Tableau, Grafana, Power BI, Google Data Studio, and similar tools.
Using Client ID and Client Secret authentication, it ensures secure connections for data exchange, enabling dynamic data retrieval, device management, and automated workflows.
Prerequisites
- REST API credentials, including the Client ID and Client Secret, must be generated in the TSFA Cloud Portal.
- A tool or platform (e.g., Postman, cURL) is required to request access tokens from the API.
- Proper security measures, such as credential storage and token management, must be in place.
1. Get Client ID and Client Secret
To generate an access token, obtain the Client ID and Client Secret from your TSFA organization.
1. Navigate to Organization Settings and select the API Credentials tab.
2. Click the Generate button.
3. Copy the Client ID and Client Secret and store them securely.
Client Secret can be rotated by clicking the Regenerate button. The previous Secret will be invalidated immediately.
2. Request Access Token
Authenticate API Requests
To authenticate your API requests, use a tool like Postman or cURL to exchange your Client ID and Client Secret for an access token.
Example Using Postman:
- Open Postman and create a new POST request.
- Set the URL to the API's token endpoint: https://api.naea1.uds.lenovo.com/tsfa/external-api-service/(specify endpoints here)
Refer to the list of endpoints here.
You can download the list of endpoints from the cloud portal under Organization Settings > API Credentials. - In the Body, set it to x-www-form-urlencoded and include the following fields:
- client_id: Your Client ID
- client_secret: Your Client Secret
- grant_type: Set to client_credentials
- OrgId: Copy the OrgId from your organization's URL: https://portal-platform.naea1.uds.lenovo.com/uds001-orgname/
- Click Send. The response will include the access token.

The access token will expire in 5 mins, so make sure the automated token refresh process is configured in your software.
With the access token, you can now connect your API to the desired system, such as a device orchestration platform, data visualization tool, or any software supporting REST API integration.
General Steps for API Integration
- Open your platform’s API integration section and select the option to add a REST API or Web API.
- Enter the API endpoint: e.g., https://api.naea1.uds.lenovo.com/tsfa/external-api-service/{specify-endpoint-here}
- In the Header, include the access token:
- Key: Authorization
- Value: Bearer your_access_token
- Add any required URL parameters, such as device identifiers or pagination settings.
- Run the query. If successful, the system will retrieve the requested data.
Common Platforms and Their Integration Paths
Device Orchestration Tools (e.g., Ansible, ServiceNow)
- Use the REST API to automate device management, patching, or configuration tasks across endpoints.
- Example: Integrate Ansible to pull device health data via the API and generate reports.
Data Visualization Tools (e.g., Grafana, Tableau, Google Data Studio)
- Use REST API data to build visual dashboards or create custom reports.
- Example: Connect Grafana to the API to visualize server uptime or hardware status metrics.
Automation Platforms (e.g., Zapier, Integromat, Workato)
- Integrate REST APIs to automate workflows between different systems.
- Example: Use a REST API to send device alerts to a Slack channel or automate email notifications.
Common Issues and Troubleshooting
- Token Expiry: automate the token refresh process to ensure uninterrupted access and prevent expired token errors.
- Unauthorized Access: ensure that the access token is valid and that API requests are properly authorized.
- API Rate Limits: monitor API usage to avoid errors to avoid errors or being blocked by the provider.
- Timeouts: for large data sets, utilize pagination or batch processing to avoid request timeouts.