Agent Management
Regenerate a device code
Changed onGenerate a new device code for an existing agent. Use this when the original device code has expired before being redeemed, or when the agent software needs to be reinstalled. An agent has at most one unredeemed device code, so regenerating invalidates the one issued before it.
post/agents/{agentId}/device-codes
Request
- Base URLhttps://api.lightspark.com/grid/2025-10-13
- URLhttps://api.lightspark.com/grid/2025-10-13/agents/{agentId}/device-codes
- AuthHTTP basic
Response
New device code generated successfully
Example response
{
"code": "jqzJR3AgI9OAwb_enypARw",
"agentId": "Agent:019542f5-b3e7-1d02-0000-000000000001",
"expiresAt": "2025-07-22T17:32:28Z"
}Changes
- info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status
- info
- warning
added the new
CORRIDOR_UNDER_MAINTENANCEenum value to theresponse property for the response status
- warning