←Back
1
Getting Keys
Instructions for Getting API Keys
- Navigate to the home page on Granite 360.
- Click the 3 dot menu next to your name on the bottom left corner of the home page.
- Select the
Integrationsoption. - Click the
Create New Keybutton on the top right corner of the Integrations Page. - Enter a name for your keys and hit
create key. - You should have your
client_id(client key) andclient_secret(secret key).
Note
Only company admins can generate keys.
Important
Store your keys securely. Never expose
client_secret in client-side code or public repositories.2
Generating Access Token
Generating an Access Token
The edgeboot integration API uses OAuth2 client-credentials. Exchange your client_id/client_secret for an access token.
Base URL
Base URL: https://api.edgeboot.example.com/api/v1
Example: Get Access Token
Replace YOUR_CLIENT_ID and YOUR_CLIENT_SECRET with your integration credentials.
Example JSON Response
Use the returned access_token to authenticate subsequent requests.
Tip
Always include your access token in the
Authorization: Bearer header for all integration API requests.Security Best Practices
Follow these security practices when using access tokens:
- Never commit
client_secretto version control - Cache the access token until
expires_inand refresh as needed - Store secrets in environment variables
Rate Limits
Rate limits are tied to authenticated requests. See the reboot API documentation (e.g.
RATE_LIMIT_EXCEEDED) for details.3
Call Public Endpoint
Reboot a Device (Public Integration Endpoint)
This makes a public integration API call to reboot an edge device using the /api/v1/integrations/devices/reboot endpoint.
Example: Reboot device
Replace YOUR_ACCESS_TOKEN with the token returned from `/api/v1/auth/token`.
Example JSON Response
If authorized and the device exists, the backend publishes the reboot command over MQTT.
What's Next?
Last updated on