canonical: https://jentic.com/apis/azure.com/iotspacesclient

# Microsoft Azure IoTSpacesClient

Jentic publishes the only available OpenAPI specification for IoTSpacesClient, keeping it validated and agent-ready. The Microsoft.IoTSpaces resource provider (the predecessor of Azure Digital Twins) manages IoTSpaces Graph service instances under an Azure subscription. It exposes 8 ARM endpoints to create, update, list, and delete Graph instances, check service name availability, and enumerate provider operations.

## For AI agents

Provision and manage Azure IoTSpaces Graph service instances and check service name availability via Azure Resource Manager.

## Scope

Does not handle spatial graph queries, telemetry routing, or device-side data ingestion - use for IoTSpaces Graph control-plane management only.

## Capabilities

- Create or update an IoTSpaces Graph service instance in a resource group
- List Graph service instances across a subscription or filtered by resource group
- Retrieve a single Graph instance by resource name
- Check whether a candidate IoTSpaces service name is available before deploy
- Enumerate Microsoft.IoTSpaces operations exposed on the subscription

## Use cases

### Spatial Intelligence for Smart Buildings

Building operators provision an IoTSpaces Graph instance per facility to model rooms, floors, and zones, then attach sensors and devices to those nodes for spatial telemetry. The control-plane API drives the create-and-update lifecycle through ARM, so the same automation that provisions IoT Hubs can stand up a Graph instance alongside. Setup of a Graph instance is a few minutes through the API.

Example prompt: Check name availability for 'hq-spaces', then PUT a new IoTSpaces Graph in resource group 'rg-iot' using sku F1.

### Subscription-Wide IoTSpaces Inventory

Operations teams enumerate every IoTSpaces Graph instance across a subscription to track sprawl, audit billing, and align tagging with other IoT resources. Both subscription-scoped and resource-group-scoped listings are available, so the inventory pivots cleanly by team. Inventory completes in seconds for typical fleets.

Example prompt: List every IoTSpaces Graph in the subscription and emit a CSV with name, resourceGroup, location, and sku.

### Migration Discovery to Azure Digital Twins

Teams planning migration from IoTSpaces to its successor Azure Digital Twins start by enumerating existing IoTSpaces Graph instances and capturing their location and sku. The output drives the migration plan because each Graph instance maps to an ADT instance in the new model. Discovery typically takes minutes.

Example prompt: List every IoTSpaces Graph in the subscription and produce a JSON migration plan keyed by resourceName.

### Agent-Driven IoTSpaces Operations via Jentic

An AI ops agent can stand up and audit IoTSpaces Graph instances through Jentic without holding raw Azure AD credentials. The agent searches Jentic for 'create an Azure IoTSpaces graph', loads the operation schema, and executes against Microsoft.IoTSpaces. Jentic's your Jentic One instance injects a scoped bearer token for management.azure.com.

Example prompt: Use the Jentic MCP tool azure_iotspaces_create_graph to provision IoTSpaces Graph 'demo-spaces' in resource group 'rg-iot'.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /subscriptions/{subscriptionId}/providers/Microsoft.IoTSpaces/Graph | List IoTSpaces Graph instances in the subscription |
| GET | /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTSpaces/Graph | List IoTSpaces Graph instances in a resource group |
| PUT | /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTSpaces/Graph/{resourceName} | Create or update an IoTSpaces Graph |
| GET | /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTSpaces/Graph/{resourceName} | Get a single IoTSpaces Graph by name |
| POST | /subscriptions/{subscriptionId}/providers/Microsoft.IoTSpaces/checkNameAvailability | Check if an IoTSpaces service name is available |

## Key resources

- **Graph** — IoTSpaces Graph service instance - the spatial graph runtime
- **NameAvailability** — Pre-flight check for IoTSpaces service name collisions
- **Operations** — Microsoft.IoTSpaces operations advertised by the resource provider

## Why Jentic

- **Setup:** Wiring the IoTSpaces (Digital Twins Graph) management API by hand means registering an Azure AD app, negotiating OAuth 2.0 tokens for management.azure.com, and carrying subscription and resource-group scope through every Graph call. Through Jentic you install once, import IoTSpacesClient from the API Directory, store the Azure AD credential once, and your agent calls it.
- **Permission scoping:** This API puts the Graph resource in the URL path (/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTSpaces/Graph/{resourceName}), so a rule can pin your agent to one Graph resource: it can read that resource and check name availability. You choose the operations it may call, so creating or replacing a Graph is not included unless you add it.
- **Credential handling:** Your Azure AD credential for the IoTSpaces control plane is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'list IoTSpaces Graph resources' or 'check an IoTSpaces name', and Jentic returns the matching IoTSpaces operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Azure IoT Hub** — IoT Hub ingests device messages that an IoTSpaces Graph projects into spatial nodes.
- **Azure IoT Central** — IoT Central is a SaaS app shell that includes its own modelling without IoTSpaces.
- **Azure IoT Device Provisioning Service** — DPS handles zero-touch onboarding for the devices that feed into a spatial graph.

## FAQ

### Why is there no official OpenAPI spec for IoTSpacesClient?

Microsoft does not publish a maintained OpenAPI 3 specification for the legacy Microsoft.IoTSpaces resource provider. Jentic generates and maintains this spec so that AI agents and developers can call IoTSpacesClient via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the IoTSpacesClient use?

It uses Azure Active Directory OAuth 2.0 against management.azure.com with the user_impersonation scope, the standard ARM auth. Through Jentic the AAD client secret is held in the your Jentic One instance and a scoped bearer token is injected per call so the agent never sees raw secrets.

### Can I check service name availability before creating an IoTSpaces graph?

Yes. POST to /subscriptions/{subscriptionId}/providers/Microsoft.IoTSpaces/checkNameAvailability with the candidate name in the request body. The response indicates whether the name is taken and surfaces a reason code if it is invalid.

### What are the rate limits for IoTSpacesClient?

It runs on the Azure Resource Manager plane and inherits ARM throttling - typically 12,000 reads and 1,200 writes per hour per subscription, surfaced via x-ms-ratelimit-remaining-subscription-* headers. The IoTSpaces RP itself does not document tighter management-plane limits.

### How do I provision an IoTSpaces graph through Jentic?

Run pip install jentic, then search Jentic with 'create an Azure IoTSpaces graph', load the create-or-update operation, and execute with subscriptionId, resourceGroupName, resourceName, location, and sku. Jentic returns the deployed resource.

### Should I be using IoTSpaces or Azure Digital Twins?

For new workloads, Azure Digital Twins is the supported successor to IoTSpaces and offers a richer DTDL-based modelling surface. Use this API only when you are operating an existing IoTSpaces deployment that has not yet been migrated.

### Can I limit what my agent is allowed to do with the Microsoft Azure IoTSpaces API?

Yes. Because Jentic One is self-hosted, your own rules decide which IoTSpaces operations and Azure AD credential the agent may use. Since this API carries the Graph resource in the URL path, you can pin the agent to a single Graph resource and allow only reads and name-availability checks. Create-or-update operations that replace a Graph stay off unless you explicitly grant them.
