endpoint_query
endpoint_queryFind connected devices and services, discover their controls, and read their state.
Start with a focused name, room or category query; follow paginationContext.nextToken. Results include full IDs, device types, provider routes, capabilities and accepted message IDs. An endpoint is a device or connected service, including a filesystem or media library. Copy IDs verbatim into control. For a known device, use endpointId; inspect its declared capabilities, commands and outbound message IDs. Use group_query for rooms and endpoint_manage for requested inventory cleanup.
To read state, set expand to the declared capabilities you need, for example ["power","connectivity"] or ["battery"]. expand adds observations; it does not discover more devices or send controls. Add forceDeviceAttributeQuery=true to refresh selected attributes from the provider; otherwise readings may come from cache. Only FRESH observations establish the current state. A FRESH value is the current state; a STALE value is the last known state, reported with its sampledAt and never as live or unknown (a forced read may refresh it). Errored, missing or invalid values are unknown, not OFF or a dead battery, and a STALE value alone must not support a safety claim such as locked or off. An attribute with error.code PROVIDER_NO_STATE (forced reads only) means the provider answered but has no value for it: state is unknown and retrying will not help until the provider reports one. FRESH UNREACHABLE means offline even if a power value is present; STALE UNREACHABLE is the last known connectivity. An ID-only lookup retrieves metadata without requesting fresh state.
Supported discovery includes:
- Lights, switches and plugs: select by name and power/brightness capabilities as well as type; a light may be typed SWITCH or PLUG.
- Thermostats and sensors: read temperature-sensor for ambient temperature; a setpoint is not room temperature. Clarify indoor versus outdoor temperature when ambiguous.
- Cameras, locks, appliances, vacuums, pet appliances, sprinklers and water sensors: inspect declared controls and observations.
- Phones, Apple Watch and trackers: read battery, charging, connectivity or location capabilities; use control for a declared ring command.
- Speakers, TVs and media services: discover playback, volume, search and playlist commands. Alexa devices may be VOICE_ASSISTANT.
- Filesystems, photos, calendars and reminders: choose a concrete route-backed service, rather than a generic plugin catalog or an old unrouted record.
Read portos://guides/index or the bundled Port OS skill references for device workflows. Keep the account with every ID; check relevant authorized accounts before reporting a device missing. Names alone do not prove identity. Preserve routeId for the chosen provider and establish identity before merging records. By default lists contain enabled devices; enablement=DISABLED selects disabled devices and enablement=* includes both. Exact endpointId lookup can read metadata regardless of enablement. With group:read, controllableGroups lists rooms a device can act on. Simulator state does not establish household device state.
Required scope
endpoint:readInput
Fields
- enablement
string Filter by ENABLED (default), DISABLED, or * for both. This filter is preserved by pagination.
Default:
ENABLEDAllowed values: ENABLED, DISABLED, *.
- endpointId
string Return one endpoint by its full Port OS identifier. Cannot be combined with other filters or pagination. Results advertise its declared command and outbound message IDs.
- expand
array<string> Select observations to add to each device result, for example ["power", "connectivity"] or ["battery"]. Use capability names or full namespaces declared by the device. This reads attributes; it does not send commands or broaden the device search. Short names use port1/systems/zero/capability-interfaces. No state reads by default.
- forceDeviceAttributeQuery
boolean Read selected attributes from devices instead of cache. Requires nonempty expand. Failed reads remain unavailable.
- query
object Optional field-first filter. Omit it to load full context; filter only when the account is large. Each key is a field or a combinator, and all keys of one object must match: {"name": {"like": "living"}, "type": {"in": ["LIGHT", "SWITCH"]}}. Combinators: {"and": [query, ...]}, {"or": [query, ...]}, {"not": query}. Text operators: eq (exact), in (any of a list), like (case-insensitive substring), lt and gt (lexical order). List operators: has (contains the exact value), like (some value contains the substring, case-insensitive). Fields: the fields your connected devices declare, listed in the tool description returned by tools/list.
Result
Fields
- (payload)
object - option 1
object - results
array<EndpointSummary>Required - controllableGroups
array<object> - geometry
object The room outline from the group's stored spatial geometry (cached, never a provider read). Present on every single-endpoint read (endpoint_show or endpoint_query with endpointId), never on lists, and only for rooms whose geometry is usable; rooms without it stay listed. Rooms sharing a frameId are one map. Tiny speckle and excess detail are dropped to keep the result bounded.
- geometry
- cardIds
array<string> Card ids the device can show as its primary card in endpoint_show. Present only on endpoint_show results.
- interfaces
array<EndpointInterfaceSummary>Required - attributes
array<option 1 | option 2>Required - option 2
object - freshness
string Whether the value is current enough to present as the device's present state. `FRESH`: the provider reported a sample within the last 30 seconds, or a forced refresh (`forceDeviceAttributeQuery=true` or `forceDeviceQuery`) read the provider during this request and the provider reported no sample time. `STALE`: the value is older than 30 seconds, came from stored state, or is a provider's own last known value. A forced refresh cannot make a provider's old sample newer: when the provider (for example a thermostat reached through a voice-assistant account) answers with the sample it already holds, the value keeps its original `sampledAt` and is `STALE`. Report the value together with `sampledAt`, never as the present reading.
Allowed values: FRESH, STALE.
- retrievability
stringRequired Whether the serving route supports retrieving this attribute.
Allowed values: RETRIEVABLE, NOT_RETRIEVABLE.
- autoUpdateFrequency
stringRequired Declared frequency at which the serving route automatically updates this attribute.
Allowed values: REALTIME, MINUTES, HOURLY, DAILY, NEVER.
- error
Error The one Port OS error shape, returned by every REST error response and every MCP tool error. `code` names the specific failure and `family` its broad class; both are closed enums, so clients branch on them and show `message`, which says what failed and what to do next.
- family
stringRequired The broad class of an error. The family decides the HTTP status of a REST error, so clients can handle every code of a family alike.
Allowed values: NOT_FOUND, BAD_REQUEST, UNAUTHORIZED, FORBIDDEN, CONFLICT, GONE, PRECONDITION_FAILED, PRECONDITION_REQUIRED, PAYLOAD_TOO_LARGE, UNSUPPORTED_MEDIA_TYPE, UNPROCESSABLE_ENTITY, LOCKED, TOO_MANY_REQUESTS, BAD_GATEWAY, SERVICE_UNAVAILABLE, GATEWAY_TIMEOUT, NOT_IMPLEMENTED, INTERNAL_SERVER_ERROR, REQUEST_INVALID, AUTHENTICATION, PERMISSION, ENDPOINT_NOT_FOUND, ENDPOINT_STATE_CONFLICT, ENDPOINT_UNAVAILABLE, RATE_LIMIT, PROVIDER_BAD_RESPONSE, PROVIDER_UNAVAILABLE, PROVIDER_TIMEOUT.
- code
stringRequired The specific error, one of a closed set of Port OS codes. Every REST error body, MCP tool error, batch item error and discovery item error uses this enum; each code belongs to an `ErrorFamily` that decides its HTTP status. Provider-specific codes are never codes: they travel in `details.providerCode`. New failure kinds are added here, never as free strings.
Allowed values: BAD_REQUEST, UNAUTHORIZED, FORBIDDEN, INSUFFICIENT_SCOPE, NOT_FOUND, CONFLICT, UNPROCESSABLE_ENTITY, UNSUPPORTED_OPERATION, TOO_MANY_REQUESTS, SERVICE_UNAVAILABLE, NOT_IMPLEMENTED, INTERNAL, CHECKSUM_MISMATCH, FILE_TOO_LARGE, STORAGE_UNAVAILABLE, INSUFFICIENT_PERMISSIONS, INVALID_FILE_TYPE, QUOTA_EXCEEDED, CONCURRENT_MODIFICATION, ENDPOINT_UNREACHABLE, BRIDGE_UNREACHABLE, CLOUD_CONTROL_DISABLED, ENDPOINT_BUSY, ENDPOINT_LOW_POWER, AUTHORIZATION_CREDENTIAL_INVALID, AUTHORIZATION_CREDENTIAL_EXPIRED, INVALID_DIRECTIVE, INVALID_VALUE, VALUE_OUT_OF_RANGE, NOT_SUPPORTED_IN_CURRENT_MODE, RATE_LIMIT_EXCEEDED, PROVIDER_SERVICE_UNAVAILABLE, PROVIDER_TIMEOUT, PROVIDER_INTERNAL_ERROR, INVALID_PROVIDER_RESPONSE, OUTCOME_UNKNOWN, PRECONDITION_FAILED, AUTH_LINK_NOT_READY, AUTH_LINK_NOT_DISCONNECTABLE, PRECONDITION_REQUIRED, IDEMPOTENCY_KEY_REQUIRED, IDEMPOTENCY_KEY_REUSED, IDEMPOTENCY_KEY_IN_FLIGHT, IDEMPOTENCY_KEY_INVALID, GROUP_MERGED, MULTI_ROOM_UNSUPPORTED, MAP_NOT_ACTIVE, TARGET_UNSUPPORTED, TARGET_AMBIGUOUS, TARGET_GROUP_NOT_FOUND, TARGET_GROUP_DISABLED, DUPLICATE_TARGET_GROUP, MESSAGE_UNSUPPORTED, MESSAGE_AMBIGUOUS, ENDPOINT_DISABLED, ENDPOINT_ROUTE_CHANGED, ENDPOINT_HAS_DEPENDENCIES, ENDPOINT_EVENT_SUBSCRIPTIONS_ACTIVE, ENDPOINT_COMMITTED_CLEANUP_PENDING, DEEP_QUERY_FAILED, PROVIDER_NO_STATE, EVENT_MANAGEMENT_DISABLED, SUBSCRIPTION_IDENTITY_IMMUTABLE, UNSUPPORTED_MEDIA_TYPE, EVENT_PAYLOAD_TOO_LARGE, REQUEST_BODY_TOO_LARGE, EVENT_IDENTITY_CONFLICT, EVENT_INGRESS_QUOTA_EXCEEDED, EVENT_RECEIPT_EXPIRED, EVENT_STORAGE_UNAVAILABLE, EVENT_DEAD_LETTER_NOT_FOUND, EVENT_REDRIVE_CONFLICT, EVENT_REDRIVE_EXPIRED, RECEIPT_CONTEXT_EXPIRED, EVENT_MAINTENANCE_INCOMPLETE, UNKNOWN_INTERFACE, INVALID_CONFIGURATION, INVALID_ATTRIBUTE, INVALID_PROVIDER_MESSAGE, UNDECLARED_CAPABILITY, PLUGIN_ROUTE_ID_CONFLICT, UNRESOLVED_REFERENCE, INVALID_RELATIONSHIP, RELATIONSHIP_CYCLE, MULTIPLE_PARENTS, FLOW_VALIDATION_FAILED.
- details
ErrorDetails Optional typed context for an error. Fields are additive and only populated when the error can safely expose that context to API clients.
- discoveryEndpointId
string Port OS provider endpoint (type ENDPOINT_PLUGIN) of the connection to send `discover-routes` to when `code` is `TARGET_UNSUPPORTED` because the route must be rediscovered.
- retryAfterSeconds
integer Suggested retry delay for rate-limit or provider-unavailable failures.
minimum: 0
- providerCode
string The third-party provider's own error code, for support. It is opaque and provider-specific; branch on `code` and `family` instead.
- discoveryEndpointId
- errors
array<SynchronizationItemError> Every rejected item when a request that is validated item by item and applied atomically fails, such as a discovery `SynchronizationRequest` whose routes, group routes or relationships are rejected. Omitted for single-item failures.
One rejected discovery item of a `SynchronizationRequest`, keyed by the plugin-owned identity of the rejected item: `pluginRouteId` for a route or group route, or `relationshipExternalId` for a relationship. Exactly one of the two is set. It shares the `code`, `family`, `status` and `message` fields of `BatchItemError`; discovery items are keyed by plugin-owned identity because they carry no `requestId`. A request with any rejected item is rejected as a whole and lists every rejected item.
- pluginRouteId
string Plugin-owned identifier of the rejected route or group route. Set unless the item is a relationship.
- relationshipExternalId
string Plugin-owned `externalId` of the rejected relationship. Set only for relationship items.
- interface
string Canonical capability interface name the failure applies to, when the failure is interface-specific.
- version
string Declared capability interface version the failure applies to, when the failure is interface-specific.
- code
stringRequired The specific error, one of a closed set of Port OS codes. Every REST error body, MCP tool error, batch item error and discovery item error uses this enum; each code belongs to an `ErrorFamily` that decides its HTTP status. Provider-specific codes are never codes: they travel in `details.providerCode`. New failure kinds are added here, never as free strings.
Allowed values: BAD_REQUEST, UNAUTHORIZED, FORBIDDEN, INSUFFICIENT_SCOPE, NOT_FOUND, CONFLICT, UNPROCESSABLE_ENTITY, UNSUPPORTED_OPERATION, TOO_MANY_REQUESTS, SERVICE_UNAVAILABLE, NOT_IMPLEMENTED, INTERNAL, CHECKSUM_MISMATCH, FILE_TOO_LARGE, STORAGE_UNAVAILABLE, INSUFFICIENT_PERMISSIONS, INVALID_FILE_TYPE, QUOTA_EXCEEDED, CONCURRENT_MODIFICATION, ENDPOINT_UNREACHABLE, BRIDGE_UNREACHABLE, CLOUD_CONTROL_DISABLED, ENDPOINT_BUSY, ENDPOINT_LOW_POWER, AUTHORIZATION_CREDENTIAL_INVALID, AUTHORIZATION_CREDENTIAL_EXPIRED, INVALID_DIRECTIVE, INVALID_VALUE, VALUE_OUT_OF_RANGE, NOT_SUPPORTED_IN_CURRENT_MODE, RATE_LIMIT_EXCEEDED, PROVIDER_SERVICE_UNAVAILABLE, PROVIDER_TIMEOUT, PROVIDER_INTERNAL_ERROR, INVALID_PROVIDER_RESPONSE, OUTCOME_UNKNOWN, PRECONDITION_FAILED, AUTH_LINK_NOT_READY, AUTH_LINK_NOT_DISCONNECTABLE, PRECONDITION_REQUIRED, IDEMPOTENCY_KEY_REQUIRED, IDEMPOTENCY_KEY_REUSED, IDEMPOTENCY_KEY_IN_FLIGHT, IDEMPOTENCY_KEY_INVALID, GROUP_MERGED, MULTI_ROOM_UNSUPPORTED, MAP_NOT_ACTIVE, TARGET_UNSUPPORTED, TARGET_AMBIGUOUS, TARGET_GROUP_NOT_FOUND, TARGET_GROUP_DISABLED, DUPLICATE_TARGET_GROUP, MESSAGE_UNSUPPORTED, MESSAGE_AMBIGUOUS, ENDPOINT_DISABLED, ENDPOINT_ROUTE_CHANGED, ENDPOINT_HAS_DEPENDENCIES, ENDPOINT_EVENT_SUBSCRIPTIONS_ACTIVE, ENDPOINT_COMMITTED_CLEANUP_PENDING, DEEP_QUERY_FAILED, PROVIDER_NO_STATE, EVENT_MANAGEMENT_DISABLED, SUBSCRIPTION_IDENTITY_IMMUTABLE, UNSUPPORTED_MEDIA_TYPE, EVENT_PAYLOAD_TOO_LARGE, REQUEST_BODY_TOO_LARGE, EVENT_IDENTITY_CONFLICT, EVENT_INGRESS_QUOTA_EXCEEDED, EVENT_RECEIPT_EXPIRED, EVENT_STORAGE_UNAVAILABLE, EVENT_DEAD_LETTER_NOT_FOUND, EVENT_REDRIVE_CONFLICT, EVENT_REDRIVE_EXPIRED, RECEIPT_CONTEXT_EXPIRED, EVENT_MAINTENANCE_INCOMPLETE, UNKNOWN_INTERFACE, INVALID_CONFIGURATION, INVALID_ATTRIBUTE, INVALID_PROVIDER_MESSAGE, UNDECLARED_CAPABILITY, PLUGIN_ROUTE_ID_CONFLICT, UNRESOLVED_REFERENCE, INVALID_RELATIONSHIP, RELATIONSHIP_CYCLE, MULTIPLE_PARENTS, FLOW_VALIDATION_FAILED.
- family
stringRequired The broad class of an error. The family decides the HTTP status of a REST error, so clients can handle every code of a family alike.
Allowed values: NOT_FOUND, BAD_REQUEST, UNAUTHORIZED, FORBIDDEN, CONFLICT, GONE, PRECONDITION_FAILED, PRECONDITION_REQUIRED, PAYLOAD_TOO_LARGE, UNSUPPORTED_MEDIA_TYPE, UNPROCESSABLE_ENTITY, LOCKED, TOO_MANY_REQUESTS, BAD_GATEWAY, SERVICE_UNAVAILABLE, GATEWAY_TIMEOUT, NOT_IMPLEMENTED, INTERNAL_SERVER_ERROR, REQUEST_INVALID, AUTHENTICATION, PERMISSION, ENDPOINT_NOT_FOUND, ENDPOINT_STATE_CONFLICT, ENDPOINT_UNAVAILABLE, RATE_LIMIT, PROVIDER_BAD_RESPONSE, PROVIDER_UNAVAILABLE, PROVIDER_TIMEOUT.
- pluginRouteId
- family
- freshness
- option 2
- attributes
- routes
array<object> - interfaces
array<EndpointInterfaceSummary>Required - attributes
array<option 1 | option 2>Required - option 2
object - freshness
string Whether the value is current enough to present as the device's present state. `FRESH`: the provider reported a sample within the last 30 seconds, or a forced refresh (`forceDeviceAttributeQuery=true` or `forceDeviceQuery`) read the provider during this request and the provider reported no sample time. `STALE`: the value is older than 30 seconds, came from stored state, or is a provider's own last known value. A forced refresh cannot make a provider's old sample newer: when the provider (for example a thermostat reached through a voice-assistant account) answers with the sample it already holds, the value keeps its original `sampledAt` and is `STALE`. Report the value together with `sampledAt`, never as the present reading.
Allowed values: FRESH, STALE.
- retrievability
stringRequired Whether the serving route supports retrieving this attribute.
Allowed values: RETRIEVABLE, NOT_RETRIEVABLE.
- autoUpdateFrequency
stringRequired Declared frequency at which the serving route automatically updates this attribute.
Allowed values: REALTIME, MINUTES, HOURLY, DAILY, NEVER.
- error
Error The one Port OS error shape, returned by every REST error response and every MCP tool error. `code` names the specific failure and `family` its broad class; both are closed enums, so clients branch on them and show `message`, which says what failed and what to do next.
- family
stringRequired The broad class of an error. The family decides the HTTP status of a REST error, so clients can handle every code of a family alike.
Allowed values: NOT_FOUND, BAD_REQUEST, UNAUTHORIZED, FORBIDDEN, CONFLICT, GONE, PRECONDITION_FAILED, PRECONDITION_REQUIRED, PAYLOAD_TOO_LARGE, UNSUPPORTED_MEDIA_TYPE, UNPROCESSABLE_ENTITY, LOCKED, TOO_MANY_REQUESTS, BAD_GATEWAY, SERVICE_UNAVAILABLE, GATEWAY_TIMEOUT, NOT_IMPLEMENTED, INTERNAL_SERVER_ERROR, REQUEST_INVALID, AUTHENTICATION, PERMISSION, ENDPOINT_NOT_FOUND, ENDPOINT_STATE_CONFLICT, ENDPOINT_UNAVAILABLE, RATE_LIMIT, PROVIDER_BAD_RESPONSE, PROVIDER_UNAVAILABLE, PROVIDER_TIMEOUT.
- code
stringRequired The specific error, one of a closed set of Port OS codes. Every REST error body, MCP tool error, batch item error and discovery item error uses this enum; each code belongs to an `ErrorFamily` that decides its HTTP status. Provider-specific codes are never codes: they travel in `details.providerCode`. New failure kinds are added here, never as free strings.
Allowed values: BAD_REQUEST, UNAUTHORIZED, FORBIDDEN, INSUFFICIENT_SCOPE, NOT_FOUND, CONFLICT, UNPROCESSABLE_ENTITY, UNSUPPORTED_OPERATION, TOO_MANY_REQUESTS, SERVICE_UNAVAILABLE, NOT_IMPLEMENTED, INTERNAL, CHECKSUM_MISMATCH, FILE_TOO_LARGE, STORAGE_UNAVAILABLE, INSUFFICIENT_PERMISSIONS, INVALID_FILE_TYPE, QUOTA_EXCEEDED, CONCURRENT_MODIFICATION, ENDPOINT_UNREACHABLE, BRIDGE_UNREACHABLE, CLOUD_CONTROL_DISABLED, ENDPOINT_BUSY, ENDPOINT_LOW_POWER, AUTHORIZATION_CREDENTIAL_INVALID, AUTHORIZATION_CREDENTIAL_EXPIRED, INVALID_DIRECTIVE, INVALID_VALUE, VALUE_OUT_OF_RANGE, NOT_SUPPORTED_IN_CURRENT_MODE, RATE_LIMIT_EXCEEDED, PROVIDER_SERVICE_UNAVAILABLE, PROVIDER_TIMEOUT, PROVIDER_INTERNAL_ERROR, INVALID_PROVIDER_RESPONSE, OUTCOME_UNKNOWN, PRECONDITION_FAILED, AUTH_LINK_NOT_READY, AUTH_LINK_NOT_DISCONNECTABLE, PRECONDITION_REQUIRED, IDEMPOTENCY_KEY_REQUIRED, IDEMPOTENCY_KEY_REUSED, IDEMPOTENCY_KEY_IN_FLIGHT, IDEMPOTENCY_KEY_INVALID, GROUP_MERGED, MULTI_ROOM_UNSUPPORTED, MAP_NOT_ACTIVE, TARGET_UNSUPPORTED, TARGET_AMBIGUOUS, TARGET_GROUP_NOT_FOUND, TARGET_GROUP_DISABLED, DUPLICATE_TARGET_GROUP, MESSAGE_UNSUPPORTED, MESSAGE_AMBIGUOUS, ENDPOINT_DISABLED, ENDPOINT_ROUTE_CHANGED, ENDPOINT_HAS_DEPENDENCIES, ENDPOINT_EVENT_SUBSCRIPTIONS_ACTIVE, ENDPOINT_COMMITTED_CLEANUP_PENDING, DEEP_QUERY_FAILED, PROVIDER_NO_STATE, EVENT_MANAGEMENT_DISABLED, SUBSCRIPTION_IDENTITY_IMMUTABLE, UNSUPPORTED_MEDIA_TYPE, EVENT_PAYLOAD_TOO_LARGE, REQUEST_BODY_TOO_LARGE, EVENT_IDENTITY_CONFLICT, EVENT_INGRESS_QUOTA_EXCEEDED, EVENT_RECEIPT_EXPIRED, EVENT_STORAGE_UNAVAILABLE, EVENT_DEAD_LETTER_NOT_FOUND, EVENT_REDRIVE_CONFLICT, EVENT_REDRIVE_EXPIRED, RECEIPT_CONTEXT_EXPIRED, EVENT_MAINTENANCE_INCOMPLETE, UNKNOWN_INTERFACE, INVALID_CONFIGURATION, INVALID_ATTRIBUTE, INVALID_PROVIDER_MESSAGE, UNDECLARED_CAPABILITY, PLUGIN_ROUTE_ID_CONFLICT, UNRESOLVED_REFERENCE, INVALID_RELATIONSHIP, RELATIONSHIP_CYCLE, MULTIPLE_PARENTS, FLOW_VALIDATION_FAILED.
- details
ErrorDetails Optional typed context for an error. Fields are additive and only populated when the error can safely expose that context to API clients.
- discoveryEndpointId
string Port OS provider endpoint (type ENDPOINT_PLUGIN) of the connection to send `discover-routes` to when `code` is `TARGET_UNSUPPORTED` because the route must be rediscovered.
- retryAfterSeconds
integer Suggested retry delay for rate-limit or provider-unavailable failures.
minimum: 0
- providerCode
string The third-party provider's own error code, for support. It is opaque and provider-specific; branch on `code` and `family` instead.
- discoveryEndpointId
- errors
array<SynchronizationItemError> Every rejected item when a request that is validated item by item and applied atomically fails, such as a discovery `SynchronizationRequest` whose routes, group routes or relationships are rejected. Omitted for single-item failures.
One rejected discovery item of a `SynchronizationRequest`, keyed by the plugin-owned identity of the rejected item: `pluginRouteId` for a route or group route, or `relationshipExternalId` for a relationship. Exactly one of the two is set. It shares the `code`, `family`, `status` and `message` fields of `BatchItemError`; discovery items are keyed by plugin-owned identity because they carry no `requestId`. A request with any rejected item is rejected as a whole and lists every rejected item.
- pluginRouteId
string Plugin-owned identifier of the rejected route or group route. Set unless the item is a relationship.
- relationshipExternalId
string Plugin-owned `externalId` of the rejected relationship. Set only for relationship items.
- interface
string Canonical capability interface name the failure applies to, when the failure is interface-specific.
- version
string Declared capability interface version the failure applies to, when the failure is interface-specific.
- code
stringRequired The specific error, one of a closed set of Port OS codes. Every REST error body, MCP tool error, batch item error and discovery item error uses this enum; each code belongs to an `ErrorFamily` that decides its HTTP status. Provider-specific codes are never codes: they travel in `details.providerCode`. New failure kinds are added here, never as free strings.
Allowed values: BAD_REQUEST, UNAUTHORIZED, FORBIDDEN, INSUFFICIENT_SCOPE, NOT_FOUND, CONFLICT, UNPROCESSABLE_ENTITY, UNSUPPORTED_OPERATION, TOO_MANY_REQUESTS, SERVICE_UNAVAILABLE, NOT_IMPLEMENTED, INTERNAL, CHECKSUM_MISMATCH, FILE_TOO_LARGE, STORAGE_UNAVAILABLE, INSUFFICIENT_PERMISSIONS, INVALID_FILE_TYPE, QUOTA_EXCEEDED, CONCURRENT_MODIFICATION, ENDPOINT_UNREACHABLE, BRIDGE_UNREACHABLE, CLOUD_CONTROL_DISABLED, ENDPOINT_BUSY, ENDPOINT_LOW_POWER, AUTHORIZATION_CREDENTIAL_INVALID, AUTHORIZATION_CREDENTIAL_EXPIRED, INVALID_DIRECTIVE, INVALID_VALUE, VALUE_OUT_OF_RANGE, NOT_SUPPORTED_IN_CURRENT_MODE, RATE_LIMIT_EXCEEDED, PROVIDER_SERVICE_UNAVAILABLE, PROVIDER_TIMEOUT, PROVIDER_INTERNAL_ERROR, INVALID_PROVIDER_RESPONSE, OUTCOME_UNKNOWN, PRECONDITION_FAILED, AUTH_LINK_NOT_READY, AUTH_LINK_NOT_DISCONNECTABLE, PRECONDITION_REQUIRED, IDEMPOTENCY_KEY_REQUIRED, IDEMPOTENCY_KEY_REUSED, IDEMPOTENCY_KEY_IN_FLIGHT, IDEMPOTENCY_KEY_INVALID, GROUP_MERGED, MULTI_ROOM_UNSUPPORTED, MAP_NOT_ACTIVE, TARGET_UNSUPPORTED, TARGET_AMBIGUOUS, TARGET_GROUP_NOT_FOUND, TARGET_GROUP_DISABLED, DUPLICATE_TARGET_GROUP, MESSAGE_UNSUPPORTED, MESSAGE_AMBIGUOUS, ENDPOINT_DISABLED, ENDPOINT_ROUTE_CHANGED, ENDPOINT_HAS_DEPENDENCIES, ENDPOINT_EVENT_SUBSCRIPTIONS_ACTIVE, ENDPOINT_COMMITTED_CLEANUP_PENDING, DEEP_QUERY_FAILED, PROVIDER_NO_STATE, EVENT_MANAGEMENT_DISABLED, SUBSCRIPTION_IDENTITY_IMMUTABLE, UNSUPPORTED_MEDIA_TYPE, EVENT_PAYLOAD_TOO_LARGE, REQUEST_BODY_TOO_LARGE, EVENT_IDENTITY_CONFLICT, EVENT_INGRESS_QUOTA_EXCEEDED, EVENT_RECEIPT_EXPIRED, EVENT_STORAGE_UNAVAILABLE, EVENT_DEAD_LETTER_NOT_FOUND, EVENT_REDRIVE_CONFLICT, EVENT_REDRIVE_EXPIRED, RECEIPT_CONTEXT_EXPIRED, EVENT_MAINTENANCE_INCOMPLETE, UNKNOWN_INTERFACE, INVALID_CONFIGURATION, INVALID_ATTRIBUTE, INVALID_PROVIDER_MESSAGE, UNDECLARED_CAPABILITY, PLUGIN_ROUTE_ID_CONFLICT, UNRESOLVED_REFERENCE, INVALID_RELATIONSHIP, RELATIONSHIP_CYCLE, MULTIPLE_PARENTS, FLOW_VALIDATION_FAILED.
- family
stringRequired The broad class of an error. The family decides the HTTP status of a REST error, so clients can handle every code of a family alike.
Allowed values: NOT_FOUND, BAD_REQUEST, UNAUTHORIZED, FORBIDDEN, CONFLICT, GONE, PRECONDITION_FAILED, PRECONDITION_REQUIRED, PAYLOAD_TOO_LARGE, UNSUPPORTED_MEDIA_TYPE, UNPROCESSABLE_ENTITY, LOCKED, TOO_MANY_REQUESTS, BAD_GATEWAY, SERVICE_UNAVAILABLE, GATEWAY_TIMEOUT, NOT_IMPLEMENTED, INTERNAL_SERVER_ERROR, REQUEST_INVALID, AUTHENTICATION, PERMISSION, ENDPOINT_NOT_FOUND, ENDPOINT_STATE_CONFLICT, ENDPOINT_UNAVAILABLE, RATE_LIMIT, PROVIDER_BAD_RESPONSE, PROVIDER_UNAVAILABLE, PROVIDER_TIMEOUT.
- pluginRouteId
- family
- freshness
- option 2
- attributes
- interfaces
- controllableGroups
- results
- Error
Error The one Port OS error shape, returned by every REST error response and every MCP tool error. `code` names the specific failure and `family` its broad class; both are closed enums, so clients branch on them and show `message`, which says what failed and what to do next.
- family
stringRequired The broad class of an error. The family decides the HTTP status of a REST error, so clients can handle every code of a family alike.
Allowed values: NOT_FOUND, BAD_REQUEST, UNAUTHORIZED, FORBIDDEN, CONFLICT, GONE, PRECONDITION_FAILED, PRECONDITION_REQUIRED, PAYLOAD_TOO_LARGE, UNSUPPORTED_MEDIA_TYPE, UNPROCESSABLE_ENTITY, LOCKED, TOO_MANY_REQUESTS, BAD_GATEWAY, SERVICE_UNAVAILABLE, GATEWAY_TIMEOUT, NOT_IMPLEMENTED, INTERNAL_SERVER_ERROR, REQUEST_INVALID, AUTHENTICATION, PERMISSION, ENDPOINT_NOT_FOUND, ENDPOINT_STATE_CONFLICT, ENDPOINT_UNAVAILABLE, RATE_LIMIT, PROVIDER_BAD_RESPONSE, PROVIDER_UNAVAILABLE, PROVIDER_TIMEOUT.
- code
stringRequired The specific error, one of a closed set of Port OS codes. Every REST error body, MCP tool error, batch item error and discovery item error uses this enum; each code belongs to an `ErrorFamily` that decides its HTTP status. Provider-specific codes are never codes: they travel in `details.providerCode`. New failure kinds are added here, never as free strings.
Allowed values: BAD_REQUEST, UNAUTHORIZED, FORBIDDEN, INSUFFICIENT_SCOPE, NOT_FOUND, CONFLICT, UNPROCESSABLE_ENTITY, UNSUPPORTED_OPERATION, TOO_MANY_REQUESTS, SERVICE_UNAVAILABLE, NOT_IMPLEMENTED, INTERNAL, CHECKSUM_MISMATCH, FILE_TOO_LARGE, STORAGE_UNAVAILABLE, INSUFFICIENT_PERMISSIONS, INVALID_FILE_TYPE, QUOTA_EXCEEDED, CONCURRENT_MODIFICATION, ENDPOINT_UNREACHABLE, BRIDGE_UNREACHABLE, CLOUD_CONTROL_DISABLED, ENDPOINT_BUSY, ENDPOINT_LOW_POWER, AUTHORIZATION_CREDENTIAL_INVALID, AUTHORIZATION_CREDENTIAL_EXPIRED, INVALID_DIRECTIVE, INVALID_VALUE, VALUE_OUT_OF_RANGE, NOT_SUPPORTED_IN_CURRENT_MODE, RATE_LIMIT_EXCEEDED, PROVIDER_SERVICE_UNAVAILABLE, PROVIDER_TIMEOUT, PROVIDER_INTERNAL_ERROR, INVALID_PROVIDER_RESPONSE, OUTCOME_UNKNOWN, PRECONDITION_FAILED, AUTH_LINK_NOT_READY, AUTH_LINK_NOT_DISCONNECTABLE, PRECONDITION_REQUIRED, IDEMPOTENCY_KEY_REQUIRED, IDEMPOTENCY_KEY_REUSED, IDEMPOTENCY_KEY_IN_FLIGHT, IDEMPOTENCY_KEY_INVALID, GROUP_MERGED, MULTI_ROOM_UNSUPPORTED, MAP_NOT_ACTIVE, TARGET_UNSUPPORTED, TARGET_AMBIGUOUS, TARGET_GROUP_NOT_FOUND, TARGET_GROUP_DISABLED, DUPLICATE_TARGET_GROUP, MESSAGE_UNSUPPORTED, MESSAGE_AMBIGUOUS, ENDPOINT_DISABLED, ENDPOINT_ROUTE_CHANGED, ENDPOINT_HAS_DEPENDENCIES, ENDPOINT_EVENT_SUBSCRIPTIONS_ACTIVE, ENDPOINT_COMMITTED_CLEANUP_PENDING, DEEP_QUERY_FAILED, PROVIDER_NO_STATE, EVENT_MANAGEMENT_DISABLED, SUBSCRIPTION_IDENTITY_IMMUTABLE, UNSUPPORTED_MEDIA_TYPE, EVENT_PAYLOAD_TOO_LARGE, REQUEST_BODY_TOO_LARGE, EVENT_IDENTITY_CONFLICT, EVENT_INGRESS_QUOTA_EXCEEDED, EVENT_RECEIPT_EXPIRED, EVENT_STORAGE_UNAVAILABLE, EVENT_DEAD_LETTER_NOT_FOUND, EVENT_REDRIVE_CONFLICT, EVENT_REDRIVE_EXPIRED, RECEIPT_CONTEXT_EXPIRED, EVENT_MAINTENANCE_INCOMPLETE, UNKNOWN_INTERFACE, INVALID_CONFIGURATION, INVALID_ATTRIBUTE, INVALID_PROVIDER_MESSAGE, UNDECLARED_CAPABILITY, PLUGIN_ROUTE_ID_CONFLICT, UNRESOLVED_REFERENCE, INVALID_RELATIONSHIP, RELATIONSHIP_CYCLE, MULTIPLE_PARENTS, FLOW_VALIDATION_FAILED.
- details
ErrorDetails Optional typed context for an error. Fields are additive and only populated when the error can safely expose that context to API clients.
- discoveryEndpointId
string Port OS provider endpoint (type ENDPOINT_PLUGIN) of the connection to send `discover-routes` to when `code` is `TARGET_UNSUPPORTED` because the route must be rediscovered.
- retryAfterSeconds
integer Suggested retry delay for rate-limit or provider-unavailable failures.
minimum: 0
- providerCode
string The third-party provider's own error code, for support. It is opaque and provider-specific; branch on `code` and `family` instead.
- discoveryEndpointId
- errors
array<SynchronizationItemError> Every rejected item when a request that is validated item by item and applied atomically fails, such as a discovery `SynchronizationRequest` whose routes, group routes or relationships are rejected. Omitted for single-item failures.
One rejected discovery item of a `SynchronizationRequest`, keyed by the plugin-owned identity of the rejected item: `pluginRouteId` for a route or group route, or `relationshipExternalId` for a relationship. Exactly one of the two is set. It shares the `code`, `family`, `status` and `message` fields of `BatchItemError`; discovery items are keyed by plugin-owned identity because they carry no `requestId`. A request with any rejected item is rejected as a whole and lists every rejected item.
- pluginRouteId
string Plugin-owned identifier of the rejected route or group route. Set unless the item is a relationship.
- relationshipExternalId
string Plugin-owned `externalId` of the rejected relationship. Set only for relationship items.
- interface
string Canonical capability interface name the failure applies to, when the failure is interface-specific.
- version
string Declared capability interface version the failure applies to, when the failure is interface-specific.
- code
stringRequired The specific error, one of a closed set of Port OS codes. Every REST error body, MCP tool error, batch item error and discovery item error uses this enum; each code belongs to an `ErrorFamily` that decides its HTTP status. Provider-specific codes are never codes: they travel in `details.providerCode`. New failure kinds are added here, never as free strings.
Allowed values: BAD_REQUEST, UNAUTHORIZED, FORBIDDEN, INSUFFICIENT_SCOPE, NOT_FOUND, CONFLICT, UNPROCESSABLE_ENTITY, UNSUPPORTED_OPERATION, TOO_MANY_REQUESTS, SERVICE_UNAVAILABLE, NOT_IMPLEMENTED, INTERNAL, CHECKSUM_MISMATCH, FILE_TOO_LARGE, STORAGE_UNAVAILABLE, INSUFFICIENT_PERMISSIONS, INVALID_FILE_TYPE, QUOTA_EXCEEDED, CONCURRENT_MODIFICATION, ENDPOINT_UNREACHABLE, BRIDGE_UNREACHABLE, CLOUD_CONTROL_DISABLED, ENDPOINT_BUSY, ENDPOINT_LOW_POWER, AUTHORIZATION_CREDENTIAL_INVALID, AUTHORIZATION_CREDENTIAL_EXPIRED, INVALID_DIRECTIVE, INVALID_VALUE, VALUE_OUT_OF_RANGE, NOT_SUPPORTED_IN_CURRENT_MODE, RATE_LIMIT_EXCEEDED, PROVIDER_SERVICE_UNAVAILABLE, PROVIDER_TIMEOUT, PROVIDER_INTERNAL_ERROR, INVALID_PROVIDER_RESPONSE, OUTCOME_UNKNOWN, PRECONDITION_FAILED, AUTH_LINK_NOT_READY, AUTH_LINK_NOT_DISCONNECTABLE, PRECONDITION_REQUIRED, IDEMPOTENCY_KEY_REQUIRED, IDEMPOTENCY_KEY_REUSED, IDEMPOTENCY_KEY_IN_FLIGHT, IDEMPOTENCY_KEY_INVALID, GROUP_MERGED, MULTI_ROOM_UNSUPPORTED, MAP_NOT_ACTIVE, TARGET_UNSUPPORTED, TARGET_AMBIGUOUS, TARGET_GROUP_NOT_FOUND, TARGET_GROUP_DISABLED, DUPLICATE_TARGET_GROUP, MESSAGE_UNSUPPORTED, MESSAGE_AMBIGUOUS, ENDPOINT_DISABLED, ENDPOINT_ROUTE_CHANGED, ENDPOINT_HAS_DEPENDENCIES, ENDPOINT_EVENT_SUBSCRIPTIONS_ACTIVE, ENDPOINT_COMMITTED_CLEANUP_PENDING, DEEP_QUERY_FAILED, PROVIDER_NO_STATE, EVENT_MANAGEMENT_DISABLED, SUBSCRIPTION_IDENTITY_IMMUTABLE, UNSUPPORTED_MEDIA_TYPE, EVENT_PAYLOAD_TOO_LARGE, REQUEST_BODY_TOO_LARGE, EVENT_IDENTITY_CONFLICT, EVENT_INGRESS_QUOTA_EXCEEDED, EVENT_RECEIPT_EXPIRED, EVENT_STORAGE_UNAVAILABLE, EVENT_DEAD_LETTER_NOT_FOUND, EVENT_REDRIVE_CONFLICT, EVENT_REDRIVE_EXPIRED, RECEIPT_CONTEXT_EXPIRED, EVENT_MAINTENANCE_INCOMPLETE, UNKNOWN_INTERFACE, INVALID_CONFIGURATION, INVALID_ATTRIBUTE, INVALID_PROVIDER_MESSAGE, UNDECLARED_CAPABILITY, PLUGIN_ROUTE_ID_CONFLICT, UNRESOLVED_REFERENCE, INVALID_RELATIONSHIP, RELATIONSHIP_CYCLE, MULTIPLE_PARENTS, FLOW_VALIDATION_FAILED.
- family
stringRequired The broad class of an error. The family decides the HTTP status of a REST error, so clients can handle every code of a family alike.
Allowed values: NOT_FOUND, BAD_REQUEST, UNAUTHORIZED, FORBIDDEN, CONFLICT, GONE, PRECONDITION_FAILED, PRECONDITION_REQUIRED, PAYLOAD_TOO_LARGE, UNSUPPORTED_MEDIA_TYPE, UNPROCESSABLE_ENTITY, LOCKED, TOO_MANY_REQUESTS, BAD_GATEWAY, SERVICE_UNAVAILABLE, GATEWAY_TIMEOUT, NOT_IMPLEMENTED, INTERNAL_SERVER_ERROR, REQUEST_INVALID, AUTHENTICATION, PERMISSION, ENDPOINT_NOT_FOUND, ENDPOINT_STATE_CONFLICT, ENDPOINT_UNAVAILABLE, RATE_LIMIT, PROVIDER_BAD_RESPONSE, PROVIDER_UNAVAILABLE, PROVIDER_TIMEOUT.
- pluginRouteId
- family
- option 1