AdminForce-sync every named shadow on a Thing through the EventBridge pipeline

Force-sync every named shadow on a Thing through the EventBridge pipeline

Enumerates every named shadow on the target Thing (via AWS IoT ListNamedShadowsForThing + GetThingShadow), then invokes the shadow_to_eventbridge Lambda once per shadow with a synthetic Topic-Rule-SQL-shaped event. Lambda → EventBridge → /admin/shadow-webhook → SpacetimeDB populates device_named_shadow as if the hub had organically republished. Auth: X-Admin-API-Key + @smartphonekey.com JWT.

curl -X POST "https://api.spkey.co/admin/shadow-sync/John Doe" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN (JWT)" \
  -H "X-API-Key: YOUR_API_KEY"
{
  "success": true,
  "thingName": "John Doe",
  "shadows": [
    {
      "shadowName": "John Doe",
      "lambdaStatusCode": "null",
      "lambdaRequestId": "null",
      "error": "null"
    }
  ],
  "errors": [
    "example_string"
  ]
}
POST
/admin/shadow-sync/{thingName}
POST
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token (JWT)
Bearer Tokenstring
Required

JWT token from SmartphoneKey authentication. Identifies the B2C user or B2B service.

JWT token from SmartphoneKey authentication. Identifies the B2C user or B2B service.
API Key (header: X-API-Key)
X-API-Keystring
Required

API key for B2B organization access. Provided during organization onboarding.

API key for B2B organization access. Provided during organization onboarding.
path
thingNamestring
Required

AWS IoT thing name to sync. For Matter devices this equals the device UUID.

Min length: 1
Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token (JWT). JWT token from SmartphoneKey authentication. Identifies the B2C user or B2B service.

header
X-API-Keystring
Required

API Key for authentication. API key for B2B organization access. Provided during organization onboarding.

Path Parameters

thingNamestring
Required

AWS IoT thing name to sync. For Matter devices this equals the device UUID.

Responses

successboolean
Required
thingNamestring
Required
shadowsarray
Required
errorsstring[]
Required