{ "openapi": "3.0.1", "info": { "title": "Infodeck.io", "description": "Infodeck.io - API documentation", "version": "1.81.13" }, "servers": [ { "url": "https://app.infodeck.io/api" } ], "paths": { "/organizations/{organizationId}/api-keys": { "post": { "summary": "Create API Key", "description": "Generate a new API key for external API access.\nThe full key secret is ONLY returned in this response - store it securely!\nAPI access is only available for Professional and Enterprise plans.", "operationId": "ApiKey.CreateApiKey", "tags": [ "ApiKey" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "User-friendly name for the API key" }, "permissions": { "type": "array", "items": { "type": "string" }, "description": "Optional array of permission scopes" } }, "required": [ "name" ] }, "example": {}, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "keyPrefix": { "type": "string" }, "secret": { "type": "string" }, "status": { "type": "string" }, "permissions": { "type": "array", "items": { "type": "string" } }, "createdAt": { "type": "number" } }, "required": [ "id", "name", "keyPrefix", "secret", "status", "createdAt" ], "description": "Response data" } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "List API Keys", "description": "List all API keys for the organization.\nNote: The key hash/secret is NEVER returned - only the prefix for identification.", "operationId": "ApiKey.ListApiKeys", "tags": [ "ApiKey" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "includeRevoked", "description": "Whether to include revoked keys", "in": "query", "schema": { "type": "boolean", "default": "false" }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] }, "description": "Array of API keys" } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/api-keys/{keyId}": { "get": { "summary": "Get API Key", "description": "Get details of a specific API key.\nNote: The key hash/secret is NEVER returned.", "operationId": "ApiKey.GetApiKey", "tags": [ "ApiKey" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "keyId", "description": "API Key ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "keyPrefix": { "type": "string" }, "status": { "type": "string" }, "permissions": { "type": "array", "items": { "type": "string" } }, "lastUsedAt": { "type": "number" }, "usageCount": { "type": "number" }, "createdAt": { "type": "number" }, "revokedAt": { "type": "number" } }, "required": [ "id", "name", "keyPrefix", "status", "createdAt" ], "description": "Response data" } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "delete": { "summary": "Revoke API Key", "description": "Revoke (soft-delete) an API key. The key will no longer work for authentication.\nThis action is permanent - revoked keys cannot be reactivated.", "operationId": "ApiKey.RevokeApiKey", "tags": [ "ApiKey" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "keyId", "description": "API Key ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "keyPrefix": { "type": "string" }, "status": { "type": "string" }, "permissions": { "type": "array", "items": { "type": "string" } }, "lastUsedAt": { "type": "number" }, "usageCount": { "type": "number" }, "createdAt": { "type": "number" }, "revokedAt": { "type": "number" } }, "required": [ "id", "name", "keyPrefix", "status", "createdAt" ], "description": "Response data" } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "400": { "description": "The request has invalid data.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has invalid data." }, "message": { "type": "string", "description": "The request has invalid data message." } }, "required": [ "error", "message" ] }, "example": { "error": "Bad Request", "message": "The request cannot be processed due to a bad request." }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/approval-delegations": { "post": { "summary": "Create Approval Delegation", "operationId": "ApprovalDelegation.CreateApprovalDelegation", "tags": [ "ApprovalDelegation" ], "parameters": [], "success": [], "requestBody": {}, "responses": {}, "security": [ { "user": [] } ] }, "get": { "summary": "List Approval Delegations", "operationId": "ApprovalDelegation.ListApprovalDelegations", "tags": [ "ApprovalDelegation" ], "parameters": [], "success": [], "requestBody": {}, "responses": {}, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/approval-delegations/{delegationId}": { "get": { "summary": "Get Approval Delegation", "operationId": "ApprovalDelegation.GetApprovalDelegation", "tags": [ "ApprovalDelegation" ], "parameters": [], "success": [], "requestBody": {}, "responses": {}, "security": [ { "user": [] } ] }, "put": { "summary": "Update Approval Delegation", "operationId": "ApprovalDelegation.UpdateApprovalDelegation", "tags": [ "ApprovalDelegation" ], "parameters": [], "success": [], "requestBody": {}, "responses": {}, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/approval-packs/{packId}/install": { "post": { "summary": "Install Approval Pack", "operationId": "ApprovalPack.InstallApprovalPack", "tags": [ "ApprovalPack" ], "parameters": [], "success": [], "requestBody": {}, "responses": {}, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/approval-packs": { "get": { "summary": "List Approval Packs", "operationId": "ApprovalPack.ListApprovalPacks", "tags": [ "ApprovalPack" ], "parameters": [], "success": [], "requestBody": {}, "responses": {}, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/approval-pools/{poolId}/members": { "post": { "summary": "Add Approval Pool Member", "operationId": "ApprovalPool.AddApprovalPoolMember", "tags": [ "ApprovalPool" ], "parameters": [], "success": [], "requestBody": {}, "responses": {}, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/approval-pools": { "post": { "summary": "Create Approval Pool", "operationId": "ApprovalPool.CreateApprovalPool", "tags": [ "ApprovalPool" ], "parameters": [], "success": [], "requestBody": {}, "responses": {}, "security": [ { "user": [] } ] }, "get": { "summary": "List Approval Pools", "operationId": "ApprovalPool.ListApprovalPools", "tags": [ "ApprovalPool" ], "parameters": [], "success": [], "requestBody": {}, "responses": {}, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/approval-pools/{poolId}": { "get": { "summary": "Get Approval Pool", "operationId": "ApprovalPool.GetApprovalPool", "tags": [ "ApprovalPool" ], "parameters": [], "success": [], "requestBody": {}, "responses": {}, "security": [ { "user": [] } ] }, "put": { "summary": "Update Approval Pool", "operationId": "ApprovalPool.UpdateApprovalPool", "tags": [ "ApprovalPool" ], "parameters": [], "success": [], "requestBody": {}, "responses": {}, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/approval-pools/{poolId}/members/{userId}": { "delete": { "summary": "Remove Approval Pool Member", "operationId": "ApprovalPool.RemoveApprovalPoolMember", "tags": [ "ApprovalPool" ], "parameters": [], "success": [], "requestBody": {}, "responses": {}, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/approval-rules/{ruleId}/archive": { "post": { "summary": "Archive Approval Rule", "operationId": "ApprovalRule.ArchiveApprovalRule", "tags": [ "ApprovalRule" ], "parameters": [], "success": [], "requestBody": {}, "responses": {}, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/approval-rules": { "post": { "summary": "Create Approval Rule (draft)", "operationId": "ApprovalRule.CreateApprovalRule", "tags": [ "ApprovalRule" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "body": { "type": "object", "properties": {}, "required": [], "description": "Rule body (domain, name, scope, precedence, stages)" } }, "required": [ "body" ] }, "example": {}, "description": "" } }, "required": true }, "responses": {}, "security": [ { "user": [] } ] }, "get": { "summary": "List Approval Rules", "operationId": "ApprovalRule.ListApprovalRules", "tags": [ "ApprovalRule" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "domain", "description": "One of the 9 approval domains", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "status", "description": "PUBLISHED or DRAFT", "in": "query", "schema": { "type": "string", "default": "PUBLISHED" }, "required": false }, { "name": "sourceEntityType", "description": "Filter by rule's source entity binding", "in": "query", "schema": { "type": "string" }, "required": false } ], "success": [], "requestBody": {}, "responses": {}, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/approval-rules/{ruleId}": { "get": { "summary": "Get Approval Rule", "operationId": "ApprovalRule.GetApprovalRule", "tags": [ "ApprovalRule" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "ruleId", "description": "Approval rule ID (short or full)", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "revisionNumber", "description": "Specific historical revision", "in": "query", "schema": { "type": "number" }, "required": false } ], "success": [], "requestBody": {}, "responses": {}, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/approval-rules/{ruleId}/revisions": { "get": { "summary": "List Rule Revisions", "operationId": "ApprovalRule.ListApprovalRuleRevisions", "tags": [ "ApprovalRule" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "ruleId", "description": "Approval rule ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": {}, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/approval-rules/{ruleId}/publish": { "post": { "summary": "Publish Approval Rule", "operationId": "ApprovalRule.PublishApprovalRule", "tags": [ "ApprovalRule" ], "parameters": [], "success": [], "requestBody": {}, "responses": {}, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/approval-rules/{ruleId}/simulate": { "post": { "summary": "Simulate Approval Rule", "operationId": "ApprovalRule.SimulateApprovalRule", "tags": [ "ApprovalRule" ], "parameters": [], "success": [], "requestBody": {}, "responses": {}, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/approval-rules/{ruleId}/draft": { "put": { "summary": "Update Approval Rule Draft", "operationId": "ApprovalRule.UpdateApprovalRuleDraft", "tags": [ "ApprovalRule" ], "parameters": [], "success": [], "requestBody": {}, "responses": {}, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/approvals/{instanceId}/approve": { "post": { "summary": "Approve Approval Instance", "operationId": "ApprovalRuntime.ApproveApprovalInstance", "tags": [ "ApprovalRuntime" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "instanceId", "description": "Approval instance id", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "expectedVersion": { "type": "number", "description": "Current instance version (OCC)" }, "comment": { "type": "string", "description": "Optional approval comment, max 2000 chars" }, "delegationId": { "type": "string", "description": "Optional delegation id for delegated approval" } }, "required": [ "expectedVersion" ] }, "example": {}, "description": "" } }, "required": true }, "responses": {}, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/approvals/{instanceId}": { "get": { "summary": "Get Approval Instance", "operationId": "ApprovalRuntime.GetApprovalInstance", "tags": [ "ApprovalRuntime" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "instanceId", "description": "Approval instance id", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": {}, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/approvals/history": { "get": { "summary": "List Approval History", "operationId": "ApprovalRuntime.ListApprovalHistory", "tags": [ "ApprovalRuntime" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "entityId", "description": "Filter by source entity id (requires domain)", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "entityType", "description": "Filter by source entity type", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "domain", "description": "Filter by approval domain", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "status", "description": "Filter by instance status", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "userId", "description": "Filter by actor/assignee user id", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "limit", "description": "", "in": "query", "schema": { "type": "number", "default": 50 }, "required": false }, { "name": "cursor", "description": "", "in": "query", "schema": { "type": "string" }, "required": false } ], "success": [], "requestBody": {}, "responses": {}, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/approvals/by-entity": { "get": { "summary": "List Active Approvals For Source Entity", "operationId": "ApprovalRuntime.ListApprovalsByEntity", "tags": [ "ApprovalRuntime" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "sourceEntityType", "description": "Source entity type (EntityType enum)", "in": "query", "schema": { "type": "string" }, "required": true }, { "name": "sourceEntityId", "description": "Source entity id", "in": "query", "schema": { "type": "string" }, "required": true }, { "name": "domain", "description": "Optional approval domain filter", "in": "query", "schema": { "type": "string" }, "required": false } ], "success": [], "requestBody": {}, "responses": {}, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/approvals/pending": { "get": { "summary": "List My Pending Approvals", "operationId": "ApprovalRuntime.ListPendingApprovals", "tags": [ "ApprovalRuntime" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "limit", "description": "Max 200", "in": "query", "schema": { "type": "number", "default": 50 }, "required": false }, { "name": "cursor", "description": "Opaque pagination cursor", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "domain", "description": "Filter by approval domain", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "includeDelegated", "description": "Include delegated instances", "in": "query", "schema": { "type": "string", "default": "true" }, "required": false } ], "success": [], "requestBody": {}, "responses": {}, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/approvals/{instanceId}/reject": { "post": { "summary": "Reject Approval Instance", "operationId": "ApprovalRuntime.RejectApprovalInstance", "tags": [ "ApprovalRuntime" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "instanceId", "description": "Approval instance id", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "expectedVersion": { "type": "number", "description": "Current instance version (OCC)" }, "reason": { "type": "string", "description": "Required rejection reason, 1-2000 chars" }, "delegationId": { "type": "string", "description": "Optional delegation id" } }, "required": [ "expectedVersion", "reason" ] }, "example": {}, "description": "" } }, "required": true }, "responses": {}, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/assets/batch": { "post": { "summary": "Batch Get Assets", "description": "Batch get assets", "operationId": "Asset.BatchGetAssets", "tags": [ "Asset" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "assetIds": { "type": "string", "description": "The id of assets" } }, "required": [ "assetIds" ] }, "example": {}, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "organizationId": { "type": "string" }, "assetTypeId": { "type": "string" }, "locationId": { "type": "string" }, "integrationServiceId": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "chatRoomId": { "type": "string" }, "serialNumber": { "type": "string" }, "modelName": { "type": "string" }, "nameOfManufacturer": { "type": "string" }, "yearOfManufacture": { "type": "number" }, "purchaseCost": { "type": "number" }, "purchaseDate": { "type": "number" }, "warrantyEndDate": { "type": "number" }, "devEui": { "type": "string" }, "uuid": { "type": "string" }, "keepAlive": { "type": "number" }, "connectionStatus": { "type": "boolean" }, "status": { "type": "string" }, "shadows": { "type": "object", "properties": {}, "required": [] }, "createdAtDateString": { "type": "number" }, "createdAt": { "type": "number" }, "updatedAtDateString": { "type": "number" }, "updatedAt": { "type": "number" } }, "required": [ "id", "organizationId", "assetTypeId", "locationId", "integrationServiceId", "name", "description", "chatRoomId", "serialNumber", "modelName", "nameOfManufacturer", "yearOfManufacture", "purchaseCost", "purchaseDate", "warrantyEndDate", "shadows", "createdAtDateString", "createdAt", "updatedAtDateString", "updatedAt" ] }, "description": "Data of the asset." } }, "required": [ "data" ] }, "example": { "data": [ { "id": "a-assetId", "organizationId": "o-organizationId", "assetTypeId": "at-assetTypeId", "locationId": "l-locationId", "integrationServiceId": "is-integrationServiceId", "name": "IDT-Bot-Asset", "description": "IDT-Bot-Asset-Description", "chatRoomId": "ABCDE", "serialNumber": "123456789", "modelName": "Bot-Model-Name", "nameOfManufacturer": "Bot-Manufacturer", "yearOfManufacture": 2024, "purchaseCost": 12345, "purchaseDate": 1700000000000, "warrantyEndDate": 1800000000000, "devEui": "24e124535b312345", "uuid": "24e124535b312345", "keepAlive": 2592000, "connectionStatus": false, "status": "Normal", "shadows": { "DeviceUplink": { "state": { "reported": { "Payload": { "Temperature": 25.4, "Humidity": 62, "CO2": 869, "rssi": -91, "timestamp": 1711341602287 }, "ExpiredAt": 1711341602287 } }, "metadata": { "reported": { "Payload": { "Temperature": { "timestamp": 1711330802 }, "Humidity": { "timestamp": 1711330802 }, "CO2": { "timestamp": 1711330802 }, "rssi": { "timestamp": 1711330802 } }, "ExpiredAt": { "timestamp": 1711330802 } } }, "version": 21415, "timestamp": 1711330849 } }, "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000, "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1706659200000 } ] }, "description": "" } } }, "400": { "description": "The request has invalid data.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has invalid data." }, "message": { "type": "string", "description": "The request has invalid data message." } }, "required": [ "error", "message" ] }, "example": { "error": "Bad Request", "message": "The request cannot be processed due to a bad request." }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/assets": { "post": { "summary": "Create Asset", "description": "Create asset", "operationId": "Asset.CreateAsset", "tags": [ "Asset" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "assetTypeId": { "type": "string", "description": "The asset type ID." }, "locationId": { "type": "string", "description": "The location ID." }, "integrationServiceId": { "type": "string", "description": "The integration service ID of asset." }, "linkIds": { "type": "array", "items": { "type": "string" }, "description": "The IDs of asset." }, "name": { "type": "string", "description": "The name of asset." }, "description": { "type": "string", "description": "The description of asset." }, "chatRoomId": { "type": "string", "description": "The ID of chat room." }, "serialNumber": { "type": "string", "description": "The serial number of asset." }, "modelName": { "type": "string", "description": "The model of name." }, "nameOfManufacturer": { "type": "string", "description": "The name of manufacturer." }, "yearOfManufacture": { "type": "number", "description": "The year of manufacture of asset." }, "purchaseCost": { "type": "number", "description": "The purchase cost of asset." }, "purchaseDate": { "type": "number", "description": "The purchase date of asset." }, "warrantyEndDate": { "type": "number", "description": "The warranty end date of asset." }, "uuid": { "type": "string", "description": "The uuid of device to filter assets." }, "image": { "type": "string", "description": "The image of asset." }, "files": { "type": "array", "items": { "type": "string" }, "description": "The files of asset." }, "keepAlive": { "type": "number", "description": "The interval of keep alive." }, "attributes": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] }, "description": "The custom attributes of asset." } }, "required": [ "assetTypeId", "locationId", "name" ] }, "example": { "assetTypeId": "at-assetTypeId", "locationId": "l-locationId", "linkIds": [ "a-assetId" ], "name": "IDT-Bot", "description": "IDT-Description", "chatRoomId": "ABCDE", "serialNumber": "123456789", "modelName": "Bot-Model-Name", "nameOfManufacturer": "Bot-Manufacturer", "yearOfManufacture": 2024, "purchaseCost": 12345, "purchaseDate": 1700000000000, "warrantyEndDate": 1800000000000, "uuid": "24e124535b312345", "image": "Asset-Image.png", "files": [ "Infodeck-Bot-0001.pdf" ], "keepAlive": 2592000, "attributes": [ { "key": "__status", "value": "OPERATIONAL" } ] }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "organizationId": { "type": "string" }, "assetTypeId": { "type": "string" }, "locationId": { "type": "string" }, "integrationServiceId": { "type": "string" }, "linkIds": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "chatRoomId": { "type": "string" }, "serialNumber": { "type": "string" }, "modelName": { "type": "string" }, "nameOfManufacturer": { "type": "string" }, "yearOfManufacture": { "type": "number" }, "purchaseCost": { "type": "number" }, "purchaseDate": { "type": "number" }, "warrantyEndDate": { "type": "number" }, "assetType": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "isIotDevice": { "type": "string" }, "supportedAssetTypeId": { "type": "string" }, "properties": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] } } }, "required": [ "id", "name", "isIotDevice", "supportedAssetTypeId", "properties" ] }, "location": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" } }, "required": [ "id", "name" ] }, "devEui": { "type": "string" }, "uuid": { "type": "string" }, "image": { "type": "string" }, "files": {}, "keepAlive": { "type": "number" }, "connectionStatus": { "type": "boolean" }, "status": { "type": "string" }, "shadows": { "type": "object", "properties": {}, "required": [] }, "createdAtDateString": { "type": "number" }, "createdAt": { "type": "number" } }, "required": [ "id", "organizationId", "assetTypeId", "locationId", "integrationServiceId", "name", "description", "chatRoomId", "serialNumber", "modelName", "nameOfManufacturer", "yearOfManufacture", "purchaseCost", "purchaseDate", "warrantyEndDate", "assetType", "location", "image", "files", "shadows", "createdAtDateString", "createdAt" ], "description": "Data of the asset." } }, "required": [ "data" ] }, "example": { "data": { "id": "o-organizationId-a-assetId", "organizationId": "o-organizationId", "assetTypeId": "at-assetTypeId", "locationId": "l-locationId", "integrationServiceId": "is-integrationServiceId", "linkIds": [ "a-assetId" ], "name": "IDT-Bot-Asset", "description": "IDT-Bot-Asset-Description", "chatRoomId": "ABCDE", "serialNumber": "123456789", "modelName": "Bot-Model-Name", "nameOfManufacturer": "Bot-Manufacturer", "yearOfManufacture": 2024, "purchaseCost": 12345, "purchaseDate": 1700000000000, "warrantyEndDate": 1800000000000, "assetType": { "id": "at-assetType", "name": "assetType", "isIotDevice": true, "supportedAssetTypeId": "Infodeck-NS300-ABC", "properties": [ { "name": "Battery", "unit": "%", "type": "integer", "key": "Battery" } ] }, "location": { "id": "locationId", "name": "location" }, "devEui": "24e124535b312345", "uuid": "24e124535b312345", "image": "Asset-Image.png", "files": [ "Infodeck-Bot-0001.pdf" ], "keepAlive": 2592000, "connectionStatus": false, "status": "Normal", "shadows": {}, "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "409": { "description": "The resource already exists.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource already exists." }, "message": { "type": "string", "description": "The resource already exists message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceAlreadyExistsError", "message": "The operation cannot be completed because a resource with the specified identifier already exists." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "List Assets", "description": "List assets", "operationId": "Asset.ListAssets", "tags": [ "Asset" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "devEui", "description": "The devEui of device to filter assets.", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "uuid", "description": "The uuid of device to filter assets.", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "isIotDevice", "description": "List IoT devices assets only.", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "assetTypeId", "description": "The ID of asset type to filter assets.", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "locationId", "description": "The ID of location to filter assets.", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "maxResults", "description": "The maximum number of results to return.", "in": "query", "schema": { "type": "number" }, "required": false }, { "name": "nextToken", "description": "To retrieve the next set of results.", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "shadowNames", "description": "Specify shadow names to fetch. (Default: DeviceUplink)", "in": "query", "schema": { "type": "array", "items": { "type": "string" } }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "organizationId": { "type": "string" }, "assetTypeId": { "type": "string" }, "locationId": { "type": "string" }, "integrationServiceId": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "chatRoomId": { "type": "string" }, "serialNumber": { "type": "string" }, "modelName": { "type": "string" }, "nameOfManufacturer": { "type": "string" }, "yearOfManufacture": { "type": "number" }, "purchaseCost": { "type": "number" }, "purchaseDate": { "type": "number" }, "warrantyEndDate": { "type": "number" }, "devEui": { "type": "string" }, "uuid": { "type": "string" }, "keepAlive": { "type": "number" }, "connectionStatus": { "type": "boolean" }, "status": { "type": "string" }, "shadows": { "type": "object", "properties": {}, "required": [] }, "createdAtDateString": { "type": "number" }, "createdAt": { "type": "number" }, "updatedAtDateString": { "type": "number" }, "updatedAt": { "type": "number" } }, "required": [ "id", "organizationId", "assetTypeId", "locationId", "integrationServiceId", "name", "description", "chatRoomId", "serialNumber", "modelName", "nameOfManufacturer", "yearOfManufacture", "purchaseCost", "purchaseDate", "warrantyEndDate", "shadows", "createdAtDateString", "createdAt", "updatedAtDateString", "updatedAt" ] }, "description": "Data of the asset." } }, "required": [ "data" ] }, "example": { "data": [ { "id": "a-assetId", "organizationId": "o-organizationId", "assetTypeId": "at-assetTypeId", "locationId": "l-locationId", "integrationServiceId": "is-integrationServiceId", "name": "IDT-Bot-Asset", "description": "IDT-Bot-Asset-Description", "chatRoomId": "ABCDE", "serialNumber": "123456789", "modelName": "Bot-Model-Name", "nameOfManufacturer": "Bot-Manufacturer", "yearOfManufacture": 2024, "purchaseCost": 12345, "purchaseDate": 1700000000000, "warrantyEndDate": 1800000000000, "devEui": "24e124535b312345", "uuid": "24e124535b312345", "keepAlive": 2592000, "connectionStatus": false, "status": "Normal", "shadows": { "DeviceUplink": { "state": { "reported": { "Payload": { "Temperature": 25.4, "Humidity": 62, "CO2": 869, "rssi": -91, "timestamp": 1711341602287 }, "ExpiredAt": 1711341602287 } }, "metadata": { "reported": { "Payload": { "Temperature": { "timestamp": 1711330802 }, "Humidity": { "timestamp": 1711330802 }, "CO2": { "timestamp": 1711330802 }, "rssi": { "timestamp": 1711330802 } }, "ExpiredAt": { "timestamp": 1711330802 } } }, "version": 21415, "timestamp": 1711330849 } }, "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000, "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1706659200000 } ] }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/asset-types": { "post": { "summary": "Create Asset Type", "description": "Create asset type", "operationId": "Asset.CreateAssetType", "tags": [ "Asset" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of asset type" }, "description": { "type": "string", "description": "The description of asset type" }, "supportedAssetTypeId": { "type": "string", "description": "The id of supported model" }, "image": { "type": "string", "description": "The custom image of asset type" }, "encodeCodec": { "type": "string", "description": "The encode codec of asset type" }, "decodeCodec": { "type": "string", "description": "The decode codec of asset type" }, "isIotDevice": { "type": "boolean", "description": "Is the asset an IoT device?" }, "properties": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] }, "description": "The properties of asset type" }, "actions": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] }, "description": "The actions of asset type" } }, "required": [ "name", "isIotDevice" ] }, "example": { "name": "IDT-Bot-AssetType", "description": "IDT-AssetType-Description", "supportedAssetTypeId": "Infodeck-NS300-ABC", "image": "Asset-Type-Image.png", "encodeCodec": "function encodeDownlink(input) {\n const bytes = [];\n\n return {\n bytes,\n };\n}", "decodeCodec": "function decodeUplink(input) {\n const bytes = input.bytes;\n const data = {};\n\n return {\n data,\n };\n}", "isIotDevice": true, "properties": [ { "key": "Power", "name": "Power", "type": "integer", "icon": "xxx.svg", "unit": "W" } ], "actions": [ { "confirmed": true, "fPort": 85, "name": "Power On", "payload": "080100ff", "payloadDataType": "Hex" } ] }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "organizationId": { "type": "string" }, "supportedAssetTypeId": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "isIotDevice": { "type": "string" }, "image": { "type": "string" }, "encodeCodec": { "type": "string" }, "decodeCodec": { "type": "string" }, "properties": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] } }, "properactionsties": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] } }, "createdBy": { "type": "string" }, "createdAtDateString": { "type": "number" }, "createdAt": { "type": "number" } }, "required": [ "id", "organizationId", "supportedAssetTypeId", "name", "description", "isIotDevice", "image", "encodeCodec", "decodeCodec", "properties", "properactionsties", "createdBy", "createdAtDateString", "createdAt" ] }, "description": "Data of the asset type." } }, "required": [ "data" ] }, "example": { "data": { "id": "at-assetTypeId", "organizationId": "o-organizationId", "supportedAssetTypeId": "Infodeck-NS300-ABC", "name": "IDT-Bot-AssetType", "description": "IDT-AssetType-Description", "isIotDevice": true, "image": "Asset-Type-Image.png", "encodeCodec": "function encodeDownlink(input) {\n const bytes = [];\n\n return {\n bytes,\n };\n}", "decodeCodec": "function decodeUplink(input) {\n const bytes = input.bytes;\n const data = {};\n\n return {\n data,\n };\n}", "properties": [ { "key": "Power", "name": "Power", "type": "integer", "unit": "W" } ], "actions": [ { "confirmed": true, "fPort": 85, "name": "Power On", "payload": "080100ff", "payloadDataType": "Hex" } ], "createdBy": "d6b0e137-xxxx-xxxx-xxxx-c944cc12a5f4", "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "List Asset Types", "description": "List asset types", "operationId": "Asset.ListAssetTypes", "tags": [ "Asset" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "maxResults", "description": "The maximum number of results to return.", "in": "query", "schema": { "type": "number", "minimum": 10, "maximum": 25 }, "required": false }, { "name": "nextToken", "description": "To retrieve the next set of results.", "in": "query", "schema": { "type": "string" }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "organizationId": { "type": "string" }, "supportedAssetTypeId": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "isIotDevice": { "type": "string" }, "image": { "type": "string" }, "encodeCodec": { "type": "string" }, "decodeCodec": { "type": "string" }, "properties": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] } }, "actions": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] } }, "createdBy": { "type": "string" }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" }, "updatedBy": { "type": "string" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "id", "organizationId", "supportedAssetTypeId", "name", "description", "isIotDevice", "image", "encodeCodec", "decodeCodec", "properties", "actions", "createdBy", "createdAtDateString", "createdAt", "updatedBy", "updatedAtDateString", "updatedAt" ] }, "description": "Data of the asset type." } }, "required": [ "data" ] }, "example": { "data": [ { "id": "at-assetTypeId", "organizationId": "o-organizationId", "supportedAssetTypeId": "Infodeck-NS300-ABC", "name": "IDT-Bot-AssetType-A", "description": "IDT-Bot-AssetType-A-Description", "isIotDevice": true, "image": "Asset-Type-A-Image.png", "encodeCodec": "function encodeDownlink(input) {\n const bytes = [];\n\n return {\n bytes,\n };\n}", "decodeCodec": "function decodeUplink(input) {\n const bytes = input.bytes;\n const data = {};\n\n return {\n data,\n };\n}", "properties": [ { "key": "Power", "name": "Power", "type": "integer", "unit": "W" } ], "actions": [ { "confirmed": true, "fPort": 85, "name": "Power On", "payload": "080100ff", "payloadDataType": "Hex" } ], "createdBy": "d6b0e137-xxxx-xxxx-xxxx-c944cc12a5f4", "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000, "updatedBy": "d6b0e137-xxxx-xxxx-xxxx-c944cc12a5f4", "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1706659200000 } ] }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/supported-asset-types": { "post": { "summary": "Create Supported Asset Type", "description": "Create Supported asset type", "operationId": "Asset.CreateSupportedAssetType", "tags": [ "Asset" ], "parameters": [ { "name": "organizationId", "description": "", "in": "path", "required": false, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of asset type" }, "description": { "type": "string", "description": "The description of asset type" }, "image": { "type": "string", "description": "The custom image of asset type" }, "encodeCodec": { "type": "string", "description": "The encode codec of asset type" }, "decodeCodec": { "type": "string", "description": "The decode codec of asset type" }, "brand": { "type": "string", "description": "The brand of asset type" }, "model": { "type": "string", "description": "The model of asset type" }, "isIotDevice": { "type": "boolean", "description": "Is the asset an IoT device?" }, "properties": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] }, "description": "The properties of asset type" }, "actions": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] }, "description": "The actions of asset type" } }, "required": [ "name", "brand", "model", "isIotDevice" ] }, "example": { "name": "IDT-Bot-SupportedAssetType", "description": "IDT-SupportedAssetType-Description", "image": "Supported-Asset-Type-Image.png", "encodeCodec": "function encodeDownlink(input) {\n const bytes = [];\n\n return {\n bytes,\n };\n}", "decodeCodec": "function decodeUplink(input) {\n const bytes = input.bytes;\n const data = {};\n\n return {\n data,\n };\n}", "brand": "Infodeck", "model": "NS330-PSU", "isIotDevice": true, "properties": [ { "key": "Power", "name": "Power", "type": "integer", "unit": "W" } ], "actions": [ { "confirmed": true, "fPort": 85, "name": "Power On", "payload": "080100ff", "payloadDataType": "Hex" } ] }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "isIotDevice": { "type": "string" }, "image": { "type": "string" }, "brand": { "type": "string" }, "model": { "type": "string" }, "encodeCodec": { "type": "string" }, "decodeCodec": { "type": "string" }, "properties": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] } } }, "required": [ "id", "name", "description", "isIotDevice", "image", "brand", "model", "encodeCodec", "decodeCodec", "properties" ], "description": "Data of the supported asset type." } }, "required": [ "data" ] }, "example": { "data": { "id": "Infodeck-NS300-ABC", "organizationId": "o-organizationId", "name": "IDT-Bot-SupportedAssetType", "description": "IDT-SupportedAssetType-Description", "image": "Supported-Asset-Type-Image.png", "encodeCodec": "function encodeDownlink(input) {\n const bytes = [];\n\n return {\n bytes,\n };\n}", "decodeCodec": "function decodeUplink(input) {\n const bytes = input.bytes;\n const data = {};\n\n return {\n data,\n };\n}", "brand": "Infodeck", "model": "NS330-PSU", "isIotDevice": true, "properties": [ { "key": "Power", "name": "Power", "type": "integer", "unit": "W" } ], "actions": [ { "confirmed": true, "fPort": 85, "name": "Power On", "payload": "080100ff", "payloadDataType": "Hex" } ] } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "List Supported Asset Types", "description": "List Supported asset types", "operationId": "Asset.ListSupportedAssetTypes", "tags": [ "Asset" ], "parameters": [ { "name": "maxResults", "description": "The maximum number of results to return.", "in": "query", "schema": { "type": "number", "minimum": 10, "maximum": 25 }, "required": false }, { "name": "nextToken", "description": "To retrieve the next set of results.", "in": "query", "schema": { "type": "string" }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "isIotDevice": { "type": "string" }, "image": { "type": "string" }, "brand": { "type": "string" }, "model": { "type": "string" }, "encodeCodec": { "type": "string" }, "decodeCodec": { "type": "string" }, "properties": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] } }, "actions": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] } } }, "required": [ "id", "name", "description", "isIotDevice", "image", "brand", "model", "encodeCodec", "decodeCodec", "properties", "actions" ], "description": "Data of the supported asset type." } }, "required": [ "data" ] }, "example": { "data": [ { "id": "Infodeck-NS300-ABC", "name": "IDT-Bot-SupportedAssetType", "description": "IDT-SupportedAssetType-Description", "isIotDevice": true, "image": "Supported-Asset-Type-Image.png", "brand": "Infodeck", "model": "NS330-PSU", "encodeCodec": "function encodeDownlink(input) {\n const bytes = [];\n\n return {\n bytes,\n };\n}", "decodeCodec": "function decodeUplink(input) {\n const bytes = input.bytes;\n const data = {};\n\n return {\n data,\n };\n}", "properties": [ { "key": "Power", "name": "Power", "type": "integer", "unit": "W" } ], "actions": [ { "confirmed": true, "fPort": 85, "name": "Power On", "payload": "080100ff", "payloadDataType": "Hex" } ] } ] }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/assets/{assetId}": { "delete": { "summary": "Delete Asset", "description": "Delete asset", "operationId": "Asset.DeleteAsset", "tags": [ "Asset" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "assetId", "description": "The ID of asset", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": {}, "required": [], "description": "Empty object" } }, "required": [ "data" ] }, "example": { "data": {} }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "Get Asset", "description": "Get asset", "operationId": "Asset.GetAsset", "tags": [ "Asset" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "assetId", "description": "The ID of asset", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "shadowNames", "description": "Specify shadow names to fetch. (Default: DeviceUplink)", "in": "query", "schema": { "type": "array", "items": { "type": "string" } }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "organizationId": { "type": "string" }, "assetId": { "type": "string" }, "integrationService": { "type": "object", "properties": {}, "required": [] }, "name": { "type": "string" }, "description": { "type": "string" }, "chatRoomId": { "type": "string" }, "serialNumber": { "type": "number" }, "modelName": { "type": "string" }, "nameOfManufacturer": { "type": "string" }, "yearOfManufacture": { "type": "number" }, "purchaseCost": { "type": "number" }, "purchaseDate": { "type": "string" }, "warrantyEndDate": { "type": "string" }, "assetType": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "isIotDevice": { "type": "string" }, "supportedAssetTypeId": { "type": "string" }, "properties": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] } } }, "required": [ "id", "name", "isIotDevice", "supportedAssetTypeId", "properties" ] }, "location": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" } }, "required": [ "id", "name" ] }, "images": { "type": "string" }, "files": { "type": "string" }, "devEui": { "type": "string" }, "uuid": { "type": "string" }, "keepAlive": { "type": "number" }, "connectionStatus": { "type": "boolean" }, "status": { "type": "string" }, "shadow": { "type": "object", "properties": {}, "required": [] }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "id", "organizationId", "assetId", "integrationService", "name", "description", "chatRoomId", "serialNumber", "modelName", "nameOfManufacturer", "yearOfManufacture", "purchaseCost", "purchaseDate", "warrantyEndDate", "assetType", "location", "images", "files", "shadow", "createdAtDateString", "createdAt", "updatedAtDateString", "updatedAt" ], "description": "Data of the asset." } }, "required": [ "data" ] }, "example": { "data": { "id": "o-organizationId-a-assetId", "organizationId": "o-organizationId", "assetId": "a-assetId", "integrationServiceId": "is-integrationServiceId", "name": "IDT-Bot-Asset", "description": "IDT-Bot-Asset-Description", "chatRoomId": "ABCDE", "serialNumber": "123456789", "modelName": "Bot-Model-Name", "nameOfManufacturer": "Bot-Manufacturer", "yearOfManufacture": 2024, "purchaseCost": 12345, "purchaseDate": 1700000000000, "warrantyEndDate": 1800000000000, "assetType": { "id": "at-assetType", "name": "assetType", "isIotDevice": true, "supportedAssetTypeId": "Infodeck-NS300-ABC", "properties": [ { "name": "Battery", "unit": "%", "type": "integer", "key": "Battery" } ] }, "location": { "id": "l-location", "name": "location" }, "image": "Asset-Image.png", "files": [ "Infodeck-Bot-0001.pdf" ], "devEui": "24e124535b312345", "uuid": "24e124535b312345", "keepAlive": 2592000, "connectionStatus": false, "status": "Normal", "shadows": { "DeviceUplink": { "state": { "reported": { "Payload": { "Temperature": 25.4, "Humidity": 62, "CO2": 869, "rssi": -91, "timestamp": 1711341602287 }, "ExpiredAt": 1711341602287 } }, "metadata": { "reported": { "Payload": { "Temperature": { "timestamp": 1711330802 }, "Humidity": { "timestamp": 1711330802 }, "CO2": { "timestamp": 1711330802 }, "rssi": { "timestamp": 1711330802 } }, "ExpiredAt": { "timestamp": 1711330802 } } }, "version": 21415, "timestamp": 1711330849 } }, "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000, "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1706659200000 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "put": { "summary": "Update Asset", "description": "Update asset", "operationId": "Asset.UpdateAsset", "tags": [ "Asset" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "assetId", "description": "The ID of asset", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of asset" }, "description": { "type": "string", "description": "The description of asset" }, "chatRoomId": { "type": "string", "description": "The ID of chat room" }, "locationId": { "type": "string", "description": "The locationId of asset" }, "integrationServiceId": { "type": "string", "description": "The integration service ID of asset." }, "linkIds": { "type": "array", "items": { "type": "string" }, "description": "The IDs of asset." }, "serialNumber": { "type": "string", "description": "The serial number of asset" }, "modelName": { "type": "string", "description": "The serial number of asset" }, "nameOfManufacturer": { "type": "string", "description": "The name of manufacturer" }, "yearOfManufacture": { "type": "number", "description": "The year of manufacture of asset" }, "purchaseCost": { "type": "number", "description": "The purchase cost of asset" }, "purchaseDate": { "type": "number", "description": "The purchase date of asset" }, "warrantyEndDate": { "type": "number", "description": "The warranty end date of asset" }, "image": { "type": "string", "description": "The image of asset" }, "files": { "type": "array", "items": { "type": "string" }, "description": "The files of asset" }, "keepAlive": { "type": "number", "description": "The interval of keep alive" }, "attributes": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] }, "description": "The custom attributes of asset." } }, "required": [ "name" ] }, "example": { "name": "IDT-Bot", "description": "IDT-Description", "chatRoomId": "ABCDE", "integrationServiceId": "is-integrationServiceId", "linkIds": [ "a-assetId" ], "locationId": "l-locationId", "serialNumber": "123456789", "modelName": "Bot-Model-Name", "nameOfManufacturer": "Bot-Manufacturer", "yearOfManufacture": 2024, "purchaseCost": 12345, "purchaseDate": 1700000000000, "warrantyEndDate": 1800000000000, "image": "Asset-Image.png", "files": [ "Infodeck-Bot-0001.pdf" ], "keepAlive": 2592000, "attributes": [ { "key": "__status", "value": "OPERATIONAL" } ] }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "assetTypeId": { "type": "string" }, "locationId": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "chatRoomId": { "type": "string" }, "serialNumber": { "type": "number" }, "nameOfManufacturer": { "type": "string" }, "yearOfManufacture": { "type": "number" }, "purchaseCost": { "type": "number" }, "purchaseDate": { "type": "string" }, "warrantyEndDate": { "type": "string" }, "images": { "type": "string" }, "files": { "type": "string" }, "integrationServiceId": { "type": "string" }, "devEui": { "type": "string" }, "uuid": { "type": "string" }, "keepAlive": { "type": "number" }, "connectionStatus": {}, "status": { "type": "string" }, "updatedAtDateString": { "type": "number" }, "updatedAt": { "type": "number" } }, "required": [ "assetTypeId", "locationId", "name", "description", "chatRoomId", "serialNumber", "nameOfManufacturer", "yearOfManufacture", "purchaseCost", "purchaseDate", "warrantyEndDate", "images", "files", "updatedAtDateString", "updatedAt" ], "description": "Data of the asset." } }, "required": [ "data" ] }, "example": { "data": { "assetTypeId": "a-assetTypeId", "locationId": "l-locationId", "name": "IDT-Bot", "description": "IDT-Description", "chatRoomId": "ABCDE", "serialNumber": "123456789", "nameOfManufacturer": "Bot-Manufacturer", "yearOfManufacture": 2024, "purchaseCost": 12345, "purchaseDate": 1700000000000, "warrantyEndDate": 1800000000000, "image": "Asset-Image.png", "integrationServiceId": "is-integrationserviceId", "files": [ "Infodeck-Bot-0001.pdf" ], "devEui": "24e124535b312345", "uuid": "24e124535b312345", "keepAlive": 2592000, "connectionStatus": false, "status": "Normal", "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1706659200000 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/asset-types/{assetTypeId}": { "delete": { "summary": "Delete Asset Type", "description": "Delete asset type", "operationId": "Asset.DeleteAssetType", "tags": [ "Asset" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "assetTypeId", "description": "The ID of asset type.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": {}, "required": [], "description": "Empty object" } }, "required": [ "data" ] }, "example": { "data": {} }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "Get Asset Type", "description": "Get asset type", "operationId": "Asset.GetAssetType", "tags": [ "Asset" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "assetTypeId", "description": "The ID of asset type", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "organizationId": { "type": "string" }, "supportedAssetTypeId": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "isIotDevice": { "type": "string" }, "image": { "type": "string" }, "encodeCodec": { "type": "string" }, "decodeCodec": { "type": "string" }, "properties": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] } }, "actions": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] } }, "createdBy": { "type": "string" }, "createdAt": { "type": "string" }, "createdAtDateString": { "type": "string" }, "updatedBy": { "type": "string" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "id", "organizationId", "supportedAssetTypeId", "name", "description", "isIotDevice", "image", "encodeCodec", "decodeCodec", "properties", "actions", "createdBy", "createdAt", "createdAtDateString", "updatedBy", "updatedAtDateString", "updatedAt" ], "description": "Data of the asset type." } }, "required": [ "data" ] }, "example": { "data": { "id": "at-assetTypeId", "organizationId": "o-organizationId", "name": "IDT-Bot-AssetType", "description": "IDT-AssetType-Description", "supportedAssetTypeId": "Infodeck-NS300-ABC", "image": "Asset-Type-Image.png", "encodeCodec": "function encodeDownlink(input) {\n const bytes = [];\n\n return {\n bytes,\n };\n}", "decodeCodec": "function decodeUplink(input) {\n const bytes = input.bytes;\n const data = {};\n\n return {\n data,\n };\n}", "isIotDevice": true, "properties": [ { "key": "Power", "name": "Power", "type": "integer", "unit": "W" } ], "actions": [ { "confirmed": true, "fPort": 85, "name": "Power On", "payload": "080100ff", "payloadDataType": "Hex" } ], "createdBy": "d6b0e137-xxxx-xxxx-xxxx-c944cc12a5f4", "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000, "updatedBy": "d6b0e137-xxxx-xxxx-xxxx-c944cc12a5f4", "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1706659200000 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "put": { "summary": "Update Asset Type", "description": "Update asset type", "operationId": "Asset.UpdateAssetType", "tags": [ "Asset" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "assetTypeId", "description": "The ID of asset type.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of asset type" }, "description": { "type": "string", "description": "The description of asset type" }, "image": { "type": "string", "description": "The custom image of asset type" }, "encodeCodec": { "type": "string", "description": "The encode codec of asset type" }, "decodeCodec": { "type": "string", "description": "The decode codec of asset type" }, "properties": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] }, "description": "The properties of asset type" }, "actions": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] }, "description": "The actions of asset type" } }, "required": [ "name" ] }, "example": { "name": "IDT-Bot-AssetType", "description": "IDT-AssetType-Description", "image": "Asset-Type-Image.png", "encodeCodec": "function encodeDownlink(input) {\n const bytes = [];\n\n return {\n bytes,\n };\n}", "decodeCodec": "function decodeUplink(input) {\n const bytes = input.bytes;\n const data = {};\n\n return {\n data,\n };\n}", "isIotDevice": true, "properties": [ { "key": "Power", "name": "Power", "type": "integer", "icon": "xxx.svg", "unit": "W" } ], "actions": [ { "confirmed": true, "fPort": 85, "name": "Power On", "payload": "080100ff", "payloadDataType": "Hex" } ] }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "supportedAssetTypeId": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "isIotDevice": { "type": "string" }, "image": { "type": "string" }, "encodeCodec": { "type": "string" }, "decodeCodec": { "type": "string" }, "properties": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] } }, "actions": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] } }, "updatedBy": { "type": "string" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "supportedAssetTypeId", "name", "description", "isIotDevice", "image", "encodeCodec", "decodeCodec", "properties", "actions", "updatedBy", "updatedAtDateString", "updatedAt" ], "description": "Data of the asset type." } }, "required": [ "data" ] }, "example": { "supportedAssetTypeId": "Infodeck-NS300-ABC", "name": "IDT-Bot-AssetType", "description": "IDT-AssetType-Description", "isIotDevice": true, "image": "Asset-Type-Image.png", "encodeCodec": "function encodeDownlink(input) {\n const bytes = [];\n\n return {\n bytes,\n };\n}", "decodeCodec": "function decodeUplink(input) {\n const bytes = input.bytes;\n const data = {};\n\n return {\n data,\n };\n}", "properties": [ { "key": "Power", "name": "Power", "type": "integer", "unit": "W" } ], "actions": [ { "confirmed": true, "fPort": 85, "name": "Power On", "payload": "080100ff", "payloadDataType": "Hex" } ], "updatedBy": "d6b0e137-xxxx-xxxx-xxxx-c944cc12a5f4", "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1706659200000 }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/assets/{assetId}/enqueue-downlink": { "post": { "summary": "Enqueue Asset Downlink", "description": "Enqueue Asset Downlink", "operationId": "Asset.EnqueueAssetDownlink", "tags": [ "Asset" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "assetId", "description": "The ID of asset.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "action": { "type": "string", "description": "The name of manufacturer." }, "base64": { "type": "string", "description": "The base64 of asset downlink." } }, "required": [ "action", "base64" ] }, "example": { "action": "Power On" }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "received": { "type": "string" } }, "required": [ "received" ], "description": "Data of the asset." } }, "required": [ "data" ] }, "example": { "data": { "received": true } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "409": { "description": "The resource already exists.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource already exists." }, "message": { "type": "string", "description": "The resource already exists message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceAlreadyExistsError", "message": "The operation cannot be completed because a resource with the specified identifier already exists." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/assets/{assetId}/status-thresholds": { "get": { "summary": "Get Asset status Thresholds", "description": "Get asset status thresholds", "operationId": "Asset.GetAssetStatusThresholds", "tags": [ "Asset" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "assetId", "description": "The ID of the asset.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "statusThresholds": { "type": "object", "properties": { "critical": { "type": "array", "items": { "type": "object", "properties": { "property": { "type": "string" }, "symbol": { "type": "string" }, "valueDataType": { "type": "string" }, "value": { "type": "number" }, "operator": { "type": "string" } }, "required": [ "property", "symbol", "valueDataType", "value" ] } }, "warning": { "type": "array", "items": { "type": "object", "properties": { "property": { "type": "string" }, "symbol": { "type": "string" }, "valueDataType": { "type": "string" }, "value": { "type": "number" }, "operator": { "type": "string" } }, "required": [ "property", "symbol", "valueDataType", "value" ] } } }, "required": [ "critical", "warning" ] } }, "required": [ "statusThresholds" ], "description": "Data of the asset threshold." } }, "required": [ "data" ] }, "example": { "data": { "statusThresholds": { "critical": [ { "property": "Temperature", "symbol": ">", "valueDataType": "integer", "value": 40, "operator": "AND" }, { "property": "Current", "symbol": ">", "valueDataType": "float", "value": 10, "operator": "AND" } ], "warning": [ { "property": "Temperature", "symbol": "<", "valueDataType": "integer", "value": 40, "operator": "AND" }, { "property": "Current", "symbol": "<", "valueDataType": "float", "value": 10, "operator": "AND" } ] } } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "put": { "summary": "Update Asset status Thresholds", "description": "Update asset status thresholds", "operationId": "Asset.UpdateAssetStatusThresholds", "tags": [ "Asset" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "assetId", "description": "The ID of the asset.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "statusThresholds": { "type": "object", "properties": { "critical": { "type": "array", "items": { "type": "object", "properties": { "property": { "type": "string" }, "symbol": { "type": "string" }, "valueDataType": { "type": "string" }, "value": { "type": "number" }, "operator": { "type": "string" } }, "required": [ "property", "symbol", "valueDataType", "value" ] } }, "warning": { "type": "array", "items": { "type": "object", "properties": { "property": { "type": "string" }, "symbol": { "type": "string" }, "valueDataType": { "type": "string" }, "value": { "type": "number" }, "operator": { "type": "string" } }, "required": [ "property", "symbol", "valueDataType", "value" ] } } }, "required": [ "critical", "warning" ], "description": "The status of asset threshold." } }, "required": [ "statusThresholds" ] }, "example": { "statusThresholds": { "critical": [ { "property": "Temperature", "symbol": ">", "valueDataType": "integer", "value": 40, "operator": "AND" }, { "property": "Current", "symbol": ">", "valueDataType": "float", "value": 10, "operator": "AND" } ], "warning": [ { "property": "Temperature", "symbol": "<", "valueDataType": "integer", "value": 40, "operator": "AND" }, { "property": "Current", "symbol": "<", "valueDataType": "float", "value": 10, "operator": "AND" } ] } }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "statusThresholds": { "type": "object", "properties": { "critical": { "type": "array", "items": { "type": "object", "properties": { "property": { "type": "string" }, "symbol": { "type": "string" }, "valueDataType": { "type": "string" }, "value": { "type": "number" }, "operator": { "type": "string" } }, "required": [ "property", "symbol", "valueDataType", "value" ] } }, "warning": { "type": "array", "items": { "type": "object", "properties": { "property": { "type": "string" }, "symbol": { "type": "string" }, "valueDataType": { "type": "string" }, "value": { "type": "number" }, "operator": { "type": "string" } }, "required": [ "property", "symbol", "valueDataType", "value" ] } } }, "required": [ "critical", "warning" ] } }, "required": [ "statusThresholds" ], "description": "Data of the asset threshold." } }, "required": [ "data" ] }, "example": { "data": { "statusThresholds": { "critical": [ { "property": "Temperature", "symbol": ">", "valueDataType": "integer", "value": 40 }, { "property": "Current", "symbol": ">", "valueDataType": "float", "value": 10, "operator": "AND" } ], "warning": [ { "property": "Temperature", "symbol": "<", "valueDataType": "integer", "value": 40 }, { "property": "Current", "symbol": "<", "valueDataType": "float", "value": 10, "operator": "AND" } ] } } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/assets/{assetId}/metrics": { "get": { "summary": "Get metric data by asset ID", "description": "Get Metric Data By Asset ID for Organization", "operationId": "Asset.GetMetricDataByAssetId", "tags": [ "Asset" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "assetId", "description": "The ID of asset.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "days", "description": "The day of metric.", "in": "query", "schema": { "type": "number", "minimum": 1, "maximum": 32 }, "required": true }, { "name": "metricName", "description": "The name of IoT things.", "in": "query", "schema": { "type": "string" }, "required": true }, { "name": "maxResults", "description": "The maximum number of results to return.", "in": "query", "schema": { "type": "number", "minimum": 10, "maximum": 100 }, "required": false }, { "name": "nextToken", "description": "To retrieve the next set of results.", "in": "query", "schema": { "type": "string" }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "timestamp": { "type": "object", "properties": {}, "required": [] } }, "required": [ "timestamp" ], "description": "Data of the asset." }, "errors": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] }, "description": "List of errors (empty if none)." } }, "required": [ "data", "errors" ] }, "example": { "data": { "1708797600000": { "a-24e124148b329013": { "Voltage-average": 115.91 }, "a-24e124148c480389": { "Voltage-average": 248.05 }, "a-24e124148c482498": { "Voltage-average": 247.21 } } }, "errors": [] }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/assets/{assetId}/logs": { "get": { "summary": "List Assets Logs", "description": "List assets logs", "operationId": "Asset.ListAssetLogs", "tags": [ "Asset" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "assetId", "description": "The ID of the asset (Allow all).", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "startDate", "description": "The start date number of query.", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "endDate", "description": "The end date number of query.", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "maxResults", "description": "The maximum number of results to return.", "in": "query", "schema": { "type": "number", "default": 10 }, "required": false }, { "name": "nextToken", "description": "To retrieve the next set of results.", "in": "query", "schema": { "type": "string" }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "assetId": { "type": "string" }, "organizationId": { "type": "string" }, "eventName": { "type": "string" }, "createdAt": { "type": "string" }, "payload": { "type": "object", "properties": {}, "required": [] }, "metadata": { "type": "object", "properties": {}, "required": [] } }, "required": [ "assetId", "organizationId", "eventName", "createdAt", "payload", "metadata" ] }, "description": "Data of the asset log." } }, "required": [ "data" ] }, "example": { "data": [ { "assetId": "a-assetId", "organizationId": "o-organizationId", "eventName": "OnDisconnected", "payload": {}, "createdAt": 1704067200000, "metadata": { "assetName": "24E124FFFEF23685" } } ] }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/assets/{assetId}/rawdata": { "get": { "summary": "List Asset Rawdata.", "description": "List Asset Rawdata", "operationId": "Asset.ListAssetRawdata", "tags": [ "Asset" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "assetId", "description": "The ID of asset.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "startDate", "description": "The start date number of query.", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "endDate", "description": "The end date number of query.", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "maxResults", "description": "The maximum number of results to return.", "in": "query", "schema": { "type": "number" }, "required": false }, { "name": "nextToken", "description": "To retrieve the next set of results.", "in": "query", "schema": { "type": "string" }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "timestamp": { "type": "number" }, "rssi": { "type": "number" }, "Battery": { "type": "number" } }, "required": [ "timestamp", "rssi", "Battery" ] }, "description": "Rawdata of the assets." }, "nextToken": { "type": "string", "description": "The next data token." } }, "required": [ "data" ] }, "example": { "data": [ { "timestamp": 1504569600000, "rssi": -69, "Battery": 100 } ], "nextToken": "eyJ2ZXJzaW9uIjoxLCJzdGFydElkIjoiYXNzZXRJZCIsImFzc2V0SWQiOiJhc3NldElkIn0=" }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/locations/{locationId}/assets": { "get": { "summary": "List Assest from Location ID", "description": "List Assets From LocationId", "operationId": "Asset.ListAssetsFromLocationId", "tags": [ "Asset" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "locationId", "description": "The ID of location.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "shadowNames", "description": "Specify shadow names to fetch. (Default: DeviceUplink)", "in": "query", "schema": { "type": "array", "items": { "type": "string" } }, "required": false }, { "name": "maxResults", "description": "The maximum number of results to return.", "in": "query", "schema": { "type": "number", "minimum": 10, "maximum": 25 }, "required": false }, { "name": "nextToken", "description": "To retrieve the next set of results.", "in": "query", "schema": { "type": "string" }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "organizationId": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "devEui": { "type": "string" }, "uuid": { "type": "string" }, "shadows": { "type": "object", "properties": {}, "required": [] }, "integrationServiceId": { "type": "string" }, "assetTypeId": { "type": "string" }, "locationId": { "type": "string" }, "chatRoomId": { "type": "string" }, "modelName": { "type": "string" }, "nameOfManufacturer": { "type": "string" }, "yearOfManufacture": { "type": "number" }, "purchaseCost": { "type": "number" }, "purchaseDate": { "type": "number" }, "warrantyEndDate": { "type": "number" }, "image": { "type": "string" }, "files": { "type": "string" }, "keepAlive": { "type": "number" }, "connectionStatus": { "type": "boolean" }, "status": { "type": "string" }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "id", "organizationId", "name", "description", "shadows", "integrationServiceId", "assetTypeId", "locationId", "chatRoomId", "modelName", "nameOfManufacturer", "yearOfManufacture", "purchaseCost", "purchaseDate", "warrantyEndDate", "image", "files", "createdAtDateString", "createdAt", "updatedAtDateString", "updatedAt" ], "description": "An array of assets within the specified location." } }, "required": [ "data" ] }, "example": { "data": { "id": "l-locationId", "organizationId": "o-organizationId", "name": "IDT-Location", "description": "IDT-Location-Description", "devEui": "24e124535b312345", "shadows": {}, "integrationServiceId": "is-integrationServiceId", "assetTypeId": "at-assetTypeId", "locationId": "l-locationId", "chatRoomId": "ABCDE", "modelName": "Bot-Model-Name", "nameOfManufacturer": "Bot-Manufacturer", "yearOfManufacture": 2024, "purchaseCost": 12345, "purchaseDate": 1700000000000, "warrantyEndDate": 1800000000000, "image": "abc.png", "files": [ "Infodeck-Bot-0001.pdf" ], "uuid": "24e124535b312345", "keepAlive": 2592000, "connectionStatus": false, "status": "Normal", "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000, "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1706659200000 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/app-clients/{appClientId}": { "get": { "summary": "Get App Client", "description": "Get app client", "operationId": "Authentication.GetAppClient", "tags": [ "Authentication" ], "parameters": [ { "name": "appClientId", "description": "The client id of application.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "clientId": { "type": "string" }, "clientName": { "type": "string" }, "callbackUrls": { "type": "array", "items": { "type": "string" } }, "logoutUrls": { "type": "array", "items": { "type": "string" } } }, "required": [ "clientId", "clientName", "callbackUrls", "logoutUrls" ], "description": "Data of the app client." } }, "required": [ "data" ] }, "example": { "data": { "clientId": "16tofxxxxxxxxxxm", "clientName": "ApiServiceUserPoolClient", "callbackUrls": [ "http://localhost:8080" ], "logoutUrls": [ "http://localhost:8080" ] } }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } } }, "security": [] } }, "/authentications/tokens": { "post": { "summary": "Get authentication token", "description": "Get authentication token. If 2FA is enabled and required,\n returns a session token for 2FA verification instead of Cognito tokens.", "operationId": "Authentication.GetAuthenticationToken", "tags": [ "Authentication" ], "parameters": [ { "name": "organizationId", "description": "", "in": "path", "required": false, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "account": { "type": "string", "description": "The account of user." }, "password": { "type": "string", "description": "The password of user." } }, "required": [ "account", "password" ] }, "example": { "account": "example@infodeck.io", "password": "**********" }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "token": { "type": "string" }, "accessToken": { "type": "string" }, "tokenType": { "type": "string" }, "refreshToken": { "type": "string" }, "idToken": { "type": "string" }, "expiresIn": { "type": "string" } }, "required": [ "token", "accessToken", "tokenType", "refreshToken", "idToken", "expiresIn" ], "description": "Data of the token." } }, "required": [ "data" ] }, "example": { "data": { "token": "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "accessToken": "ACCESS_TOKEN", "tokenType": "Bearer", "refreshToken": "REFRESH_TOKEN", "idToken": "Bearer yJhbxxxxxxxxxxb", "expiresIn": "86400000" } }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [] } }, "/authentications/logout": { "post": { "summary": "Logout", "description": "Writes a `user_session.logout` audit row. `/authentications/*`\n is in the global audit-trail middleware skip-list, so this\n handler owns the audit row — otherwise verifyRbac() would\n populate request.user/request.organization and the middleware\n would write a duplicate route-introspection-derived row.\n Cognito token invalidation still happens client-side.", "operationId": "Authentication.Logout", "tags": [ "Authentication" ], "parameters": [], "success": [], "requestBody": {}, "responses": { "204": { "content": { "application/json": { "schema": { "type": "object", "properties": { "-": { "description": "No content." } }, "required": [ "-" ] }, "example": {}, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/decks": { "post": { "summary": "Create Deck", "description": "Create Deck", "operationId": "Deck.CreateDeck", "tags": [ "Deck" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "title": { "type": "string", "description": "The title of deck." }, "description": { "type": "string", "description": "The description of deck." }, "weight": { "type": "number", "description": "The weight of deck." }, "widgets": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] }, "description": "The widgets of deck." }, "deckType": { "type": "string", "description": "The type of deck: 'monitor' or 'report'. Defaults to 'monitor'." }, "timeRange": { "type": "object", "properties": {}, "required": [], "description": "Deck-level time range configuration (required for report type)." } }, "required": [ "weight" ] }, "example": { "title": "IDT-Deck", "description": "IDT-Deck-Description", "weight": "1", "deckType": "monitor", "widgets": [ { "id": "1710000000000", "configuration": { "assetId": "a-assetId", "modeKey": "default" }, "description": "Display a device status", "gridLayout": { "h": 15, "i": 1700000000000, "w": 6, "x": 6, "y": 0 }, "title": "Data Combination", "type": "UtdDc" } ] }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "title": { "type": "string" }, "description": { "type": "string" }, "weight": { "type": "string" }, "widgets": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "configuration": { "type": "object", "properties": { "assetId": { "type": "string" }, "modeKey": { "type": "string" } }, "required": [ "assetId", "modeKey" ] }, "description": { "type": "string" }, "gridLayout": { "type": "object", "properties": { "h": { "type": "number" }, "i": { "type": "string" }, "w": { "type": "number" }, "x": { "type": "number" }, "y": { "type": "number" } }, "required": [ "h", "i", "w", "x", "y" ] }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "id", "configuration", "description", "gridLayout", "title", "type" ] } }, "createdBy": { "type": "string" }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "title", "description", "weight", "widgets", "createdBy", "createdAtDateString", "createdAt", "updatedAtDateString", "updatedAt" ], "description": "Data of the deck." } }, "required": [ "data" ] }, "example": { "data": { "title": "IDT-Deck", "description": "IDT-Deck-Description", "weight": "1", "widgets": [ { "id": "1710000000000", "configuration": { "assetId": "a-assetId", "modeKey": "default" }, "description": "Display a device status", "gridLayout": { "h": 15, "i": 1700000000000, "w": 6, "x": 6, "y": 0 }, "title": "Data Combination", "type": "UtdDc" } ], "autoRefreshInterval": 0, "createdBy": "d6b0e137-xxxx-xxxx-xxxx-c944cc12a5f4", "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000, "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1706659200000 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "List Decks", "description": "List Decks", "operationId": "Deck.ListDecks", "tags": [ "Deck" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "maxResults", "description": "The maximum number of results to return.", "in": "query", "schema": { "type": "number", "minimum": 10, "maximum": 100 }, "required": false }, { "name": "nextToken", "description": "To retrieve the next set of results.", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "deckType", "description": "Filter by deck type: 'monitor' or 'report'.", "in": "query", "schema": { "type": "string" }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "title": { "type": "string" }, "description": { "type": "string" }, "weight": { "type": "string" }, "widgets": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "configuration": { "type": "object", "properties": { "assetId": { "type": "string" }, "modeKey": { "type": "string" } }, "required": [ "assetId", "modeKey" ] }, "description": { "type": "string" }, "gridLayout": { "type": "object", "properties": { "h": { "type": "number" }, "i": { "type": "string" }, "w": { "type": "number" }, "x": { "type": "number" }, "y": { "type": "number" } }, "required": [ "h", "i", "w", "x", "y" ] }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "id", "configuration", "description", "gridLayout", "title", "type" ] } }, "autoRefreshInterval": { "type": "string" }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "title", "description", "weight", "widgets", "autoRefreshInterval", "createdAtDateString", "createdAt", "updatedAtDateString", "updatedAt" ] }, "description": "Data of the deck." } }, "required": [ "data" ] }, "example": { "data": [ { "title": "IDT-Deck", "description": "IDT-Deck-Description", "weight": "1", "widgets": [ { "id": "1710000000000", "configuration": { "assetId": "a-assetId", "modeKey": "default" }, "description": "Display a device status", "gridLayout": { "h": 15, "i": 1700000000000, "w": 6, "x": 6, "y": 0 }, "title": "Data Combination", "type": "UtdDc" } ], "autoRefreshInterval": 0, "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000, "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1706659200000 } ] }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/decks/{deckId}/widgets": { "post": { "summary": "Create Deck Widget", "description": "Create Deck Widget", "operationId": "Deck.CreateDeckWidget", "tags": [ "Deck" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "deckId", "description": "The ID of deck.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "widget": { "type": "object", "properties": {}, "required": [], "description": "The widget of deck." } }, "required": [ "widget" ] }, "example": { "id": "1710000000000", "configuration": { "assetId": "a-assetId", "modeKey": "default" }, "title": "Data Combination", "type": "UtdDc" }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "title": { "type": "string" }, "description": { "type": "string" }, "weight": { "type": "string" }, "widgets": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "configuration": { "type": "object", "properties": { "assetId": { "type": "string" }, "modeKey": { "type": "string" } }, "required": [ "assetId", "modeKey" ] }, "description": { "type": "string" }, "gridLayout": { "type": "object", "properties": { "h": { "type": "number" }, "i": { "type": "string" }, "w": { "type": "number" }, "x": { "type": "number" }, "y": { "type": "number" } }, "required": [ "h", "i", "w", "x", "y" ] }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "id", "configuration", "description", "gridLayout", "title", "type" ] } }, "autoRefreshInterval": { "type": "number" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "title", "description", "weight", "widgets", "autoRefreshInterval", "updatedAtDateString", "updatedAt" ], "description": "Data of the deck." } }, "required": [ "data" ] }, "example": { "data": { "title": "IDT-Deck", "description": "IDT-Deck-Description", "weight": "1", "widgets": [ { "id": "1710000000000", "configuration": { "assetId": "a-assetId", "modeKey": "default" }, "description": "Display a device status", "gridLayout": { "h": 15, "i": 1700000000000, "w": 6, "x": 6, "y": 0 }, "title": "Data Combination", "type": "UtdDc" } ], "autoRefreshInterval": 0, "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1706659200000 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/decks/{deckId}": { "delete": { "summary": "Delete Deck", "description": "Delete Deck", "operationId": "Deck.DeleteDeck", "tags": [ "Deck" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "deckId", "description": "The ID of deck.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": {}, "required": [], "description": "Data of the deck." } }, "required": [ "data" ] }, "example": { "data": null }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "Get Deck", "description": "Get Deck", "operationId": "Deck.GetDeck", "tags": [ "Deck" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "deckId", "description": "The ID of deck.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "includeRefreshPolicy", "description": "Include derived sensor-aware refresh guidance.", "in": "query", "schema": { "type": "boolean" }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "title": { "type": "string" }, "description": { "type": "string" }, "weight": { "type": "string" }, "widgets": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "configuration": { "type": "object", "properties": { "assetId": { "type": "string" }, "modeKey": { "type": "string" } }, "required": [ "assetId", "modeKey" ] }, "description": { "type": "string" }, "gridLayout": { "type": "object", "properties": { "h": { "type": "number" }, "i": { "type": "string" }, "w": { "type": "number" }, "x": { "type": "number" }, "y": { "type": "number" } }, "required": [ "h", "i", "w", "x", "y" ] }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "id", "configuration", "description", "gridLayout", "title", "type" ] } }, "autoRefreshInterval": { "type": "number" }, "refreshPolicy": { "type": "object", "properties": { "mode": { "type": "string" }, "recommendedIntervalSeconds": { "type": "number" }, "sources": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] } } }, "required": [ "mode", "recommendedIntervalSeconds", "sources" ] }, "createdBy": { "type": "string" }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "title", "description", "weight", "widgets", "autoRefreshInterval", "createdBy", "createdAtDateString", "createdAt", "updatedAtDateString", "updatedAt" ], "description": "The title of the deck." } }, "required": [ "data" ] }, "example": { "data": { "title": "IDT-Deck", "description": "IDT-Deck-Description", "weight": "1", "widgets": [ { "id": "1710000000000", "configuration": { "assetId": "a-assetId", "modeKey": "default" }, "description": "Display a device status", "gridLayout": { "h": 15, "i": 1700000000000, "w": 6, "x": 6, "y": 0 }, "title": "Data Combination", "type": "UtdDc" } ], "autoRefreshInterval": 0, "createdBy": "d6b0e137-xxxx-xxxx-xxxx-c944cc12a5f4", "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000, "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1706659200000 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "put": { "summary": "Update Deck", "description": "Update Deck", "operationId": "Deck.UpdateDeck", "tags": [ "Deck" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "deckId", "description": "The ID of deck.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "title": { "type": "string", "description": "The title of deck." }, "description": { "type": "string", "description": "The description of deck." }, "weight": { "type": "number", "description": "The weight of deck." }, "widgets": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] }, "description": "The widgets of deck." }, "autoRefreshInterval": { "type": "number", "description": "The auto refresh interval of deck." }, "timeRange": { "type": "object", "properties": {}, "required": [], "description": "Deck-level time range (only for report type decks)." } }, "required": [ "weight" ] }, "example": { "title": "IDT-Deck", "description": "IDT-Deck-Description", "weight": "1", "widgets": [ { "id": "1710000000000", "configuration": { "assetId": "a-assetId", "modeKey": "default" }, "description": "Display a device status", "gridLayout": { "h": 15, "i": 1700000000000, "w": 6, "x": 6, "y": 0 }, "title": "Data Combination", "type": "UtdDc" } ], "autoRefreshInterval": 0 }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "title": { "type": "string" }, "description": { "type": "string" }, "weight": { "type": "string" }, "widgets": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "configuration": { "type": "object", "properties": { "assetId": { "type": "string" }, "modeKey": { "type": "string" } }, "required": [ "assetId", "modeKey" ] }, "description": { "type": "string" }, "gridLayout": { "type": "object", "properties": { "h": { "type": "number" }, "i": { "type": "string" }, "w": { "type": "number" }, "x": { "type": "number" }, "y": { "type": "number" } }, "required": [ "h", "i", "w", "x", "y" ] }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "id", "configuration", "description", "gridLayout", "title", "type" ] } }, "autoRefreshInterval": { "type": "number" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "title", "description", "weight", "widgets", "autoRefreshInterval", "updatedAtDateString", "updatedAt" ], "description": "Data of the deck." } }, "required": [ "data" ] }, "example": { "data": { "title": "IDT-Deck", "description": "IDT-Deck-Description", "weight": "1", "widgets": [ { "id": "1710000000000", "configuration": { "assetId": "a-assetId", "modeKey": "default" }, "description": "Display a device status", "gridLayout": { "h": 15, "i": 1700000000000, "w": 6, "x": 6, "y": 0 }, "title": "Data Combination", "type": "UtdDc" } ], "autoRefreshInterval": 0, "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1706659200000 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/decks/{deckId}/duplicate": { "post": { "summary": "Duplicate Deck", "description": "Duplicate an existing deck with all its widgets, preserving deckType and timeRange", "operationId": "Deck.DuplicateDeck", "tags": [ "Deck" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "deckId", "description": "The ID of deck to duplicate.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "title": { "type": "string", "description": "Optional new title for the duplicated deck." } }, "required": [] }, "example": { "title": "My Deck (Copy)" }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "organizationId": { "type": "string" }, "title": { "type": "string" }, "description": { "type": "string" }, "weight": { "type": "string" }, "widgets": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] } }, "deckType": { "type": "string" }, "timeRange": { "type": "object", "properties": {}, "required": [] }, "autoRefreshInterval": { "type": "number" }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" } }, "required": [ "id", "organizationId", "title", "description", "weight", "widgets", "deckType", "autoRefreshInterval", "createdAtDateString", "createdAt" ], "description": "Data of the duplicated deck." } }, "required": [ "data" ] }, "example": { "data": { "id": "d-xyz123", "organizationId": "o-abc456", "title": "My Deck (Copy)", "description": "IDT-Deck-Description", "weight": "1", "deckType": "monitor", "widgets": [], "autoRefreshInterval": 0, "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/edge-gateways/{edgeGatewayId}/metrics/cpu-memory-usage": { "get": { "summary": "Get CPU & memory usage metric with edge gateway", "description": "Get CPU & memory usage metric with edge gateway", "operationId": "Edge_Gateways.GetCpuMemoryUsageMetricWithEdgeGateway", "tags": [ "Edge Gateways" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "edgeGatewayId", "description": "Edge Gateway ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "period", "description": "Period of metric(unit: sec).", "in": "query", "schema": { "type": "string", "enum": [ "60", "300", "900", "3600", "86400", "604800", "2592000" ], "default": "300" }, "required": false }, { "name": "periodTime", "description": "Period time of metric(unit: sec).", "in": "query", "schema": { "type": "number", "minimum": 1, "maximum": 129600, "default": 60 }, "required": false }, { "name": "statistic", "description": "Statistic of metric.", "in": "query", "schema": { "type": "string", "enum": [ "Average", "Minimum", "Maximum" ], "default": "Average" }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "cpuUsage": { "type": "object", "properties": { "timestamps": { "type": "array", "items": { "type": "number" } }, "values": { "type": "array", "items": { "type": "number" } } }, "required": [ "timestamps", "values" ] }, "memoryUsage": { "type": "object", "properties": { "timestamps": { "type": "array", "items": { "type": "number" } }, "values": { "type": "array", "items": { "type": "number" } } }, "required": [ "timestamps", "values" ] } }, "required": [ "cpuUsage", "memoryUsage" ], "description": "Data of the edge gateway." } }, "required": [ "data" ] }, "example": { "data": { "cpuUsage": { "timestamps": [ 1704067200000, 1706659200000 ], "values": [ 20, 25 ] }, "memoryUsage": { "timestamps": [ 1704067200000, 1706659200000 ], "values": [ 45, 50 ] } } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/edge-gateways/{edgeGatewayId}/metrics/disk-usage": { "get": { "summary": "Get disk usage metric with edge gateway", "description": "Get disk usage metric with edge gateway", "operationId": "Edge_Gateways.GetDiskUsageMetricWithEdgeGateway", "tags": [ "Edge Gateways" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "edgeGatewayId", "description": "Edge Gateway ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "diskUsage": { "type": "number" } }, "required": [ "diskUsage" ], "description": "Data of the edge gateway." } }, "required": [ "data" ] }, "example": { "data": { "diskUsage": 75 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/edge-gateways/{thingName}/connectivity-info": { "get": { "summary": "Get Edge Gateway Connectivity Info", "description": "Get Edge Gateway Connectivity Info", "operationId": "Edge_Gateways.GetEdgeGatewayConnectivityInfo", "tags": [ "Edge Gateways" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "edgeGatewayId", "description": "Edge Gateway ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "thingName": { "type": "string" }, "connectivityInfo": { "type": "object", "properties": { "macAddress": { "type": "string" }, "ipAddress": { "type": "string" }, "port": { "type": "string" }, "protocol": { "type": "string" } }, "required": [ "macAddress", "ipAddress", "port", "protocol" ] } }, "required": [ "thingName", "connectivityInfo" ], "description": "The container object for the response data." } }, "required": [ "data" ] }, "example": { "data": { "thingName": "IDT-Edge-Gateway-A", "connectivityInfo": { "macAddress": "00000000000000000", "ipAddress": "192.168.0.1", "port": "80", "protocol": "HTTP" } } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/edge-gateways/{edgeGatewayId}/installed-components": { "get": { "summary": "Get installed components in edge gateway", "description": "Get installed components in edge gateway", "operationId": "Edge_Gateways.GetInstalledComponentsInEdgeGateway", "tags": [ "Edge Gateways" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "edgeGatewayId", "description": "Edge Gateway ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "componentName": { "type": "string" }, "componentVersion": { "type": "string" }, "isRoot": { "type": "boolean" }, "lastInstallationSource": { "type": "string" }, "lastReportedTimestamp": {}, "lastStatusChangeTimestamp": {}, "lifecycleState": { "type": "string" }, "lifecycleStateDetails": { "type": "string" }, "lifecycleStatusCodes": { "type": "array", "items": { "type": "string" } } }, "required": [ "componentName", "componentVersion", "isRoot", "lastInstallationSource", "lastReportedTimestamp", "lastStatusChangeTimestamp", "lifecycleState", "lifecycleStateDetails", "lifecycleStatusCodes" ] }, "description": "Data of the edge gateway." } }, "required": [ "data" ] }, "example": { "data": [ { "componentName": "com.example.ComponentA", "componentVersion": "1.0.0", "isRoot": false, "lastInstallationSource": "https://example.com/components/componentA/1.0.0", "lastReportedTimestamp": 1700000000000, "lastStatusChangeTimestamp": 1704067200000, "lifecycleState": "RUNNING", "lifecycleStateDetails": "The component is currently running.", "lifecycleStatusCodes": [ "NORMAL" ] } ] }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/edge-gateways/{edgeGatewayId}/lorawan-devices": { "get": { "summary": "Get LoRaWAN devices in edge gateway", "description": "Get LoRaWAN Devices in edge gateway", "operationId": "Edge_Gateways.GetLoRaWANDevicesInEdgeGateway", "tags": [ "Edge Gateways" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "edgeGatewayId", "description": "Edge Gateway ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "requireThingAttributes", "description": "Also fetch thing attributes.", "in": "query", "schema": { "type": "string", "enum": [ "true", "false" ] }, "required": false }, { "name": "requireThingShadows", "description": "Also fetch thing shadows with shadow names.", "in": "query", "schema": { "type": "string", "enum": [ "true", "false" ] }, "required": false }, { "name": "thingShadowNames", "description": "Specify shadow names to fetch. (Default: optional; Options: DeviceUplink, GatewayUplink)", "in": "query", "schema": { "type": "array", "items": { "type": "string" } }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "thingArn": { "type": "string" }, "thingId": { "type": "string" }, "thingName": { "type": "string" }, "thingTypeName": { "type": "string" }, "attributes": { "type": "object", "properties": {}, "required": [] }, "shadows": { "type": "object", "properties": {}, "required": [] } }, "required": [ "thingArn", "thingId", "thingName", "thingTypeName", "attributes", "shadows" ], "description": "Data of the edge gateway." } }, "required": [ "data" ] }, "example": { "data": { "thingArn": "arn:aws:iot:region:accountId:thing/ThingName", "thingId": "abcd1234", "thingName": "LoRaWAN_Gateway_01", "thingTypeName": "LoRaWAN_Gateway", "attributes": { "Manufacturer": "ExampleCorp", "Model": "LW-Gateway-1000", "SerialNumber": "SN000123456789", "FirmwareVersion": "1.0.5" }, "shadows": { "DeviceUplink": { "state": { "reported": { "Payload": { "Temperature": 25.4, "Humidity": 62, "CO2": 869, "rssi": -91 }, "ExpiredAt": 1711341602287 }, "metadata": { "reported": { "Payload": { "Temperature": { "timestamp": 1711330802 }, "Humidity": { "timestamp": 1711330802 }, "CO2": { "timestamp": 1711330802 }, "rssi": { "timestamp": 1711330802 } }, "ExpiredAt": { "timestamp": 1711330802 } } }, "version": 21415, "timestamp": 1711330849 } } } } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/edge-gateways/{edgeGatewayId}/lorawan-gateways": { "get": { "summary": "Get LoRaWAN gateways in edge gateway", "description": "Get LoRaWAN Gateways in edge gateway", "operationId": "Edge_Gateways.GetLoRaWANGatewaysInEdgeGateway", "tags": [ "Edge Gateways" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "edgeGatewayId", "description": "Edge Gateway ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "requireThingAttributes", "description": "Also fetch thing attributes.", "in": "query", "schema": { "type": "string", "enum": [ "true", "false" ] }, "required": false }, { "name": "requireThingShadows", "description": "Also fetch thing shadows with shadow names.", "in": "query", "schema": { "type": "string", "enum": [ "true", "false" ] }, "required": false }, { "name": "thingShadowNames", "description": "Specify shadow names to fetch. (Default: optional; Options: DeviceUplink, GatewayUplink)", "in": "query", "schema": { "type": "array", "items": { "type": "string" } }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "thingArn": { "type": "string" }, "thingId": { "type": "string" }, "thingName": { "type": "string" }, "thingTypeName": { "type": "string" }, "attributes": { "type": "object", "properties": {}, "required": [] }, "shadows": { "type": "object", "properties": {}, "required": [] } }, "required": [ "thingArn", "thingId", "thingName", "thingTypeName", "attributes", "shadows" ], "description": "Data of the edge gateway." } }, "required": [ "data" ] }, "example": { "data": { "thingArn": "arn:aws:iot:region:accountId:thing/LoRaWANGateway01", "thingId": "efgh5678", "thingName": "LoRaWAN_Gateway_01", "thingTypeName": "LoRaWAN_Gateway", "attributes": { "Location": "Building 1, Floor 3", "CoverageArea": "Campus A", "NetworkProvider": "LoRaWAN Network A", "DeploymentDate": "2023-06-15" }, "shadows": { "DeviceUplink": { "state": { "reported": { "Payload": { "Temperature": 25.4, "Humidity": 62, "CO2": 869, "rssi": -91 }, "ExpiredAt": 1711341602287 }, "metadata": { "reported": { "Payload": { "Temperature": { "timestamp": 1711330802 }, "Humidity": { "timestamp": 1711330802 }, "CO2": { "timestamp": 1711330802 }, "rssi": { "timestamp": 1711330802 } }, "ExpiredAt": { "timestamp": 1711330802 } } }, "version": 21415, "timestamp": 1711330849 } } } } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/edge-gateways/{edgeGatewayId}/metrics/network": { "get": { "summary": "Get network metric with edge gateway", "description": "Get network metric with edge gateway", "operationId": "Edge_Gateways.GetNetworkMetricWithEdgeGateway", "tags": [ "Edge Gateways" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "edgeGatewayId", "description": "Edge Gateway ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "period", "description": "Period of metric. (unit: sec)", "in": "query", "schema": { "type": "number", "enum": [ "60", "300", "900", "3600", "86400", "604800", "2592000" ], "default": 300 }, "required": false }, { "name": "periodTime", "description": "Period time of metric. (unit: sec)", "in": "query", "schema": { "type": "number", "minimum": 1, "maximum": 129600, "default": 60 }, "required": false }, { "name": "statistic", "description": "Statistic of metric.", "in": "query", "schema": { "type": "string", "enum": [ "Average", "Minimum", "Maximum" ], "default": "Average" }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "pingMax": { "type": "object", "properties": { "timestamps": { "type": "array", "items": { "type": "number" } }, "values": { "type": "array", "items": { "type": "number" } } }, "required": [ "timestamps", "values" ] }, "pingMin": { "type": "object", "properties": { "timestamps": { "type": "array", "items": { "type": "number" } }, "values": { "type": "array", "items": { "type": "number" } } }, "required": [ "timestamps", "values" ] }, "pingAverage": { "type": "object", "properties": { "timestamps": { "type": "array", "items": { "type": "number" } }, "values": { "type": "array", "items": { "type": "number" } } }, "required": [ "timestamps", "values" ] }, "pingMdev": { "type": "object", "properties": { "timestamps": { "type": "array", "items": { "type": "number" } }, "values": { "type": "array", "items": { "type": "number" } } }, "required": [ "timestamps", "values" ] }, "pingTotalPackets": { "type": "object", "properties": { "timestamps": { "type": "array", "items": { "type": "number" } }, "values": { "type": "array", "items": { "type": "number" } } }, "required": [ "timestamps", "values" ] }, "pingLossPackets": { "type": "object", "properties": { "timestamps": { "type": "array", "items": { "type": "number" } }, "values": { "type": "array", "items": { "type": "number" } } }, "required": [ "timestamps", "values" ] } }, "required": [ "pingMax", "pingMin", "pingAverage", "pingMdev", "pingTotalPackets", "pingLossPackets" ], "description": "Data of the edge gateway." } }, "required": [ "data" ] }, "example": { "data": { "pingMax": { "timestamps": [ 1704067200000, 1706659200000 ], "values": [ 120, 115 ] }, "pingMin": { "timestamps": [ 1704067200000, 1706659200000 ], "values": [ 40, 45 ] }, "pingAverage": { "timestamps": [ 1704067200000, 1706659200000 ], "values": [ 80, 75 ] }, "pingMdev": { "timestamps": [ 1704067200000, 1706659200000 ], "values": [ 5, 7 ] }, "pingTotalPackets": { "timestamps": [ 1704067200000, 1706659200000 ], "values": [ 100, 100 ] }, "pingLossPackets": { "timestamps": [ 1704067200000, 1706659200000 ], "values": [ 0, 1 ] } } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/edge-gateways/{edgeGatewayId}/metrics/temperature": { "get": { "summary": "Get CPU & power temperature metric with edge gateway", "description": "Get CPU & power temperature metric with edge gateway", "operationId": "Edge_Gateways.GetTemperatureMetricWithEdgeGateway", "tags": [ "Edge Gateways" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "edgeGatewayId", "description": "Edge Gateway ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "period", "description": "Period of metric(unit: sec).", "in": "query", "schema": { "type": "string", "enum": [ "60", "300", "900", "3600", "86400", "604800", "2592000" ], "default": "300" }, "required": false }, { "name": "periodTime", "description": "Period time of metric(unit: sec).", "in": "query", "schema": { "type": "number", "minimum": 1, "maximum": 129600, "default": 60 }, "required": false }, { "name": "statistic", "description": "Statistic of metric", "in": "query", "schema": { "type": "string", "enum": [ "Average", "Minimum", "Maximum" ] }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "cpuTemperature": { "type": "object", "properties": { "timestamps": { "type": "array", "items": { "type": "number" } }, "values": { "type": "array", "items": { "type": "number" } } }, "required": [ "timestamps", "values" ] }, "powerTemperature": { "type": "object", "properties": { "timestamps": { "type": "array", "items": { "type": "number" } }, "values": { "type": "array", "items": { "type": "number" } } }, "required": [ "timestamps", "values" ] } }, "required": [ "cpuTemperature", "powerTemperature" ], "description": "Data of the edge gateway." } }, "required": [ "data" ] }, "example": { "data": { "cpuTemperature": { "timestamps": [ 1704067200000, 1706659200000 ], "values": [ 55, 57 ] }, "powerTemperature": { "timestamps": [ 1704067200000, 1706659200000 ], "values": [ 33, 34 ] } } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/edge-gateways": { "get": { "summary": "List edge gateways", "description": "List edge gateways", "operationId": "Edge_Gateways.ListEdgeGateways", "tags": [ "Edge Gateways" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "maxResults", "description": "The maximum number of results to return.", "in": "query", "schema": { "type": "number", "minimum": 10, "maximum": 100 }, "required": false }, { "name": "nextToken", "description": "To retrieve the next set of results.", "in": "query", "schema": { "type": "string" }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "coreDeviceThingName": { "type": "string" }, "status": { "type": "string" }, "lastStatusUpdateTimestamp": { "type": "number" } }, "required": [ "coreDeviceThingName", "status", "lastStatusUpdateTimestamp" ] }, "description": "Data of the edge gateway." } }, "required": [ "data" ] }, "example": { "data": [ { "coreDeviceThingName": "EdgeGateway001", "status": "ACTIVE", "lastStatusUpdateTimestamp": 1700000000000 } ] }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/edge-gateways/{edgeGatewayId}/shadows/shadow-manager": { "put": { "summary": "Update Shadow Manager", "description": "Update Shadow Manager", "operationId": "Edge_Gateways.Update_Shadow_Manager", "tags": [ "Edge Gateways" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "edgeGatewayId", "description": "Edge gateway device EUI", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "deploymentId": { "type": "string" }, "iotJobId": { "type": "string" }, "iotJobArn": { "type": "string" } }, "required": [ "deploymentId", "iotJobId", "iotJobArn" ] }, "description": "Data of the edge gateway." } }, "required": [ "data" ] }, "example": { "data": [ { "deploymentId": "dp-0123456789abcdef0", "iotJobId": "job-abcdef1234567890", "iotJobArn": "arn:aws:iot:region:account:job/job-abcdef1234567890" } ] }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/admin/organizations/{organizationId}/feedback": { "get": { "summary": "Admin Get Feedback", "description": "Admin Get Feedback", "operationId": "Feedback.AdminGetFeedback", "tags": [ "Feedback" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "url": { "type": "string" } }, "required": [ "url" ], "description": "Data of the admin feedback link." } }, "required": [ "data" ] }, "example": { "data": { "url": "https://app.feedback.infodeck.io/en/launch?platform=infodeck&access_token=48b1cxxxxxxxxxx6&refresh_token=a4888xxxxxxxxxx2" } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/resources/{resourceId}/feedback": { "get": { "summary": "Get Feedback Url", "description": "Get Feedback Url", "operationId": "Feedback.GetFeedbackUrl", "tags": [ "Feedback" ], "parameters": [ { "name": "resourceId", "description": "The ID of resource.(a, l, sl, z)", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "url": { "type": "string" } }, "required": [ "url" ], "description": "Data of the chat room." } }, "required": [ "data" ] }, "example": { "data": { "url": "https://app.feedback.infodeck.io/chatRoomId?name=resourceName" } }, "description": "" } } }, "400": { "description": "The request has invalid data.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has invalid data." }, "message": { "type": "string", "description": "The request has invalid data message." } }, "required": [ "error", "message" ] }, "example": { "error": "Bad Request", "message": "The request cannot be processed due to a bad request." }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [] } }, "/organizations/{organizationId}/integration-types/aws-iot/certificates": { "post": { "summary": "Create AWS IoT integration service certificates", "description": "Create AWS IoT integration service certificates", "operationId": "Integration.CreateAwsIotIntegrationServiceCertificates", "tags": [ "Integration" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "integrationServiceId": { "type": "string", "description": "The name of integration." } }, "required": [ "integrationServiceId" ] }, "example": { "organizationId": "o-1234567890" }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "certificatePem": { "type": "number" }, "privateKey": { "type": "string" }, "publicKey": { "type": "string" } }, "required": [ "id", "certificatePem", "privateKey", "publicKey" ], "description": "Data of the AWS IoT integration certificate." } }, "required": [ "data" ] }, "example": { "id": "is-integrationServiceId", "certificatePem": "xxxxxxxxxxxx", "privateKey": "privateKey", "publicKey": "publicKey" }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/integrations": { "post": { "summary": "Create Integration Service", "description": "Create Integration Service", "operationId": "Integration.CreateIntegrationService", "tags": [ "Integration" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of integration." }, "description": { "type": "string", "description": "The description of integration." }, "type": { "type": "string", "description": "The type of integration." } }, "required": [ "name", "type" ] }, "example": { "name": "IDT-Service", "description": "IDT-Servcie-Description", "type": "InfodeckLNS" }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "organizationId": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "type": { "type": "string" }, "config": { "type": "object", "properties": { "host": { "type": "string" }, "apiKey": { "type": "string" }, "authorization": { "type": "string" } }, "required": [ "host", "apiKey", "authorization" ] }, "createdBy": { "type": "string" }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" } }, "required": [ "id", "organizationId", "name", "description", "type", "config", "createdBy", "createdAtDateString", "createdAt" ], "description": "Data of the services." } }, "required": [ "data" ] }, "example": { "id": "is-integrationServiceId", "organizationId": "o-organizationId", "name": "LNS-Service", "description": "LNS-Service-Description", "type": "InfodeckLNS", "config": { "host": "lns-hosto:8080", "apiKey": "eyJ0exxxxxxxxxx4", "authorization": "eyJhbxxxxxxxxxxg" }, "createdBy": "d6b0e137-xxxx-xxxx-xxxx-c944cc12a5f4", "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000 }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "List Integration Services", "description": "List Integration Services", "operationId": "Integration.ListIntegrationServices", "tags": [ "Integration" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "maxResults", "description": "The maximum number of results to return.", "in": "query", "schema": { "type": "number", "minimum": 10, "maximum": 100 }, "required": false }, { "name": "nextToken", "description": "To retrieve the next set of results.", "in": "query", "schema": { "type": "string" }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "organizationId": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "type": { "type": "string" }, "config": { "type": "object", "properties": { "host": { "type": "string" }, "apiKey": { "type": "string" }, "authorization": { "type": "string" } }, "required": [ "host", "apiKey", "authorization" ] }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "id", "organizationId", "name", "description", "type", "config", "createdAtDateString", "createdAt", "updatedAtDateString", "updatedAt" ] }, "description": "Array of integration services." } }, "required": [ "data" ] }, "example": { "data": [ { "id": "is-integrationServiceId", "organizationId": "o-organizationId", "name": "LNS-Service", "description": "LNS-Service-Description", "type": "InfodeckLNS", "config": { "host": "lns-hosto:8080", "apiKey": "eyJ0exxxxxxxxxx4", "authorization": "eyJhbxxxxxxxxxxg" }, "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000, "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1706659200000 } ] }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/integrations/{serviceId}": { "delete": { "summary": "Delete Integration Service", "description": "Delete Integration Service", "operationId": "Integration.DeleteIntegrationService", "tags": [ "Integration" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "serviceId", "description": "The ID of integration.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": {}, "required": [], "description": "Data of the services." } }, "required": [ "data" ] }, "example": { "data": { "deleted": true } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "Get Integration Service", "description": "Get Integration Service", "operationId": "Integration.GetIntegrationService", "tags": [ "Integration" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "serviceId", "description": "The ID of integration.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "organizationId": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "type": { "type": "string" }, "config": { "type": "object", "properties": { "host": { "type": "string" }, "apiKey": { "type": "string" }, "authorization": { "type": "string" } }, "required": [ "host", "apiKey", "authorization" ] }, "createdBy": { "type": "string" }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" }, "updatedBy": { "type": "string" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "id", "organizationId", "name", "description", "type", "config", "createdBy", "createdAtDateString", "createdAt", "updatedBy", "updatedAtDateString", "updatedAt" ], "description": "Data of the integration service." } }, "required": [ "data" ] }, "example": { "data": { "id": "is-integrationServiceId", "organizationId": "o-organizationId", "name": "LNS-Service", "description": "LNS-Service-Description", "type": "InfodeckLNS", "config": { "host": "lns-hosto:8080", "apiKey": "eyJ0exxxxxxxxxx4", "authorization": "eyJhbxxxxxxxxxxg" }, "createdBy": "d6b0e137-xxxx-xxxx-xxxx-c944cc12a5f4", "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000, "updatedBy": "d6b0e137-xxxx-xxxx-xxxx-c944cc12a5f4", "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1706659200000 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "put": { "summary": "Update Integration Service", "description": "Update Integration Service", "operationId": "Integration.UpdateIntegrationService", "tags": [ "Integration" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "serviceId", "description": "The ID of integration.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of integration." }, "description": { "type": "string", "description": "The description of integration." }, "config": { "type": "object", "properties": {}, "required": [], "description": "The configuration of integration." } }, "required": [ "name" ] }, "example": { "name": "IDT-Service", "description": "IDT-Servcie-Description", "config": { "apiKey": "eyJ0xxxxxxxxxx4", "host": "abc-edf-ghi.infodeck.io" } }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "organizationId": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "type": { "type": "string" }, "config": { "type": "object", "properties": { "host": { "type": "string" }, "apiKey": { "type": "string" }, "authorization": { "type": "string" } }, "required": [ "host", "apiKey", "authorization" ] }, "updatedBy": { "type": "string" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "id", "organizationId", "name", "description", "type", "config", "updatedBy", "updatedAtDateString", "updatedAt" ], "description": "Data of the updated integration service." } }, "required": [ "data" ] }, "example": { "data": { "id": "is-integrationServiceId", "organizationId": "o-organizationId", "name": "LNS-Service", "description": "LNS-Service-Description", "type": "InfodeckLNS", "config": { "host": "lns-hosto:8080", "apiKey": "eyJ0exxxxxxxxxx4", "authorization": "eyJhbxxxxxxxxxxg" }, "updatedBy": "d6b0e137-xxxx-xxxx-xxxx-c944cc12a5f4", "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1706659200000 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/integrations/actility": { "post": { "summary": "Forward Actility Hook", "description": "Forward Actility Hook", "operationId": "Integration.ForwardActilityHook", "tags": [ "Integration" ], "parameters": [ { "name": "organizationId", "description": "", "in": "path", "required": false, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "cmd": { "type": "string", "description": "The cmd of IoT device." }, "seqno": { "type": "string", "description": "The sequence number of uplink message." }, "EUI": { "type": "string", "description": "The EUI of IoT device." }, "ts": { "type": "string", "description": "The timestamp of uplink message." }, "fcnt": { "type": "string", "description": "The frame counter of uplink message." }, "port": { "type": "string", "description": "The port of uplink message." }, "freq": { "type": "string", "description": "The frequency of uplink message." }, "toa": { "type": "string", "description": "The time on air of uplink message." }, "dr": { "type": "string", "description": "The data rate of uplink message." }, "ack": { "type": "boolean", "description": "The ACK bit of uplink message." }, "gws": { "type": "array", "items": { "type": "object", "properties": { "gweui": { "type": "string" }, "rssi": { "type": "number" }, "snr": { "type": "number" }, "ant": { "type": "number" }, "lat": { "type": "number" }, "lon": { "type": "number" }, "time": { "type": "string" } }, "required": [ "gweui", "rssi", "snr", "ant", "lat", "lon", "time" ] }, "description": "The gateways that received the uplink message." }, "bat": { "type": "string", "description": "The battery level of the IoT device." }, "data": { "type": "string", "description": "The payload of the uplink message." } }, "required": [ "cmd", "seqno", "EUI", "ts", "fcnt", "port", "freq", "toa", "dr", "ack", "gws", "bat", "data" ] }, "example": { "DevEUI_uplink": { "-xmlns": "http://uri.actility.com/lora", "Time": "2015-07-09T16:06:38.49+02:00", "DevEUI": "000000000F1D8693", "FPort": "2", "FCntUp": "7011", "ADRbit": "1", "ACKbit": "1", "MType": "4", "FCntDn": "11", "payload_hex": "0027bd00", "mic_hex": "38e7a3b9", "Lrcid": "00000065", "LrrRSSI": "-60.000000", "LrrSNR": "9.750000", "SpFact": "7", "SubBand": "G1", "Channel": "LC2", "DevLrrCnt": "2", "Lrrid": "08040059", "Late": "0", "LrrLAT": "48.874931", "LrrLON": "2.333673", "Lrrs": { "Lrr": [ { "Lrrid": "08040059", "LrrRSSI": "-60.000000", "LrrSNR": "9.750000", "LrrESP": "-59.000000" }, { "Lrrid": "33d13a41", "LrrRSSI": "-73.000000", "LrrSNR": "9.750000", "LrrESP": "-72.000000" } ] }, "CustomerID": "100000507", "CustomerData": { "loc": { "lat": "43.58081", "lon": "1.4421667" }, "alr": { "pro": "STL", "ver": "1" } }, "InstantPER": "0.02", "MeanPER": "0.02", "DevAddr": "0405F519", "UplinkDC": "0.001", "UplinkDCSubBand": "0.009" } }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "forwarded": { "type": "boolean", "description": "forwarded successfully." } }, "required": [ "forwarded" ] }, "example": { "forwarded": true }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/integrations/chirpstack-v4": { "post": { "summary": "Forward ChirpstackV4 Hook", "description": "Forward ChirpstackV4 Hook", "operationId": "Integration.ForwardChirpstackV4Hook", "tags": [ "Integration" ], "parameters": [ { "name": "organizationId", "description": "", "in": "path", "required": false, "schema": { "type": "string" } }, { "name": "event", "description": "The event to forward.", "in": "query", "schema": { "type": "string", "enum": [ "up" ] }, "required": true } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "deduplicationId": { "type": "string", "description": "The ID used for deduplication." }, "time": { "type": "string", "description": "The time of the payload in ISO 8601 format." }, "deviceInfo": { "type": "object", "properties": { "tenantId": { "type": "string" }, "tenantName": { "type": "string" }, "applicationId": { "type": "string" }, "applicationName": { "type": "string" }, "deviceProfileId": { "type": "string" }, "deviceProfileName": { "type": "string" }, "deviceName": { "type": "string" }, "devEui": { "type": "string" }, "deviceClassEnabled": { "type": "string" }, "tags": { "type": "object", "properties": {}, "required": [] } }, "required": [ "tenantId", "tenantName", "applicationId", "applicationName", "deviceProfileId", "deviceProfileName", "deviceName", "devEui", "deviceClassEnabled", "tags" ], "description": "Information about the IoT device." }, "devAddr": { "type": "string", "description": "The device address." }, "adr": { "type": "boolean", "description": "Flag indicating if Adaptive Data Rate (ADR) is enabled." }, "dr": { "type": "number", "description": "The data rate used by the device." }, "fCnt": { "type": "number", "description": "The frame counter." }, "fPort": { "type": "number", "description": "The FPort number." }, "confirmed": { "type": "boolean", "description": "Flag indicating if the transmission was confirmed." }, "data": { "type": "string", "description": "The payload data." }, "rxInfo": { "description": "Information about the received packet." }, "rxInfo[]": { "type": "string", "description": ".crcStatus The status of the CRC check." }, "txInfo": { "type": "object", "properties": { "frequency": { "type": "number" }, "modulation": { "type": "object", "properties": { "lora": { "type": "object", "properties": { "bandwidth": { "type": "number" }, "spreadingFactor": { "type": "number" }, "codeRate": { "type": "string" } }, "required": [ "bandwidth", "spreadingFactor", "codeRate" ] } }, "required": [ "lora" ] } }, "required": [ "frequency", "modulation" ], "description": "Information about the transmitted packet." } }, "required": [ "deduplicationId", "time", "deviceInfo", "devAddr", "adr", "dr", "fCnt", "fPort", "confirmed", "data", "rxInfo", "rxInfo[]", "rxInfo[]", "rxInfo[]", "rxInfo[]", "rxInfo[]", "rxInfo[]", "rxInfo[]", "rxInfo[]", "rxInfo[]", "rxInfo[]", "txInfo" ] }, "example": { "deduplicationId": "0447f96f-xxxx-xxxx-xxxx-d886df897a41", "time": "2024-01-01T12:00:00.000+00:00", "deviceInfo": { "tenantId": "52f14cd4-xxxx-xxxx-xxxx-4025e1d49242", "tenantName": "ChirpStack", "applicationId": "8d757a70-xxxx-xxxx-xxxx-a178bc6edf12", "applicationName": "Development", "deviceProfileId": "78a84f5c-xxxx-xxxx-xxxx-1de32826eca9", "deviceProfileName": "NS330-SBC", "deviceName": "NS330-SBC", "devEui": "24e124535b312345", "deviceClassEnabled": "CLASS_C", "tags": {} }, "devAddr": "0036e085", "adr": true, "dr": 5, "fCnt": 113, "fPort": 85, "confirmed": true, "data": "/y4B", "rxInfo": [ { "gatewayId": "24e124fffef12345", "uplinkId": 534054989, "time": "2023-07-18T10:28:32.267788+00:00", "timeSinceGpsEpoch": "1373711330.267s", "rssi": -55, "snr": 13.5, "location": {}, "context": "j0J2SA==", "metadata": { "region_config_id": "as923", "region_common_name": "AS923" }, "crcStatus": "CRC_OK" } ], "txInfo": { "frequency": 923200000, "modulation": { "lora": { "bandwidth": 125000, "spreadingFactor": 7, "codeRate": "CR_4_5" } } } }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "forwarded": { "type": "boolean", "description": "forwarded successfully." } }, "required": [ "forwarded" ] }, "example": { "forwarded": true }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/integrations/http": { "post": { "summary": "Forward http Hook", "description": "Forward http Hook", "operationId": "Integration.ForwardHttpHook", "tags": [ "Integration" ], "parameters": [], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "assetId": { "type": "string", "description": "Information about the IoT device." }, "data": { "type": "object", "properties": {}, "required": [], "description": "The name of the tenant." } }, "required": [ "assetId", "data" ] }, "example": { "assetId": "12321441", "payload": {} }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "forwarded": { "type": "boolean", "description": "forwarded successfully." } }, "required": [ "forwarded" ] }, "example": { "forwarded": true }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/integrations/infodeck-lns": { "post": { "summary": "Forward InfodeckLNS Hook", "description": "Forward InfodeckLNS Hook", "operationId": "Integration.ForwardInfodeckLNSHook", "tags": [ "Integration" ], "parameters": [ { "name": "organizationId", "description": "", "in": "path", "required": false, "schema": { "type": "string" } }, { "name": "event", "description": "The event to forward.", "in": "query", "schema": { "type": "string", "enum": [ "up" ] }, "required": true } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "deduplicationId": { "type": "string", "description": "The ID used for deduplication." }, "time": { "type": "string", "description": "The time of the payload in ISO 8601 format." }, "deviceInfo": { "type": "object", "properties": { "tenantId": { "type": "string" }, "tenantName": { "type": "string" }, "applicationId": { "type": "string" }, "applicationName": { "type": "string" }, "deviceProfileId": { "type": "string" }, "deviceProfileName": { "type": "string" }, "deviceName": { "type": "string" }, "devEui": { "type": "string" }, "deviceClassEnabled": { "type": "string" }, "tags": { "type": "object", "properties": {}, "required": [] } }, "required": [ "tenantId", "tenantName", "applicationId", "applicationName", "deviceProfileId", "deviceProfileName", "deviceName", "devEui", "deviceClassEnabled", "tags" ], "description": "Information about the IoT device." }, "devAddr": { "type": "string", "description": "The device address." }, "adr": { "type": "boolean", "description": "Flag indicating if Adaptive Data Rate (ADR) is enabled." }, "dr": { "type": "number", "description": "The data rate used by the device." }, "fCnt": { "type": "number", "description": "The frame counter." }, "fPort": { "type": "number", "description": "The FPort number." }, "confirmed": { "type": "boolean", "description": "Flag indicating if the transmission was confirmed." }, "data": { "type": "string", "description": "The payload data." }, "rxInfo": { "description": "Information about the received packet." }, "rxInfo[]": { "type": "string", "description": ".crcStatus The status of the CRC check." }, "txInfo": { "type": "object", "properties": { "frequency": { "type": "number" }, "modulation": { "type": "object", "properties": { "lora": { "type": "object", "properties": { "bandwidth": { "type": "number" }, "spreadingFactor": { "type": "number" }, "codeRate": { "type": "string" } }, "required": [ "bandwidth", "spreadingFactor", "codeRate" ] } }, "required": [ "lora" ] } }, "required": [ "frequency", "modulation" ], "description": "Information about the transmitted packet." } }, "required": [ "deduplicationId", "time", "deviceInfo", "devAddr", "adr", "dr", "fCnt", "fPort", "confirmed", "data", "rxInfo", "rxInfo[]", "rxInfo[]", "rxInfo[]", "rxInfo[]", "rxInfo[]", "rxInfo[]", "rxInfo[]", "rxInfo[]", "rxInfo[]", "rxInfo[]", "txInfo" ] }, "example": { "deduplicationId": "0447f96f-xxxx-xxxx-xxxx-d886df897a41", "time": "2024-01-01T12:00:00.000+00:00", "deviceInfo": { "tenantId": "52f14cd4-xxxx-xxxx-xxxx-4025e1d49242", "tenantName": "InfodeckLNS", "applicationId": "8d757a70-xxxx-xxxx-xxxx-a178bc6edf12", "applicationName": "Development", "deviceProfileId": "78a84f5c-xxxx-xxxx-xxxx-1de32826eca9", "deviceProfileName": "NS330-SBC", "deviceName": "NS330-SBC", "devEui": "24e124535b312345", "deviceClassEnabled": "CLASS_C", "tags": {} }, "devAddr": "0036e085", "adr": true, "dr": 5, "fCnt": 113, "fPort": 85, "confirmed": true, "data": "/y4B", "rxInfo": [ { "gatewayId": "24e124fffef12345", "uplinkId": 534054989, "time": "2023-07-18T10:28:32.267788+00:00", "timeSinceGpsEpoch": "1373711330.267s", "rssi": -55, "snr": 13.5, "location": {}, "context": "j0J2SA==", "metadata": { "region_config_id": "as923", "region_common_name": "AS923" }, "crcStatus": "CRC_OK" } ], "txInfo": { "frequency": 923200000, "modulation": { "lora": { "bandwidth": 125000, "spreadingFactor": 7, "codeRate": "CR_4_5" } } } }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "forwarded": { "type": "boolean", "description": "forwarded successfully." } }, "required": [ "forwarded" ] }, "example": { "forwarded": true }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/integrations/loriot": { "post": { "summary": "Forward Loriot Hook", "description": "Forward Loriot Hook", "operationId": "Integration.ForwardLoriotHook", "tags": [ "Integration" ], "parameters": [ { "name": "organizationId", "description": "", "in": "path", "required": false, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "cmd": { "type": "string", "description": "The cmd of IoT device." }, "seqno": { "type": "string", "description": "The sequence number of uplink message." }, "EUI": { "type": "string", "description": "The EUI of IoT device." }, "ts": { "type": "string", "description": "The timestamp of uplink message." }, "fcnt": { "type": "string", "description": "The frame counter of uplink message." }, "port": { "type": "string", "description": "The port of uplink message." }, "freq": { "type": "string", "description": "The frequency of uplink message." }, "toa": { "type": "string", "description": "The time on air of uplink message." }, "dr": { "type": "string", "description": "The data rate of uplink message." }, "ack": { "type": "boolean", "description": "The ACK bit of uplink message." }, "gws": { "type": "array", "items": { "type": "object", "properties": { "gweui": { "type": "string" }, "rssi": { "type": "number" }, "snr": { "type": "number" }, "ant": { "type": "number" }, "lat": { "type": "number" }, "lon": { "type": "number" }, "time": { "type": "string" } }, "required": [ "gweui", "rssi", "snr", "ant", "lat", "lon", "time" ] }, "description": "The gateways that received the uplink message." }, "bat": { "type": "string", "description": "The battery level of the IoT device." }, "data": { "type": "string", "description": "The payload of the uplink message." } }, "required": [ "cmd", "seqno", "EUI", "ts", "fcnt", "port", "freq", "toa", "dr", "ack", "gws", "bat", "data" ] }, "example": { "cmd": "gw", "seqno": 4, "EUI": "24E124141B267890", "ts": 1688114678797, "fcnt": 4, "port": 85, "freq": 923800000, "toa": 371, "dr": "SF10 BW125 4/5", "ack": false, "gws": [ { "rssi": -87, "snr": 12.2, "ts": 1688114678797, "time": "2023-06-30T08:44:38.797Z", "gweui": "24E124FFFFF12345", "ant": 0, "lat": 25.0520483, "lon": 121.5462282 } ], "bat": 2, "data": "017501030001040001" }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "forwarded": { "type": "boolean", "description": "forwarded successfully." } }, "required": [ "forwarded" ] }, "example": { "forwarded": true }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/integrations/the-things-network": { "post": { "summary": "Forward Ttn Hook", "description": "Forward Ttn Hook", "operationId": "Integration.ForwardTtnHook", "tags": [ "Integration" ], "parameters": [ { "name": "organizationId", "description": "", "in": "path", "required": false, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "forwarded": { "type": "boolean", "description": "forwarded successfully." } }, "required": [ "forwarded" ] }, "example": { "forwarded": true }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/integrations/{serviceId}/devices/{deviceId}": { "get": { "summary": "Get Integration device", "description": "Get Integration Device", "operationId": "Integration.GetIntegrationDevice", "tags": [ "Integration" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "integrationServiceId", "description": "The ID of integration.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "deviceId", "description": "The ID of integration device.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "devEui": { "type": "string" }, "organizationId": { "type": "string" }, "integrationServiceId": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "assetTypeId": { "type": "string" }, "locationId": { "type": "string" }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "id", "devEui", "organizationId", "integrationServiceId", "name", "description", "assetTypeId", "locationId", "createdAtDateString", "createdAt", "updatedAtDateString", "updatedAt" ], "description": "Data of the service devices." } }, "required": [ "data" ] }, "example": { "data": { "id": "a-devEui", "devEui": "24e124535b312345", "organizationId": "o-organizationId", "integrationServiceId": "is-integrationServiceId", "name": "IDT-Bot-device", "description": "IDT-Bot-device", "assetTypeId": "at-assetTypeId", "locationId": "l-locationId", "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1700000000000, "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1710000000000 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "delete": { "summary": "Unlink Integration Device", "description": "Unlink Integration Device", "operationId": "Integration.UnlinkIntegrationDevice", "tags": [ "Integration" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "integrationServiceId", "description": "The ID of integration.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "deviceId", "description": "The ID of integration device.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": {}, "required": [], "description": "Data of the service devices." } }, "required": [ "data" ] }, "example": { "data": { "unlinked": true } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "put": { "summary": "Update Integration Device", "description": "Update Integration Device", "operationId": "Integration.UpdateIntegrationDevice", "tags": [ "Integration" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "integrationServiceId", "description": "The ID of integration.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "deviceId", "description": "The ID of integration device.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "devEui": { "type": "string", "description": "The devEui of integration device." }, "name": { "type": "string", "description": "The name of integration device." }, "description": { "type": "string", "description": "The description of integration." }, "attributes": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] }, "description": "The custom attributes of device" } }, "required": [ "devEui", "name" ] }, "example": { "devEui": "24e124535b312345", "name": "IDT-BoT", "description": "IDT-BoT-Description", "attributes": [ "Test-A", "Test-B", "Test-C" ] }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "organizationId": { "type": "string" }, "integrationServiceId": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "devEui": { "type": "string" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "id", "organizationId", "integrationServiceId", "name", "description", "devEui", "updatedAtDateString", "updatedAt" ], "description": "Data of the updated service device." } }, "required": [ "data" ] }, "example": { "data": { "id": "a-24e124535b312345", "organizationId": "o-organizationId", "integrationServiceId": "is-integrationServiceId", "name": "IDT-Bot", "description": "IDT-Bot-Description", "devEui": "24e124535b312345", "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1706659200000 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/integrations/{serviceId}/devices": { "post": { "summary": "Link Integration Device", "description": "Link Integration Device", "operationId": "Integration.LinkIntegrationDevice", "tags": [ "Integration" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "integrationServiceId", "description": "The ID of integration.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "uuid": { "type": "string", "description": "The devEui of integration device." }, "name": { "type": "string", "description": "The name of integration device." }, "description": { "type": "string", "description": "The description of device." }, "assetTypeId": { "type": "string", "description": "The ID of asset type." }, "locationId": { "type": "string", "description": "The ID of location." }, "attributes": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] }, "description": "The custom attributes of device." } }, "required": [ "uuid", "name", "assetTypeId", "locationId", "attributes" ] }, "example": { "uuid": "24e124535b312345", "name": "IDT-Bot", "description": "IDT-Bot-Description", "assetTypeId": "at-assetTypeId", "locationId": "l-locationId", "attributes": [ "Test-A", "Test-B", "Test-C" ] }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "organizationId": { "type": "string" }, "integrationServiceId": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "devEui": { "type": "string" }, "assetTypeId": { "type": "string" }, "locationId": { "type": "string" }, "location": { "type": "object", "properties": { "id": { "type": "string" }, "organizationId": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "address": { "type": "string" }, "chatRoomId": { "type": "string" }, "entities": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] } } }, "required": [ "id", "organizationId", "name", "description", "address", "chatRoomId", "entities" ] }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" } }, "required": [ "id", "organizationId", "integrationServiceId", "name", "description", "devEui", "assetTypeId", "locationId", "location", "createdAtDateString", "createdAt" ], "description": "Data of the linked service device." } }, "required": [ "data" ] }, "example": { "data": { "id": "a-24e124535b312345", "organizationId": "o-organizationId", "integrationServiceId": "is-integrationServiceId", "name": "IDT-Bot", "description": "IDT-Bot-Description", "devEui": "24e124535b312345", "assetTypeId": "at-assetTypeId", "locationId": "l-locationId", "location": { "id": "l-locationId", "organizationId": "o-organizationId", "name": "office", "description": "location-description", "address": "address", "chatRoomId": "ABCDE", "entities": [] }, "createdAtDateString": "2024-01-01T00:00:00.000Z", "created": 1700000000000 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "List Integration devices", "description": "List Integration Devices", "operationId": "Integration.ListIntegrationDevices", "tags": [ "Integration" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "integrationServiceId", "description": "The ID of integration service.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "maxResults", "description": "The maximum number of results to return.", "in": "query", "schema": { "type": "number", "minimum": 10, "maximum": 25 }, "required": false }, { "name": "nextToken", "description": "To retrieve the next set of results.", "in": "query", "schema": { "type": "string" }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "organizationId": { "type": "string" }, "integrationServiceId": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "devEui": { "type": "string" }, "assetTypeId": { "type": "string" }, "locationId": { "type": "string" }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "id", "organizationId", "integrationServiceId", "name", "description", "devEui", "assetTypeId", "locationId", "createdAtDateString", "createdAt", "updatedAtDateString", "updatedAt" ] }, "description": "Array of data for the service devices." } }, "required": [ "data" ] }, "example": { "data": [ { "id": "a-24e124535b312345", "organizationId": "o-organizationId", "integrationServiceId": "is-integrationServiceId", "name": "IDT-Bot", "description": "IDT-Bot-Description", "devEui": "24e124535b312345", "assetTypeId": "at-assetTypeId", "locationId": "l-locationId", "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000, "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1706659200000 } ] }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/lns/tenants/{tenantId}/applications": { "post": { "summary": "Create Application", "description": "Create application", "operationId": "LNS_Application.CreateApplication", "tags": [ "LNS Application" ], "parameters": [ { "name": "tenantId", "description": "The ID of tenant.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of application." }, "description": { "type": "string", "description": "The description of application." } }, "required": [ "name" ] }, "example": {}, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "tenantId": { "type": "string" }, "id": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" } }, "required": [ "tenantId", "id", "name", "description" ], "description": "Data of the application." } }, "required": [ "data" ] }, "example": { "data": { "tenantId": "b004ebe0-xxxx-xxxx-xxxx-dacd251b6f00", "id": "9e9a7f54-xxxx-xxxx-xxxx-a9d6f80c8ba6", "name": "IDT-Application", "description": "IDT-Application-Description" } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "List Applications", "description": "List applications", "operationId": "LNS_Application.ListApplications", "tags": [ "LNS Application" ], "parameters": [ { "name": "tenantId", "description": "The ID of tenant.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "offset", "description": "The offset of application.", "in": "query", "schema": { "type": "number", "minimum": 0, "default": 0 }, "required": false }, { "name": "limit", "description": "The limit of application.", "in": "query", "schema": { "type": "number", "minimum": 1, "maximum": 100, "default": 20 }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "createdAt": { "type": "number" }, "updatedAt": { "type": "number" } }, "required": [ "id", "name", "description", "createdAt", "updatedAt" ] }, "description": "Data of the application." } }, "required": [ "data" ] }, "example": { "data": [ { "tenantId": "b004ebe0-xxxx-xxxx-xxxx-dacd251b6f00", "id": "9e9a7f54-xxxx-xxxx-xxxx-a9d6f80c8ba6", "name": "IDT-Application", "description": "IDT-Application-Description", "createdAt": "2024-01-01T00:00:00.000Z", "updatedAt": null } ] }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/lns/tenants/{tenantId}/applications/{applicationId}": { "delete": { "summary": "Delete Application", "description": "Delete application", "operationId": "LNS_Application.DeleteApplication", "tags": [ "LNS Application" ], "parameters": [ { "name": "tenantId", "description": "The ID of tenant.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "applicationId", "description": "The ID of application.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": {}, "required": [], "description": "Empty object" } }, "required": [ "data" ] }, "example": { "data": { "deleted": true } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "Get Application", "description": "Get application", "operationId": "LNS_Application.GetApplication", "tags": [ "LNS Application" ], "parameters": [ { "name": "tenantId", "description": "The ID of tenant.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "applicationId", "description": "The ID of application.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "tenantId": { "type": "string" }, "id": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "createdAt": { "type": "number" }, "updatedAt": { "type": "number" } }, "required": [ "tenantId", "id", "name", "description", "createdAt", "updatedAt" ], "description": "Data of the application." } }, "required": [ "data" ] }, "example": { "data": { "tenantId": "b004ebe0-xxxx-xxxx-xxxx-dacd251b6f00", "id": "9e9a7f54-xxxx-xxxx-xxxx-a9d6f80c8ba6", "name": "IDT-Application", "description": "IDT-Application-Description", "createdAt": "2024-01-01T00:00:00.000Z", "updatedAt": null } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "put": { "summary": "Update Application", "description": "Update application", "operationId": "LNS_Application.UpdateApplication", "tags": [ "LNS Application" ], "parameters": [ { "name": "tenantId", "description": "The ID of tenant.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "applicationId", "description": "The ID of application.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of application." }, "description": { "type": "string", "description": "The description of application." } }, "required": [ "name" ] }, "example": { "name": "IDT-Application", "description": "IDT-Application-Description" }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "tenantId": { "type": "string" }, "id": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" } }, "required": [ "tenantId", "id", "name", "description" ], "description": "Data of the application." } }, "required": [ "data" ] }, "example": { "data": { "tenantId": "b004ebe0-xxxx-xxxx-xxxx-dacd251b6f00", "id": "9e9a7f54-xxxx-xxxx-xxxx-a9d6f80c8ba6", "name": "IDT-Application", "description": "IDT-Application-Description" } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/lns/tenants/{tenantId}/applications/{applicationId}/integration": { "get": { "summary": "Get Http Integration", "description": "Get http integration", "operationId": "LNS_Application.GetHttpIntegration", "tags": [ "LNS Application" ], "parameters": [ { "name": "tenantId", "description": "The ID of tenant.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "applicationId", "description": "The ID of application.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "tenantId": { "type": "string" }, "id": { "type": "string" }, "headersMap": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] } }, "encoding": { "type": "number" }, "eventEndpointUrl": { "type": "string" } }, "required": [ "tenantId", "id", "headersMap", "encoding", "eventEndpointUrl" ], "description": "Data of the application." } }, "required": [ "data" ] }, "example": { "data": { "tenantId": "b004ebe0-xxxx-xxxx-xxxx-dacd251b6f00", "id": "9e9a7f54-xxxx-xxxx-xxxx-a9d6f80c8ba6", "headersMap": [ { "key": "Authorization", "value": "eyJhbxxxxxxxxxxU" } ], "encoding": 0, "eventEndpointUrl": "https://app.infodeck.io/api/integrations/infodeck-lns" } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/lns/tenants/{tenantId}/applications/{applicationId}/devices": { "post": { "summary": "Create Device", "description": "Create device", "operationId": "LNS_Device.CreateDevice", "tags": [ "LNS Device" ], "parameters": [ { "name": "tenantId", "description": "The ID of tenant.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "applicationId", "description": "The ID of application.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of device." }, "description": { "type": "string", "description": "The description of device." }, "devEui": { "type": "string", "description": "The ID of device." }, "joinEui": { "type": "string", "description": "The ID of joinEui." }, "deviceProfileId": { "type": "string", "description": "The ID of deviceProfile." }, "isDisabled": { "type": "boolean", "description": "The isDisabled of device." }, "skipFcntCheck": { "type": "boolean", "description": "The skipFcntCheck of device." }, "tagsMap": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] }, "description": "The tagsMsp of device." }, "variablesMap": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] }, "description": "The variablesMap of device." } }, "required": [ "name", "devEui", "deviceProfileId" ] }, "example": { "name": "IDT-Device", "description": "IDT-Device-Description", "devEui": "24e124535b312345", "joinEui": "24e124c0002abcde", "deviceProfileId": "f1b1f383-xxxx-xxxx-xxxx-b656250d225b", "isDisabled": false, "skipFcntCheck": false, "tagsMap": [ { "key": "Rooftop", "value": "Weather monitoring" } ], "variablesMap": [ { "key": "version", "value": "1.0.2" } ] }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "tenantId": { "type": "string" }, "applicationId": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "devEui": { "type": "string" }, "joinEui": { "type": "string" }, "deviceProfileId": { "type": "string" }, "isDisabled": { "type": "boolean" }, "skipFcntCheck": { "type": "boolean" }, "tagsMap": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] } }, "variablesMap": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] } } }, "required": [ "tenantId", "applicationId", "name", "description", "devEui", "joinEui", "deviceProfileId", "isDisabled", "skipFcntCheck", "tagsMap", "variablesMap" ], "description": "Data of the device." } }, "required": [ "data" ] }, "example": { "data": { "tenantId": "b004ebe0-xxxx-xxxx-xxxx-dacd251b6f00", "applicationId": "9e9a7f54-xxxx-xxxx-xxxx-a9d6f80c8ba6", "name": "IDT-Device", "description": "IDT-Device-Description", "devEui": "24e124535b312345", "joinEui": "24e124c0002abcde", "deviceProfileId": "f1b1f383-xxxx-xxxx-xxxx-b656250d225b", "isDisabled": false, "skipFcntCheck": false, "tagsMap": [ { "key": "Rooftop", "value": "Weather monitoring" } ], "variablesMap": [ { "key": "version", "value": "1.0.2" } ] } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "List Devices", "description": "List devices", "operationId": "LNS_Device.ListDevices", "tags": [ "LNS Device" ], "parameters": [ { "name": "tenantId", "description": "The ID of tenant.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "applicationId", "description": "The ID of application.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "offset", "description": "The offset of device.", "in": "query", "schema": { "type": "number", "minimum": 0, "default": 0 }, "required": false }, { "name": "limit", "description": "The limit of device.", "in": "query", "schema": { "type": "number", "minimum": 1, "maximum": 100, "default": 20 }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "description": { "type": "string" }, "devEui": { "type": "string" }, "deviceProfileId": { "type": "string" }, "deviceProfileName": { "type": "string" }, "deviceStatus": { "type": "object", "properties": {}, "required": [] }, "lastSeenAt": { "type": "number" }, "createdAt": { "type": "number" }, "updatedAt": { "type": "number" } }, "required": [ "name", "description", "devEui", "deviceProfileId", "deviceProfileName", "deviceStatus", "lastSeenAt", "createdAt", "updatedAt" ] }, "description": "Data of the device." }, "totalCount": { "type": "number", "description": "Total count of device." } }, "required": [ "data", "totalCount" ] }, "example": { "data": [ { "tenantId": "b004ebe0-xxxx-xxxx-xxxx-dacd251b6f00", "applicationId": "9e9a7f54-xxxx-xxxx-xxxx-a9d6f80c8ba6", "name": "IDT-Device", "description": "IDT-Device-Description", "devEui": "24e124535b312345", "joinEui": "24e124c0002abcde", "deviceProfileId": "f1b1f383-xxxx-xxxx-xxxx-b656250d225b", "isDisabled": false, "skipFcntCheck": false, "tagsMap": [ { "key": "Rooftop", "value": "Weather monitoring" } ], "variablesMap": [ { "key": "version", "value": "1.0.2" } ] } ], "totalCount": 0 }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/lns/tenants/{tenantId}/applications/{applicationId}/devices/deviceId/activations": { "post": { "summary": "Create Device Activation", "description": "Create device activation", "operationId": "LNS_Device.CreateDeviceActivation", "tags": [ "LNS Device" ], "parameters": [ { "name": "tenantId", "description": "The ID of tenant.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "applicationId", "description": "The ID of application.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "devEui": { "type": "string", "description": "The ID of device." }, "devAddr": { "type": "string", "description": "The devAddr of device activation." }, "appSKey": { "type": "string", "description": "The appSKey of device activation." }, "nwkSEncKey": { "type": "string", "description": "The nwkSEncKey of device activation." }, "sNwkSIntKey": { "type": "string", "description": "The sNwkSIntKey of device activation." }, "fNwkSIntKey": { "type": "string", "description": "The fNwkSIntKey of device activation." }, "fCntUp": { "type": "number", "description": "The fCntUp of device activation." }, "nFCntDown": { "type": "number", "description": "The nFCntDown of device activation." }, "aFCntDown": { "type": "number", "description": "The aFCntDown of device activation." } }, "required": [ "devEui" ] }, "example": { "devEui": "24e124535b318262", "devAddr": "0036e085", "appSKey": "98b81xxxxxxxxxxe", "nwkSEncKey": "be8dexxxxxxxxxxe", "sNwkSIntKey": "be8dexxxxxxxxxxe", "fNwkSIntKey": "be8dexxxxxxxxxxe", "fCntUp": 0, "nFCntDown": 0, "aFCntDown": 0 }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": {}, "required": [], "description": "Data of the device activation." } }, "required": [ "data" ] }, "example": { "data": { "created": true } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "delete": { "summary": "Delete Device Activation", "description": "Delete device activation", "operationId": "LNS_Device.DeleteDeviceActivation", "tags": [ "LNS Device" ], "parameters": [ { "name": "tenantId", "description": "The ID of tenant.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "applicationId", "description": "The ID of application.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": {}, "required": [], "description": "Data of the device activation." } }, "required": [ "data" ] }, "example": { "data": { "deleted": true } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "Get Device Activation", "description": "Get device activation", "operationId": "LNS_Device.GetDeviceActivation", "tags": [ "LNS Device" ], "parameters": [ { "name": "tenantId", "description": "The ID of tenant.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "applicationId", "description": "The ID of application.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "applicationId": { "type": "string" }, "devEui": { "type": "string" }, "devAddr": { "type": "string" }, "appSKey": { "type": "string" }, "nwkSEncKey": { "type": "string" }, "sNwkSIntKey": { "type": "string" }, "fNwkSIntKey": { "type": "string" }, "fCntUp": { "type": "number" }, "nFCntDown": { "type": "number" }, "aFCntDown": { "type": "number" } }, "required": [ "applicationId", "devEui", "devAddr", "appSKey", "nwkSEncKey", "sNwkSIntKey", "fNwkSIntKey", "fCntUp", "nFCntDown", "aFCntDown" ], "description": "Data of the device." } }, "required": [ "data" ] }, "example": { "data": { "devEui": "24e124535b318262", "devAddr": "0036e085", "appSKey": "98b81xxxxxxxxxx", "nwkSEncKey": "be8dexxxxxxxxxxe", "sNwkSIntKey": "be8dexxxxxxxxxxe", "fNwkSIntKey": "be8dexxxxxxxxxxe", "fCntUp": 0, "nFCntDown": 0, "aFCntDown": 0 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/lns/tenants/{tenantId}/applications/{applicationId}/devices/{deviceId}": { "delete": { "summary": "Delete Device", "description": "Delete device", "operationId": "LNS_Device.DeleteDevice", "tags": [ "LNS Device" ], "parameters": [ { "name": "tenantId", "description": "The ID of tenant.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "applicationId", "description": "The ID of application.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": {}, "required": [], "description": "Empty object" } }, "required": [ "data" ] }, "example": { "data": { "deleted": true } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "put": { "summary": "Update Device", "description": "Update device", "operationId": "LNS_Device.UpdateDevice", "tags": [ "LNS Device" ], "parameters": [ { "name": "tenantId", "description": "The ID of tenant.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "applicationId", "description": "The ID of application.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of device." }, "description": { "type": "string", "description": "The description of device." }, "devEui": { "type": "string", "description": "The ID of device." }, "joinEui": { "type": "string", "description": "The ID of joinEui." }, "deviceProfileId": { "type": "string", "description": "The ID of deviceProfile." }, "isDisabled": { "type": "boolean", "description": "The isDisabled of device." }, "skipFcntCheck": { "type": "boolean", "description": "The skipFcntCheck of device." }, "tagsMap": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] }, "description": "The tagsMsp of device." }, "variablesMap": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] }, "description": "The variablesMap of device." } }, "required": [ "name", "devEui", "deviceProfileId" ] }, "example": { "name": "IDT-Device", "description": "IDT-Device-Description", "devEui": "24e124535b312345", "joinEui": "24e124c0002abcde", "deviceProfileId": "f1b1f383-xxxx-xxxx-xxxx-b656250d225b", "isDisabled": false, "skipFcntCheck": false, "tagsMap": [ { "key": "Rooftop", "value": "Weather monitoring" } ], "variablesMap": [ { "key": "version", "value": "1.0.2" } ] }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "applicationId": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "devEui": { "type": "string" }, "joinEui": { "type": "string" }, "deviceProfileId": { "type": "string" }, "isDisabled": { "type": "boolean" }, "skipFcntCheck": { "type": "boolean" }, "tagsMap": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] } }, "variablesMap": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] } } }, "required": [ "applicationId", "name", "description", "devEui", "joinEui", "deviceProfileId", "isDisabled", "skipFcntCheck", "tagsMap", "variablesMap" ], "description": "Data of the device." } }, "required": [ "data" ] }, "example": { "data": { "applicationId": "9e9a7f54-xxxx-xxxx-xxxx-a9d6f80c8ba6", "name": "IDT-Device", "description": "IDT-Device-Description", "devEui": "24e124535b312345", "joinEui": "24e124c0002abcde", "deviceProfileId": "f1b1f383-xxxx-xxxx-xxxx-b656250d225b", "isDisabled": false, "skipFcntCheck": false, "tagsMap": [ { "key": "Rooftop", "value": "Weather monitoring" } ], "variablesMap": [ { "key": "version", "value": "1.0.2" } ] } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/lns/tenants/{tenantId}/applications/{applicationId}/devices/deviceId/queues": { "post": { "summary": "Enqueue Device Queue Item", "description": "Enqueue device queue item", "operationId": "LNS_Device.EnqueueDeviceQueueItem", "tags": [ "LNS Device" ], "parameters": [ { "name": "tenantId", "description": "The ID of tenant.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "applicationId", "description": "The ID of application.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "deviceId", "description": "The ID of device.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "The ID of device queue." }, "confirmed": { "type": "boolean", "description": "The confirmed of device queue." }, "fPort": { "type": "number", "description": "The fPort of device queue." }, "fCntDown": { "type": "number", "description": "The fCntDown of device queue." }, "data": { "type": "string", "description": "The data of device queue." }, "object": { "type": "object", "properties": {}, "required": [], "description": "The object of device queue." }, "isPending": { "type": "boolean", "description": "The isPending of device queue." } }, "required": [] }, "example": { "id": "e61d84ba-xxxx-xxxx-xxxx-776da69aaa13", "devEui": "24e124535b312345", "confirmed": false, "isPending": false, "object": { "codec": "exampleCodec" }, "fCntDown": 0, "fPort": 85 }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "applicationId": { "type": "string" }, "devEui": { "type": "string" }, "id": { "type": "string" }, "confirmed": { "type": "boolean" }, "fPort": { "type": "number" }, "data": { "type": "string" }, "isPending": { "type": "boolean" }, "fCntDown": { "type": "number" } }, "required": [ "applicationId", "devEui", "id", "confirmed", "fPort", "data", "isPending", "fCntDown" ] }, "description": "Data of the device queue." } }, "required": [ "data" ] }, "example": { "data": { "devEui": "24e124535b312345", "id": "e61d84ba-xxxx-xxxx-xxxx-776da69aaa13", "confirmed": false, "isPending": false, "fCntDown": 0, "fPort": 1 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "Get Device Queue Items", "description": "Get device queue items", "operationId": "LNS_Device.GetDeviceQueueItems", "tags": [ "LNS Device" ], "parameters": [ { "name": "tenantId", "description": "The ID of tenant.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "applicationId", "description": "The ID of application.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "deviceId", "description": "The ID of device.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "countOnly", "description": "The countOnly of device.", "in": "query", "schema": { "type": "string", "enum": [ "true", "false" ], "default": "false" }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "applicationId": { "type": "string" }, "devEui": { "type": "string" }, "id": { "type": "string" }, "confirmed": { "type": "boolean" }, "fPort": { "type": "number" }, "data": { "type": "string" }, "isPending": { "type": "boolean" }, "fCntDown": { "type": "number" } }, "required": [ "applicationId", "devEui", "id", "confirmed", "fPort", "data", "isPending", "fCntDown" ] }, "description": "Data of the device queue." } }, "required": [ "data" ] }, "example": { "data": { "id": "e61d84ba-xxxx-xxxx-xxxx-776da69aaa13", "devEui": "24e124535b312345", "confirmed": false, "isPending": false, "object": { "codec": "exampleCodec" }, "fCntDown": 0, "fPort": 85 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/lns/tenants/{tenantId}/applications/{applicationId}/devices/{deviceId}/nonces": { "delete": { "summary": "Flush Device Nonces", "description": "Flush device nonces", "operationId": "LNS_Device.FlushDeviceNonces", "tags": [ "LNS Device" ], "parameters": [ { "name": "tenantId", "description": "The ID of tenant.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "applicationId", "description": "The ID of application.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": {}, "required": [], "description": "Empty object" } }, "required": [ "data" ] }, "example": { "data": { "deleted": true } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/lns/tenants/{tenantId}/applications/{applicationId}/devices/{deviceId}/queues": { "delete": { "summary": "Flush Device queues", "description": "Flush device queues", "operationId": "LNS_Device.FlushDeviceQueues", "tags": [ "LNS Device" ], "parameters": [ { "name": "tenantId", "description": "The ID of tenant.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "applicationId", "description": "The ID of application.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": {}, "required": [], "description": "Empty object" } }, "required": [ "data" ] }, "example": { "data": { "deleted": true } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/lns/tenants/{tenantId}/applications/{applicationId}/devices/deviceId": { "get": { "summary": "Get Device", "description": "Get device", "operationId": "LNS_Device.GetDevice", "tags": [ "LNS Device" ], "parameters": [ { "name": "tenantId", "description": "The ID of tenant.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "applicationId", "description": "The ID of application.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "devEui", "description": "The ID of device.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "applicationId": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "devEui": { "type": "string" }, "joinEui": { "type": "string" }, "deviceProfileId": { "type": "string" }, "isDisabled": { "type": "boolean" }, "skipFcntCheck": { "type": "boolean" }, "deviceStatus": { "type": "object", "properties": {}, "required": [] }, "lastSeenAt": { "type": "number" }, "tagsMap": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] } }, "variablesMap": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] } }, "createdAt": { "type": "number" }, "updatedAt": { "type": "number" } }, "required": [ "applicationId", "name", "description", "devEui", "joinEui", "deviceProfileId", "isDisabled", "skipFcntCheck", "deviceStatus", "lastSeenAt", "tagsMap", "variablesMap", "createdAt", "updatedAt" ], "description": "Data of the device." } }, "required": [ "data" ] }, "example": { "data": { "tenantId": "b004ebe0-xxxx-xxxx-xxxx-dacd251b6f00", "applicationId": "9e9a7f54-xxxx-xxxx-xxxx-a9d6f80c8ba6", "name": "IDT-Device", "description": "IDT-Device-Description", "devEui": "24e124535b312345", "joinEui": "24e124c0002abcde", "deviceProfileId": "f1b1f383-xxxx-xxxx-xxxx-b656250d225b", "isDisabled": false, "skipFcntCheck": false, "tagsMap": [ { "key": "Rooftop", "value": "Weather monitoring" } ], "variablesMap": [ { "key": "version", "value": "1.0.2" } ] } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/lns/tenants/{tenantId}/applications/{applicationId}/devices/{deviceId}/keys": { "get": { "summary": "Get Device Keys", "description": "Get device keys", "operationId": "LNS_Device.GetDeviceKeys", "tags": [ "LNS Device" ], "parameters": [ { "name": "tenantId", "description": "The ID of tenant.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "applicationId", "description": "The ID of application.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "appkey": { "type": "string" } }, "required": [ "appkey" ], "description": "Data of the device." } }, "required": [ "data" ] }, "example": { "data": { "appKey": "55724xxxxxxxxxx3" } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "put": { "summary": "Update Device Keys", "description": "Update device keys", "operationId": "LNS_Device.UpdateDeviceKeys", "tags": [ "LNS Device" ], "parameters": [ { "name": "tenantId", "description": "The ID of tenant.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "applicationId", "description": "The ID of application.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "appKey": { "type": "string", "description": "The app key of device." }, "nwkKey": { "type": "string", "description": "The network key of device." } }, "required": [ "appKey" ] }, "example": { "devEui": "24e124535b318262", "appKey": "55724xxxxxxxxxx3" }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "appkey": { "type": "string" }, "nwkKey": { "type": "string" } }, "required": [ "appkey", "nwkKey" ], "description": "Data of the device." } }, "required": [ "data" ] }, "example": { "data": { "appKey": "55724xxxxxxxxxx3" } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/lns/tenants/{tenantId}/applications/{applicationId}/devices/all": { "get": { "summary": "Get Devices", "description": "Get devices", "operationId": "LNS_Device.GetDevices", "tags": [ "LNS Device" ], "parameters": [ { "name": "tenantId", "description": "The ID of tenant.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "applicationId", "description": "The ID of application.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "offset", "description": "The offset of device.", "in": "query", "schema": { "type": "number", "minimum": 0, "default": 0 }, "required": false }, { "name": "limit", "description": "The limit of device.", "in": "query", "schema": { "type": "number", "minimum": 1, "maximum": 100, "default": 20 }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "devEui": { "type": "string" }, "lastSeenAt": { "type": "number" }, "activateStatus": { "type": "boolean" } }, "required": [ "devEui", "lastSeenAt", "activateStatus" ] }, "description": "Data of the device." }, "totalCount": { "type": "number", "description": "Total count of device." } }, "required": [ "data", "totalCount" ] }, "example": { "data": [ { "devEui": "24e124535b318260", "lastSeenAt": null, "activateStatus": false } ], "totalCount": 1 }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/lns/tenants/{tenantId}/device-profiles": { "post": { "summary": "Create Device Profile", "description": "Create device profile", "operationId": "LNS_Device_Profile.CreateDeviceProfile", "tags": [ "LNS Device Profile" ], "parameters": [ { "name": "tenantId", "description": "The ID of tenant.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of device profile." }, "description": { "type": "string", "description": "The description of device profile." }, "region": { "type": "number", "description": "The region of device profile." }, "macVersion": { "type": "number", "description": "The mac version of device profile." }, "regionConfigId": { "type": "string", "description": "The region config ID of device profile." }, "regParamsRevision": { "type": "number", "description": "The reg params revision of device profile." }, "adrAlgorithmId": { "type": "string", "description": "The ADR algorithm ID of device profile." }, "flushQueueOnActivate": { "type": "boolean", "description": "The flush queue on activate of device profile." }, "uplinkInterval": { "type": "number", "description": "The uplink interval of device profile." }, "deviceStatusReqInterval": { "type": "number", "description": "The device status request interval of device profile." }, "supportsOtaa": { "type": "boolean", "description": "The supports OTAA of device profile." }, "abpRx1Delay": { "type": "number", "description": "The ABP Rx1 delay of device profile." }, "abpRx1DrOffset": { "type": "number", "description": "The ABP Rx1 DR offset of device profile." }, "abpRx2Dr": { "type": "number", "description": "The ABP Rx2 DR of device profile." }, "abpRx2Freq": { "type": "number", "description": "The ABP Rx2 frequency of device profile." }, "supportsClassB": { "type": "boolean", "description": "The supports Class B of device profile." }, "classBTimeout": { "type": "number", "description": "The Class B timeout of device profile." }, "classBPingSlotNbK": { "type": "number", "description": "The Class B ping slot number of device profile." }, "classBPingSlotDr": { "type": "number", "description": "The Class B ping slot DR of device profile." }, "classBPingSlotFreq": { "type": "number", "description": "The Class B ping slot frequency of device profile." }, "supportsClassC": { "type": "boolean", "description": "The supports Class C of device profile." }, "classCTimeout": { "type": "number", "description": "The Class C timeout of device profile." }, "isRelay": { "type": "boolean", "description": "The is relay of device profile." }, "relayEnabled": { "type": "boolean", "description": "The relay enabled of device profile." }, "relayDefaultChannelIndex": { "type": "number", "description": "The relay default channel index of device profile." }, "relaySecondChannelFreq": { "type": "number", "description": "The relay second channel frequency of device profile." }, "relaySecondChannelDr": { "type": "number", "description": "The relay second channel DR of device profile." }, "relaySecondChannelAckOffset": { "type": "number", "description": "The relay second channel ack offset of device profile." }, "relayCadPeriodicity": { "type": "number", "description": "The relay cad periodicity of device profile." }, "relayJoinReqLimitBucketSize": { "type": "number", "description": "The relay join request limit bucket size of device profile." }, "relayJoinReqLimitReloadRate": { "type": "number", "description": "The relay join request limit reload rate of device profile." }, "relayNotifyLimitBucketSize": { "type": "number", "description": "The relay notify limit bucket size of device profile." }, "relayNotifyLimitReloadRate": { "type": "number", "description": "The relay notify limit reload rate of device profile." }, "relayGlobalUplinkLimitBucketSize": { "type": "number", "description": "The relay overall limit bucket size of device profile." }, "relayGlobalUplinkLimitReloadRate": { "type": "number", "description": "The relay overall limit reload rate of device profile." }, "relayOverallLimitBucketSize": { "type": "number", "description": "The relay overall limit bucket size of device profile." }, "relayOverallLimitReloadRate": { "type": "number", "description": "The relay overall limit reload rate of device profile." }, "isRelayEd": { "type": "boolean", "description": "The is relay ED of device profile." }, "relayEdRelayOnly": { "type": "boolean", "description": "The relay ED relay only of device profile." }, "relayEdActivationMode": { "type": "number", "description": "The relay ED activation mode of device profile." }, "relayEdSmartEnableLevel": { "type": "number", "description": "The relay ED smart enable level of device profile." }, "relayEdBackOff": { "type": "number", "description": "The relay ED back off of device profile." }, "relayEdUplinkLimitBucketSize": { "type": "number", "description": "The relay ED uplink limit bucket size of device profile." }, "relayEdUplinkLimitReloadRate": { "type": "number", "description": "The relay ED uplink limit reload rate of device profile." } }, "required": [ "name", "region", "macVersion", "regParamsRevision", "adrAlgorithmId", "uplinkInterval" ] }, "example": { "tenantId": "b004ebe0-xxxx-xxxx-xxxx-dacd251b6f00", "id": "ff7684e4-xxxx-xxxx-xxxx-6f42763591d1", "name": "AS923-ClassC", "description": "", "region": 7, "macVersion": 3, "regionConfigId": "as923", "regParamsRevision": 0, "adrAlgorithmId": "default", "flushQueueOnActivate": true, "uplinkInterval": 3600, "deviceStatusReqInterval": 30, "supportsOtaa": true, "abpRx1Delay": 0, "abpRx1DrOffset": 0, "abpRx2Dr": 0, "abpRx2Freq": 0, "supportsClassB": false, "classBTimeout": 0, "classBPingSlotNbK": 0, "classBPingSlotDr": 0, "classBPingSlotFreq": 0, "supportsClassC": true, "classCTimeout": 0, "isRelay": false, "relayEnabled": false, "relayDefaultChannelIndex": 0, "relaySecondChannelFreq": 0, "relaySecondChannelDr": 0, "relaySecondChannelAckOffset": 0, "relayCadPeriodicity": 0, "relayJoinReqLimitBucketSize": 0, "relayJoinReqLimitReloadRate": 0, "relayNotifyLimitBucketSize": 0, "relayNotifyLimitReloadRate": 0, "relayGlobalUplinkLimitBucketSize": 0, "relayGlobalUplinkLimitReloadRate": 0, "relayOverallLimitBucketSize": 0, "relayOverallLimitReloadRate": 0, "isRelayEd": false, "relayEdRelayOnly": false, "relayEdActivationMode": 0, "relayEdSmartEnableLevel": 0, "relayEdBackOff": 0, "relayEdUplinkLimitBucketSize": 0, "relayEdUplinkLimitReloadRate": 0, "tagsMap": [ { "key": "Rooftop", "value": "Weather monitoring" } ] }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "tenantId": { "type": "string" }, "id": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "region": { "type": "number" }, "regionConfigId": { "type": "string" }, "macVersion": { "type": "number" }, "regParamsRevision": { "type": "number" }, "adrAlgorithmId": { "type": "string" }, "flushQueueOnActivate": { "type": "boolean" }, "uplinkInterval": { "type": "boolean" }, "deviceStatusReqInterval": { "type": "number" }, "supportsOtaa": { "type": "boolean" }, "abpRx1Delay": { "type": "number" }, "abpRx1DrOffset": { "type": "number" }, "abpRx2Dr": { "type": "number" }, "abpRx2Freq": { "type": "number" }, "supportsClassB": { "type": "boolean" }, "classBTimeout": { "type": "number" }, "classBPingSlotNbK": { "type": "number" }, "classBPingSlotDr": { "type": "number" }, "classBPingSlotFreq": { "type": "number" }, "supportsClassC": { "type": "boolean" }, "classCTimeout": { "type": "number" }, "isRelay": { "type": "boolean" }, "relayEnabled": { "type": "boolean" }, "relayDefaultChannelIndex": { "type": "number" }, "relaySecondChannelFreq": { "type": "number" }, "relaySecondChannelDr": { "type": "number" }, "relaySecondChannelAckOffset": { "type": "number" }, "relayCadPeriodicity": { "type": "number" }, "relayJoinReqLimitBucketSize": { "type": "number" }, "relayJoinReqLimitReloadRate": { "type": "number" }, "relayNotifyLimitBucketSize": { "type": "number" }, "relayNotifyLimitReloadRate": { "type": "number" }, "relayGlobalUplinkLimitBucketSize": { "type": "number" }, "relayGlobalUplinkLimitReloadRate": { "type": "number" }, "relayOverallLimitBucketSize": { "type": "number" }, "relayOverallLimitReloadRate": { "type": "number" }, "isRelayEd": { "type": "boolean" }, "relayEdRelayOnly": { "type": "boolean" }, "relayEdActivationMode": { "type": "number" }, "relayEdSmartEnableLevel": { "type": "number" }, "relayEdBackOff": { "type": "number" }, "relayEdUplinkLimitBucketSize": { "type": "number" }, "relayEdUplinkLimitReloadRate": { "type": "number" }, "tagsMap": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] } } }, "required": [ "tenantId", "id", "name", "description", "region", "regionConfigId", "macVersion", "regParamsRevision", "adrAlgorithmId", "flushQueueOnActivate", "uplinkInterval", "deviceStatusReqInterval", "supportsOtaa", "abpRx1Delay", "abpRx1DrOffset", "abpRx2Dr", "abpRx2Freq", "supportsClassB", "classBTimeout", "classBPingSlotNbK", "classBPingSlotDr", "classBPingSlotFreq", "supportsClassC", "classCTimeout", "isRelay", "relayEnabled", "relayDefaultChannelIndex", "relaySecondChannelFreq", "relaySecondChannelDr", "relaySecondChannelAckOffset", "relayCadPeriodicity", "relayJoinReqLimitBucketSize", "relayJoinReqLimitReloadRate", "relayNotifyLimitBucketSize", "relayNotifyLimitReloadRate", "relayGlobalUplinkLimitBucketSize", "relayGlobalUplinkLimitReloadRate", "relayOverallLimitBucketSize", "relayOverallLimitReloadRate", "isRelayEd", "relayEdRelayOnly", "relayEdActivationMode", "relayEdSmartEnableLevel", "relayEdBackOff", "relayEdUplinkLimitBucketSize", "relayEdUplinkLimitReloadRate", "tagsMap" ] }, "description": "Data of the device profile." } }, "required": [ "data" ] }, "example": { "data": { "tenantId": "b004ebe0-xxxx-xxxx-xxxx-dacd251b6f00", "id": "ff7684e4-xxxx-xxxx-xxxx-6f42763591d1", "name": "AS923-ClassC", "description": "", "region": 7, "macVersion": 3, "regionConfigId": "as923", "regParamsRevision": 0, "adrAlgorithmId": "default", "flushQueueOnActivate": true, "uplinkInterval": 3600, "deviceStatusReqInterval": 30, "supportsOtaa": true, "abpRx1Delay": 0, "abpRx1DrOffset": 0, "abpRx2Dr": 0, "abpRx2Freq": 0, "supportsClassB": false, "classBTimeout": 0, "classBPingSlotNbK": 0, "classBPingSlotDr": 0, "classBPingSlotFreq": 0, "supportsClassC": true, "classCTimeout": 0, "isRelay": false, "relayEnabled": false, "relayDefaultChannelIndex": 0, "relaySecondChannelFreq": 0, "relaySecondChannelDr": 0, "relaySecondChannelAckOffset": 0, "relayCadPeriodicity": 0, "relayJoinReqLimitBucketSize": 0, "relayJoinReqLimitReloadRate": 0, "relayNotifyLimitBucketSize": 0, "relayNotifyLimitReloadRate": 0, "relayGlobalUplinkLimitBucketSize": 0, "relayGlobalUplinkLimitReloadRate": 0, "relayOverallLimitBucketSize": 0, "relayOverallLimitReloadRate": 0, "isRelayEd": false, "relayEdRelayOnly": false, "relayEdActivationMode": 0, "relayEdSmartEnableLevel": 0, "relayEdBackOff": 0, "relayEdUplinkLimitBucketSize": 0, "relayEdUplinkLimitReloadRate": 0, "tagsMap": [ { "key": "Rooftop", "value": "Weather monitoring" } ] } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "List Device Profiles", "description": "List device profiles", "operationId": "LNS_Device_Profile.ListDeviceProfiles", "tags": [ "LNS Device Profile" ], "parameters": [ { "name": "tenantId", "description": "The ID of tenant.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "offset", "description": "The offset of device profile.", "in": "query", "schema": { "type": "number", "minimum": 0, "default": 0 }, "required": false }, { "name": "limit", "description": "The limit of device profile.", "in": "query", "schema": { "type": "number", "minimum": 1, "maximum": 100, "default": 20 }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "region": { "type": "number" }, "macVersion": { "type": "number" }, "regParamsRevision": { "type": "number" }, "supportsOtaa": { "type": "boolean" }, "supportsClassB": { "type": "boolean" }, "supportsClassC": { "type": "boolean" }, "createdAt": { "type": "number" }, "updatedAt": { "type": "number" } }, "required": [ "id", "name", "region", "macVersion", "regParamsRevision", "supportsOtaa", "supportsClassB", "supportsClassC", "createdAt", "updatedAt" ] }, "description": "Data of the device profile." } }, "required": [ "data" ] }, "example": { "data": [ { "id": "04ec75ad-xxxx-xxxx-xxxx-919fb9e45a25", "name": "AS923-ClassB", "region": 7, "macVersion": 3, "regParamsRevision": 0, "supportsOtaa": true, "supportsClassB": false, "supportsClassC": false, "createdAt": 1702868770, "updatedAt": 1702868770 } ], "totalCount": 1 }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/lns/tenants/{tenantId}/device-profiles/{deviceProfileId}": { "delete": { "summary": "Delete Device Profile", "description": "Delete device profile", "operationId": "LNS_Device_Profile.DeleteDeviceProfile", "tags": [ "LNS Device Profile" ], "parameters": [ { "name": "tenantId", "description": "The ID of tenant.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "deviceProfileId", "description": "The ID of device profile.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": {}, "required": [], "description": "Empty object" } }, "required": [ "data" ] }, "example": { "data": { "deleted": true } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "Get Device Profile", "description": "Get device profile", "operationId": "LNS_Device_Profile.GetDeviceProfile", "tags": [ "LNS Device Profile" ], "parameters": [ { "name": "tenantId", "description": "The ID of tenant.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "deviceProfileId", "description": "The ID of device profile.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "tenantId": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "region": { "type": "number" }, "regionConfigId": { "type": "string" }, "macVersion": { "type": "number" }, "regParamsRevision": { "type": "number" }, "adrAlgorithmId": { "type": "string" }, "flushQueueOnActivate": { "type": "boolean" }, "uplinkInterval": { "type": "boolean" }, "deviceStatusReqInterval": { "type": "number" }, "supportsOtaa": { "type": "boolean" }, "abpRx1Delay": { "type": "number" }, "abpRx1DrOffset": { "type": "number" }, "abpRx2Dr": { "type": "number" }, "abpRx2Freq": { "type": "number" }, "supportsClassB": { "type": "boolean" }, "classBTimeout": { "type": "number" }, "classBPingSlotNbK": { "type": "number" }, "classBPingSlotDr": { "type": "number" }, "classBPingSlotFreq": { "type": "number" }, "supportsClassC": { "type": "boolean" }, "classCTimeout": { "type": "number" }, "isRelay": { "type": "boolean" }, "relayEnabled": { "type": "boolean" }, "relayDefaultChannelIndex": { "type": "number" }, "relaySecondChannelFreq": { "type": "number" }, "relaySecondChannelDr": { "type": "number" }, "relaySecondChannelAckOffset": { "type": "number" }, "relayCadPeriodicity": { "type": "number" }, "relayJoinReqLimitBucketSize": { "type": "number" }, "relayJoinReqLimitReloadRate": { "type": "number" }, "relayNotifyLimitBucketSize": { "type": "number" }, "relayNotifyLimitReloadRate": { "type": "number" }, "relayGlobalUplinkLimitBucketSize": { "type": "number" }, "relayGlobalUplinkLimitReloadRate": { "type": "number" }, "relayOverallLimitBucketSize": { "type": "number" }, "relayOverallLimitReloadRate": { "type": "number" }, "isRelayEd": { "type": "boolean" }, "relayEdRelayOnly": { "type": "boolean" }, "relayEdActivationMode": { "type": "number" }, "relayEdSmartEnableLevel": { "type": "number" }, "relayEdBackOff": { "type": "number" }, "relayEdUplinkLimitBucketSize": { "type": "number" }, "relayEdUplinkLimitReloadRate": { "type": "number" }, "tagsMap": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] } }, "createdAt": { "type": "number" }, "updatedAt": { "type": "number" } }, "required": [ "id", "tenantId", "name", "description", "region", "regionConfigId", "macVersion", "regParamsRevision", "adrAlgorithmId", "flushQueueOnActivate", "uplinkInterval", "deviceStatusReqInterval", "supportsOtaa", "abpRx1Delay", "abpRx1DrOffset", "abpRx2Dr", "abpRx2Freq", "supportsClassB", "classBTimeout", "classBPingSlotNbK", "classBPingSlotDr", "classBPingSlotFreq", "supportsClassC", "classCTimeout", "isRelay", "relayEnabled", "relayDefaultChannelIndex", "relaySecondChannelFreq", "relaySecondChannelDr", "relaySecondChannelAckOffset", "relayCadPeriodicity", "relayJoinReqLimitBucketSize", "relayJoinReqLimitReloadRate", "relayNotifyLimitBucketSize", "relayNotifyLimitReloadRate", "relayGlobalUplinkLimitBucketSize", "relayGlobalUplinkLimitReloadRate", "relayOverallLimitBucketSize", "relayOverallLimitReloadRate", "isRelayEd", "relayEdRelayOnly", "relayEdActivationMode", "relayEdSmartEnableLevel", "relayEdBackOff", "relayEdUplinkLimitBucketSize", "relayEdUplinkLimitReloadRate", "tagsMap", "createdAt", "updatedAt" ] }, "description": "Data of the device profile." } }, "required": [ "data" ] }, "example": { "data": { "tenantId": "b004ebe0-xxxx-xxxx-xxxx-dacd251b6f00", "id": "ff7684e4-xxxx-xxxx-xxxx-6f42763591d1", "name": "AS923-ClassC", "description": "", "region": 7, "macVersion": 3, "regionConfigId": "as923", "regParamsRevision": 0, "adrAlgorithmId": "default", "flushQueueOnActivate": true, "uplinkInterval": 3600, "deviceStatusReqInterval": 30, "supportsOtaa": true, "abpRx1Delay": 0, "abpRx1DrOffset": 0, "abpRx2Dr": 0, "abpRx2Freq": 0, "supportsClassB": false, "classBTimeout": 0, "classBPingSlotNbK": 0, "classBPingSlotDr": 0, "classBPingSlotFreq": 0, "supportsClassC": true, "classCTimeout": 0, "isRelay": false, "relayEnabled": false, "relayDefaultChannelIndex": 0, "relaySecondChannelFreq": 0, "relaySecondChannelDr": 0, "relaySecondChannelAckOffset": 0, "relayCadPeriodicity": 0, "relayJoinReqLimitBucketSize": 0, "relayJoinReqLimitReloadRate": 0, "relayNotifyLimitBucketSize": 0, "relayNotifyLimitReloadRate": 0, "relayGlobalUplinkLimitBucketSize": 0, "relayGlobalUplinkLimitReloadRate": 0, "relayOverallLimitBucketSize": 0, "relayOverallLimitReloadRate": 0, "isRelayEd": false, "relayEdRelayOnly": false, "relayEdActivationMode": 0, "relayEdSmartEnableLevel": 0, "relayEdBackOff": 0, "relayEdUplinkLimitBucketSize": 0, "relayEdUplinkLimitReloadRate": 0, "tagsMap": [ { "key": "Rooftop", "value": "Weather monitoring" } ] } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "put": { "summary": "Update Device Profile", "description": "Update device profile", "operationId": "LNS_Device_Profile.UpdateDeviceProfile", "tags": [ "LNS Device Profile" ], "parameters": [ { "name": "tenantId", "description": "The ID of tenant.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "deviceProfileId", "description": "The ID of device profile.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of device profile." }, "description": { "type": "string", "description": "The description of device profile." }, "region": { "type": "number", "description": "The region of device profile." }, "macVersion": { "type": "number", "description": "The mac version of device profile." }, "regionConfigId": { "type": "string", "description": "The region config ID of device profile." }, "regParamsRevision": { "type": "number", "description": "The reg params revision of device profile." }, "adrAlgorithmId": { "type": "string", "description": "The ADR algorithm ID of device profile." }, "flushQueueOnActivate": { "type": "boolean", "description": "The flush queue on activate of device profile." }, "uplinkInterval": { "type": "number", "description": "The uplink interval of device profile." }, "deviceStatusReqInterval": { "type": "number", "description": "The device status request interval of device profile." }, "supportsOtaa": { "type": "boolean", "description": "The supports OTAA of device profile." }, "abpRx1Delay": { "type": "number", "description": "The ABP Rx1 delay of device profile." }, "abpRx1DrOffset": { "type": "number", "description": "The ABP Rx1 DR offset of device profile." }, "abpRx2Dr": { "type": "number", "description": "The ABP Rx2 DR of device profile." }, "abpRx2Freq": { "type": "number", "description": "The ABP Rx2 frequency of device profile." }, "supportsClassB": { "type": "boolean", "description": "The supports Class B of device profile." }, "classBTimeout": { "type": "number", "description": "The Class B timeout of device profile." }, "classBPingSlotNbK": { "type": "number", "description": "The Class B ping slot number of device profile." }, "classBPingSlotDr": { "type": "number", "description": "The Class B ping slot DR of device profile." }, "classBPingSlotFreq": { "type": "number", "description": "The Class B ping slot frequency of device profile." }, "supportsClassC": { "type": "boolean", "description": "The supports Class C of device profile." }, "classCTimeout": { "type": "number", "description": "The Class C timeout of device profile." }, "isRelay": { "type": "boolean", "description": "The is relay of device profile." }, "relayEnabled": { "type": "boolean", "description": "The relay enabled of device profile." }, "relayDefaultChannelIndex": { "type": "number", "description": "The relay default channel index of device profile." }, "relaySecondChannelFreq": { "type": "number", "description": "The relay second channel frequency of device profile." }, "relaySecondChannelDr": { "type": "number", "description": "The relay second channel DR of device profile." }, "relaySecondChannelAckOffset": { "type": "number", "description": "The relay second channel ack offset of device profile." }, "relayCadPeriodicity": { "type": "number", "description": "The relay cad periodicity of device profile." }, "relayJoinReqLimitBucketSize": { "type": "number", "description": "The relay join request limit bucket size of device profile." }, "relayJoinReqLimitReloadRate": { "type": "number", "description": "The relay join request limit reload rate of device profile." }, "relayNotifyLimitBucketSize": { "type": "number", "description": "The relay notify limit bucket size of device profile." }, "relayNotifyLimitReloadRate": { "type": "number", "description": "The relay notify limit reload rate of device profile." }, "relayGlobalUplinkLimitBucketSize": { "type": "number", "description": "The relay overall limit bucket size of device profile." }, "relayGlobalUplinkLimitReloadRate": { "type": "number", "description": "The relay overall limit reload rate of device profile." }, "relayOverallLimitBucketSize": { "type": "number", "description": "The relay overall limit bucket size of device profile." }, "relayOverallLimitReloadRate": { "type": "number", "description": "The relay overall limit reload rate of device profile." }, "isRelayEd": { "type": "boolean", "description": "The is relay ED of device profile." }, "relayEdRelayOnly": { "type": "boolean", "description": "The relay ED relay only of device profile." }, "relayEdActivationMode": { "type": "number", "description": "The relay ED activation mode of device profile." }, "relayEdSmartEnableLevel": { "type": "number", "description": "The relay ED smart enable level of device profile." }, "relayEdBackOff": { "type": "number", "description": "The relay ED back off of device profile." }, "relayEdUplinkLimitBucketSize": { "type": "number", "description": "The relay ED uplink limit bucket size of device profile." }, "relayEdUplinkLimitReloadRate": { "type": "number", "description": "The relay ED uplink limit reload rate of device profile." } }, "required": [ "name", "region", "macVersion", "regParamsRevision", "adrAlgorithmId", "uplinkInterval" ] }, "example": { "tenantId": "b004ebe0-xxxx-xxxx-xxxx-dacd251b6f00", "id": "ff7684e4-xxxx-xxxx-xxxx-6f42763591d1", "name": "AS923-ClassC", "description": "", "region": 7, "macVersion": 3, "regionConfigId": "as923", "regParamsRevision": 0, "adrAlgorithmId": "default", "flushQueueOnActivate": true, "uplinkInterval": 3600, "deviceStatusReqInterval": 30, "supportsOtaa": true, "abpRx1Delay": 0, "abpRx1DrOffset": 0, "abpRx2Dr": 0, "abpRx2Freq": 0, "supportsClassB": false, "classBTimeout": 0, "classBPingSlotNbK": 0, "classBPingSlotDr": 0, "classBPingSlotFreq": 0, "supportsClassC": true, "classCTimeout": 0, "isRelay": false, "relayEnabled": false, "relayDefaultChannelIndex": 0, "relaySecondChannelFreq": 0, "relaySecondChannelDr": 0, "relaySecondChannelAckOffset": 0, "relayCadPeriodicity": 0, "relayJoinReqLimitBucketSize": 0, "relayJoinReqLimitReloadRate": 0, "relayNotifyLimitBucketSize": 0, "relayNotifyLimitReloadRate": 0, "relayGlobalUplinkLimitBucketSize": 0, "relayGlobalUplinkLimitReloadRate": 0, "relayOverallLimitBucketSize": 0, "relayOverallLimitReloadRate": 0, "isRelayEd": false, "relayEdRelayOnly": false, "relayEdActivationMode": 0, "relayEdSmartEnableLevel": 0, "relayEdBackOff": 0, "relayEdUplinkLimitBucketSize": 0, "relayEdUplinkLimitReloadRate": 0, "tagsMap": [ { "key": "Rooftop", "value": "Weather monitoring" } ] }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "tenantId": { "type": "string" }, "id": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "region": { "type": "number" }, "regionConfigId": { "type": "string" }, "macVersion": { "type": "number" }, "regParamsRevision": { "type": "number" }, "adrAlgorithmId": { "type": "string" }, "flushQueueOnActivate": { "type": "boolean" }, "uplinkInterval": { "type": "boolean" }, "deviceStatusReqInterval": { "type": "number" }, "supportsOtaa": { "type": "boolean" }, "abpRx1Delay": { "type": "number" }, "abpRx1DrOffset": { "type": "number" }, "abpRx2Dr": { "type": "number" }, "abpRx2Freq": { "type": "number" }, "supportsClassB": { "type": "boolean" }, "classBTimeout": { "type": "number" }, "classBPingSlotNbK": { "type": "number" }, "classBPingSlotDr": { "type": "number" }, "classBPingSlotFreq": { "type": "number" }, "supportsClassC": { "type": "boolean" }, "classCTimeout": { "type": "number" }, "isRelay": { "type": "boolean" }, "relayEnabled": { "type": "boolean" }, "relayDefaultChannelIndex": { "type": "number" }, "relaySecondChannelFreq": { "type": "number" }, "relaySecondChannelDr": { "type": "number" }, "relaySecondChannelAckOffset": { "type": "number" }, "relayCadPeriodicity": { "type": "number" }, "relayJoinReqLimitBucketSize": { "type": "number" }, "relayJoinReqLimitReloadRate": { "type": "number" }, "relayNotifyLimitBucketSize": { "type": "number" }, "relayNotifyLimitReloadRate": { "type": "number" }, "relayGlobalUplinkLimitBucketSize": { "type": "number" }, "relayGlobalUplinkLimitReloadRate": { "type": "number" }, "relayOverallLimitBucketSize": { "type": "number" }, "relayOverallLimitReloadRate": { "type": "number" }, "isRelayEd": { "type": "boolean" }, "relayEdRelayOnly": { "type": "boolean" }, "relayEdActivationMode": { "type": "number" }, "relayEdSmartEnableLevel": { "type": "number" }, "relayEdBackOff": { "type": "number" }, "relayEdUplinkLimitBucketSize": { "type": "number" }, "relayEdUplinkLimitReloadRate": { "type": "number" }, "tagsMap": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] } } }, "required": [ "tenantId", "id", "name", "description", "region", "regionConfigId", "macVersion", "regParamsRevision", "adrAlgorithmId", "flushQueueOnActivate", "uplinkInterval", "deviceStatusReqInterval", "supportsOtaa", "abpRx1Delay", "abpRx1DrOffset", "abpRx2Dr", "abpRx2Freq", "supportsClassB", "classBTimeout", "classBPingSlotNbK", "classBPingSlotDr", "classBPingSlotFreq", "supportsClassC", "classCTimeout", "isRelay", "relayEnabled", "relayDefaultChannelIndex", "relaySecondChannelFreq", "relaySecondChannelDr", "relaySecondChannelAckOffset", "relayCadPeriodicity", "relayJoinReqLimitBucketSize", "relayJoinReqLimitReloadRate", "relayNotifyLimitBucketSize", "relayNotifyLimitReloadRate", "relayGlobalUplinkLimitBucketSize", "relayGlobalUplinkLimitReloadRate", "relayOverallLimitBucketSize", "relayOverallLimitReloadRate", "isRelayEd", "relayEdRelayOnly", "relayEdActivationMode", "relayEdSmartEnableLevel", "relayEdBackOff", "relayEdUplinkLimitBucketSize", "relayEdUplinkLimitReloadRate", "tagsMap" ] }, "description": "Data of the device profile." } }, "required": [ "data" ] }, "example": { "data": { "tenantId": "b004ebe0-xxxx-xxxx-xxxx-dacd251b6f00", "id": "ff7684e4-xxxx-xxxx-xxxx-6f42763591d1", "name": "AS923-ClassC", "description": "", "region": 7, "macVersion": 3, "regionConfigId": "as923", "regParamsRevision": 0, "adrAlgorithmId": "default", "flushQueueOnActivate": true, "uplinkInterval": 3600, "deviceStatusReqInterval": 30, "supportsOtaa": true, "abpRx1Delay": 0, "abpRx1DrOffset": 0, "abpRx2Dr": 0, "abpRx2Freq": 0, "supportsClassB": false, "classBTimeout": 0, "classBPingSlotNbK": 0, "classBPingSlotDr": 0, "classBPingSlotFreq": 0, "supportsClassC": true, "classCTimeout": 0, "isRelay": false, "relayEnabled": false, "relayDefaultChannelIndex": 0, "relaySecondChannelFreq": 0, "relaySecondChannelDr": 0, "relaySecondChannelAckOffset": 0, "relayCadPeriodicity": 0, "relayJoinReqLimitBucketSize": 0, "relayJoinReqLimitReloadRate": 0, "relayNotifyLimitBucketSize": 0, "relayNotifyLimitReloadRate": 0, "relayGlobalUplinkLimitBucketSize": 0, "relayGlobalUplinkLimitReloadRate": 0, "relayOverallLimitBucketSize": 0, "relayOverallLimitReloadRate": 0, "isRelayEd": false, "relayEdRelayOnly": false, "relayEdActivationMode": 0, "relayEdSmartEnableLevel": 0, "relayEdBackOff": 0, "relayEdUplinkLimitBucketSize": 0, "relayEdUplinkLimitReloadRate": 0, "tagsMap": [ { "key": "Rooftop", "value": "Weather monitoring" } ] } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/lns/tenants/{tenantId}/gateways": { "post": { "summary": "Create Gateway", "description": "Create gateway", "operationId": "LNS_Gateway.CreateGateway", "tags": [ "LNS Gateway" ], "parameters": [ { "name": "tenantId", "description": "The ID of tenant.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "gatewayId": { "type": "string", "description": "The ID of gateway." }, "name": { "type": "string", "description": "The name of gateway." }, "description": { "type": "string", "description": "The description of gateway." }, "statsInterval": { "type": "number", "description": "The stats interval of gateway." }, "tagsMap": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] }, "description": "The tagsMsp of gateway." } }, "required": [ "gatewayId", "name", "statsInterval" ] }, "example": { "gatewayId": "24e124fffef23456", "name": "24E124FFFEF23456", "description": "IDT-Gateway-Description", "statsInterval": 30, "tagsMap": [] }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "tenantId": { "type": "string" }, "gatewayId": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "statsInterval": { "type": "number" }, "tagsMap": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] } } }, "required": [ "tenantId", "gatewayId", "name", "description", "statsInterval", "tagsMap" ], "description": "Data of the gateway." } }, "required": [ "data" ] }, "example": { "data": { "tenantId": "b004ebe0-xxxx-xxxx-xxxx-dacd251b6f00", "gatewayId": "24e124fffef23456", "name": "24E124FFFEF23456", "description": "IDT-Gateway-Description", "statsInterval": 30, "tagsMap": [] } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "List Gateways", "description": "List gateways", "operationId": "LNS_Gateway.ListGateways", "tags": [ "LNS Gateway" ], "parameters": [ { "name": "tenantId", "description": "The ID of tenant.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "offset", "description": "The offset of gateway.", "in": "query", "schema": { "type": "number", "minimum": 0, "default": 0 }, "required": false }, { "name": "limit", "description": "The limit of gateway.", "in": "query", "schema": { "type": "number", "minimum": 1, "maximum": 100, "default": 20 }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "tenantId": { "type": "string" }, "gatewayId": { "type": "string" }, "name": { "type": "string" }, "state": { "type": "object", "properties": {}, "required": [] }, "propertiesMap": { "type": "object", "properties": {}, "required": [] }, "lastSeenAt": { "type": "number" }, "createdAt": { "type": "number" }, "updatedAt": { "type": "number" } }, "required": [ "tenantId", "gatewayId", "name", "state", "propertiesMap", "lastSeenAt", "createdAt", "updatedAt" ] }, "description": "Data of the gateway." }, "totalCount": { "type": "number", "description": "The total count of gateway." } }, "required": [ "data", "totalCount" ] }, "example": { "data": [ { "tenantId": "b004ebe0-xxxx-xxxx-xxxx-dacd251b6f00", "gatewayId": "24e124fffef23456", "name": "24E124FFFEF23456", "state": 2, "propertiesMap": { "region_common_name": "AS923", "region_config_id": "as923" }, "lastSeenAt": 1710838741, "createdAt": 1705578047, "updatedAt": 1705578047 } ], "totalCount": 1 }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/lns/tenants/{tenantId}/gateways/{gatewayId}": { "delete": { "summary": "Delete Gateway", "description": "Delete gateway", "operationId": "LNS_Gateway.DeleteGateway", "tags": [ "LNS Gateway" ], "parameters": [ { "name": "tenantId", "description": "The ID of tenant.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "gatewayId", "description": "The ID of gateway.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": {}, "required": [], "description": "Empty object" } }, "required": [ "data" ] }, "example": { "data": { "deleted": true } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "Get Gateway", "description": "Get gateway", "operationId": "LNS_Gateway.GetGateway", "tags": [ "LNS Gateway" ], "parameters": [ { "name": "tenantId", "description": "The ID of tenant.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "gatewayId", "description": "The ID of gateway.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "tenantId": { "type": "string" }, "gatewayId": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "statsInterval": { "type": "number" }, "lastSeenAt": { "type": "number" }, "tagsMap": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] } }, "createdAt": { "type": "number" }, "updatedAt": { "type": "number" } }, "required": [ "tenantId", "gatewayId", "name", "description", "statsInterval", "lastSeenAt", "tagsMap", "createdAt", "updatedAt" ], "description": "Data of the gateway." } }, "required": [ "data" ] }, "example": { "data": { "tenantId": "b004ebe0-xxxx-xxxx-xxxx-dacd251b6f00", "gatewayId": "24e124fffef23456", "name": "24E124FFFEF23456", "description": "IDT-Gateway-Description", "statsInterval": 30, "tagsMap": [] } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "put": { "summary": "Update Gateway", "description": "Update gateway", "operationId": "LNS_Gateway.UpdateGateway", "tags": [ "LNS Gateway" ], "parameters": [ { "name": "tenantId", "description": "The ID of tenant.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "gatewayId", "description": "The ID of gateway.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of gateway." }, "description": { "type": "string", "description": "The description of gateway." }, "statsInterval": { "type": "number", "description": "The stats interval of gateway." }, "tagsMap": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] }, "description": "The tagsMsp of gateway." } }, "required": [ "name", "statsInterval" ] }, "example": { "name": "24E124FFFEF23456", "description": "IDT-Gateway-Description", "statsInterval": 30, "tagsMap": [] }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "tenantId": { "type": "string" }, "gatewayId": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "statsInterval": { "type": "number" }, "tagsMap": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] } } }, "required": [ "tenantId", "gatewayId", "name", "description", "statsInterval", "tagsMap" ], "description": "Data of the gateway." } }, "required": [ "data" ] }, "example": { "data": { "tenantId": "b004ebe0-xxxx-xxxx-xxxx-dacd251b6f00", "gatewayId": "24e124fffef23456", "name": "24E124FFFEF23456", "description": "IDT-Gateway-Description", "statsInterval": 30, "tagsMap": [] } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/locations": { "post": { "summary": "Create Location", "description": "Create location", "operationId": "Location.CreateLocation", "tags": [ "Location" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "parentId": { "type": "string", "description": "The parent location ID" }, "name": { "type": "string", "description": "The name of location" }, "description": { "type": "string", "description": "The description of location" }, "address": { "type": "string", "description": "The address of location" }, "chatRoomId": { "type": "string", "description": "The ID of chat room" }, "entities": { "type": "array", "items": { "type": "string" }, "description": "The entities of location" }, "image": { "type": "string", "description": "The image of location" }, "files": { "type": "array", "items": { "type": "string" }, "description": "The files of location." } }, "required": [ "name" ] }, "example": { "parentId": "l-locationId", "name": "IDT-Location", "description": "IDT-Location-Description", "address": "Taipei City", "chatRoomId": "ABCDE", "entities": [], "image": "abc.png", "files": [ "Infodeck-Bot-0001.pdf" ] }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "organizationId": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "address": { "type": "string" }, "chatRoomId": { "type": "string" }, "entities": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] } }, "image": { "type": "string" }, "files": {}, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "id", "organizationId", "name", "description", "address", "chatRoomId", "entities", "image", "files", "createdAtDateString", "createdAt" ], "description": "Data of the created location." } }, "required": [ "data" ] }, "example": { "data": { "id": "l-locationId", "organizationId": "o-organizationId", "name": "IDT-Location", "description": "IDT-Location-Description", "address": "Taipei City", "chatRoomId": "ABCDE", "entities": [], "image": "abc.png", "files": [ "Infodeck-Bot-0001.pdf" ] } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "List Locations", "description": "List locations", "operationId": "Location.ListLocations", "tags": [ "Location" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "parentId", "description": "The parent location ID", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "maxResults", "description": "The maximum number of results to return.", "in": "query", "schema": { "type": "number", "minimum": 10, "maximum": 100 }, "required": false }, { "name": "nextToken", "description": "To retrieve the next set of results.", "in": "query", "schema": { "type": "string" }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "organizationId": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "address": { "type": "string" }, "chatRoomId": { "type": "string" }, "entities": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] } }, "image": { "type": "string" }, "files": {}, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "id", "organizationId", "name", "description", "address", "chatRoomId", "entities", "image", "files", "createdAtDateString", "createdAt" ] }, "description": "An array of assets within the specified location." } }, "required": [ "data" ] }, "example": { "data": [ { "id": "l-locationId", "organizationId": "o-organizationId", "name": "IDT-Location", "description": "IDT-Location-Description", "address": "Taipei City", "chatRoomId": "ABCDE", "entities": [], "image": "abc.png", "files": [ "Infodeck-Bot-0001.pdf" ] } ] }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/locations/{locationId}": { "delete": { "summary": "Delete Location", "description": "Delete location", "operationId": "Location.DeleteLocation", "tags": [ "Location" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "locationId", "description": "The ID of location", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "deleted": { "type": "boolean", "description": "Whether the location was deleted." }, "reservableResourcesDeactivated": { "type": "number", "description": "Count of linked reservable records deactivated." }, "reservableResourcesMatched": { "type": "number", "description": "Count of linked reservable records found." }, "reservableResourcesFailed": { "type": "number", "description": "Count of linked reservable records that could not be deactivated." } }, "required": [ "deleted", "reservableResourcesDeactivated", "reservableResourcesMatched", "reservableResourcesFailed" ] }, "example": { "deleted": true, "reservableResourcesDeactivated": 1, "reservableResourcesMatched": 1, "reservableResourcesFailed": 0 }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "Get Location", "description": "Get location", "operationId": "Location.GetLocation", "tags": [ "Location" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "locationId", "description": "The ID of location", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "organizationId": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "address": { "type": "string" }, "chatRoomId": { "type": "string" }, "entities": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] } }, "image": { "type": "string" }, "files": {}, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "id", "organizationId", "name", "description", "address", "chatRoomId", "entities", "image", "files", "createdAtDateString", "createdAt" ], "description": "Data of the location retrieved." } }, "required": [ "data" ] }, "example": { "data": { "id": "l-locationId", "organizationId": "o-organizationId", "name": "IDT-Location", "description": "IDT-Location-Description", "address": "Taipei City", "chatRoomId": "ABCDE", "entities": [], "image": "abc.png", "files": [ "Infodeck-Bot-0001.pdf" ] } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "put": { "summary": "Update Location", "description": "Update location", "operationId": "Location.UpdateLocation", "tags": [ "Location" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "locationId", "description": "The ID of location", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of location" }, "description": { "type": "string", "description": "The description of location" }, "address": { "type": "string", "description": "The address of location" }, "chatRoomId": { "type": "string", "description": "The ID of chat room" }, "entities": { "type": "array", "items": { "type": "string" }, "description": "The entities of location" }, "image": { "type": "string", "description": "The image of location" }, "files": { "type": "string", "description": "The files of location" } }, "required": [ "name" ] }, "example": { "name": "IDT-Location", "description": "IDT-Location-Description", "address": "Taipei City", "chatRoomId": "ABCDE", "entities": [], "image": "abc.png", "files": [ "Infodeck-Bot-0001.pdf" ] }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "organizationId": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "address": { "type": "string" }, "chatRoomId": { "type": "string" }, "entities": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] } }, "image": { "type": "string" }, "files": {}, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "id", "organizationId", "name", "description", "address", "chatRoomId", "entities", "image", "files", "createdAtDateString", "createdAt" ], "description": "An array of assets within the specified location." } }, "required": [ "data" ] }, "example": { "data": { "id": "l-locationId", "organizationId": "o-organizationId", "name": "IDT-Location", "description": "IDT-Location-Description", "address": "Taipei City", "chatRoomId": "ABCDE", "entities": [], "image": "abc.png", "files": [ "Infodeck-Bot-0001.pdf" ] } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/notifications": { "post": { "summary": "Create User Device Endpoint", "description": "Create User Device Endpoint", "operationId": "Notification.CreateUserDeviceEndpoint", "tags": [ "Notification" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "userId", "description": "The ID of user.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "endpoint": { "type": "string", "description": "The equivalent endpoint of phone or browser." }, "platform": { "type": "string", "description": "The notification platform(GCM, APNS, APNS_SANDBOX, BROWSER)." } }, "required": [ "endpoint", "platform" ] }, "example": {}, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": {}, "required": [], "description": "Registration success." } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "delete": { "summary": "Delete User Device Endpoint", "description": "Delete User Device Endpoint", "operationId": "Notification.DeleteUserDeviceEndpoint", "tags": [ "Notification" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "userId", "description": "The ID of user.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": {}, "required": [], "description": "Cancel registration success." } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "List Notifications", "description": "List notifications", "operationId": "Notification.ListNotifications", "tags": [ "Notification" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "assetId", "description": "The Id of asset.", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "startDate", "description": "The start date number of query.", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "endDate", "description": "The end date number of query.", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "maxResults", "description": "The maximum number of results to return.", "in": "query", "schema": { "type": "number", "minimum": 10, "maximum": 100 }, "required": false }, { "name": "nextToken", "description": "To retrieve the next set of results.", "in": "query", "schema": { "type": "string" }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "assetId": { "type": "string" }, "source": { "type": "string" }, "sourceId": { "type": "string" }, "title": { "type": "string" }, "description": { "type": "string" }, "address": { "type": "string" }, "chatRoomId": { "type": "string" }, "entities": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] } }, "image": { "type": "string" } }, "required": [ "id", "assetId", "source", "sourceId", "title", "description", "address", "chatRoomId", "entities", "image" ] }, "description": "An array of notifications data." } }, "required": [ "data" ] }, "example": { "data": [ { "id": "ABCDE", "assetId": "a-assetId", "source": "Asset", "sourceId": "ABCDE", "title": "IDT-Asset-Title", "description": "IDT-Asset-Description", "address": "Taipei City", "chatRoomId": "ABCDE", "entities": [], "image": "abc.png" } ] }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/teams/{teamId}/assets/{assetId}": { "put": { "summary": "Add Asset To Team", "description": "Add asset to team for organization", "operationId": "Organization.AddAssetToTeam", "tags": [ "Organization" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "teamId", "description": "The ID of team.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "assetId", "description": "The ID of asset.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": {}, "required": [], "description": "Data of the result." } }, "required": [ "data" ] }, "example": { "data": { "added": true } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "delete": { "summary": "Remove Asset From Team", "description": "Remove asset from team for organization", "operationId": "Organization.RemoveAssetFromTeam", "tags": [ "Organization" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "teamId", "description": "The ID of team.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "assetId", "description": "The ID of asset.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": {}, "required": [], "description": "Data of the result." } }, "required": [ "data" ] }, "example": { "data": { "removed": true } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/teams/{teamId}/users/{userId}": { "put": { "summary": "Add User To Team", "description": "Add user to team for organization", "operationId": "Organization.AddUserToTeam", "tags": [ "Organization" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "teamId", "description": "The ID of team.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "userId", "description": "The ID of user.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": {}, "required": [], "description": "Data of the result." } }, "required": [ "data" ] }, "example": { "data": { "added": true } }, "description": "" } } }, "400": { "description": "The request has invalid data.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has invalid data." }, "message": { "type": "string", "description": "The request has invalid data message." } }, "required": [ "error", "message" ] }, "example": { "error": "Bad Request", "message": "The request cannot be processed due to a bad request." }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "delete": { "summary": "Remove User From Team", "description": "Remove user from team for organization", "operationId": "Organization.RemoveUserFromTeam", "tags": [ "Organization" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "teamId", "description": "The ID of team.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "userId", "description": "The ID of user.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": {}, "required": [], "description": "Data of the result." } }, "required": [ "data" ] }, "example": { "data": { "removed": true } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/invitations/{code}": { "put": { "summary": "Cancel Invitation", "description": "Cancel invitation for organization", "operationId": "Organization.CancelInvitation", "tags": [ "Organization" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "code", "description": "The code of invitation.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": {}, "required": [], "description": "Data of the invitaion." } }, "required": [ "data" ] }, "example": { "data": { "canceled": true } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "Get Invitation", "description": "Get invitation for user", "operationId": "Organization.GetInvitation", "tags": [ "Organization" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "code", "description": "The code of invitation.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "code": { "type": "string" }, "familyName": { "type": "string" }, "givenName": { "type": "string" }, "email": { "type": "string" }, "appRole": { "type": "string" }, "organizationId": { "type": "string" }, "origin": { "type": "string" }, "expiredTime": { "type": "number" }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "code", "familyName", "givenName", "email", "appRole", "organizationId", "origin", "expiredTime", "createdAtDateString", "createdAt", "updatedAtDateString", "updatedAt" ], "description": "Data of the user who received the invitation." } }, "required": [ "data" ] }, "example": { "data": { "code": "l9CgQxxxxxxxxxx=", "familyName": "Ashton", "givenName": "Kevin", "email": "example@infodeck.io", "appRole": "RequesterAndViewer", "organizationId": "o-organizationId", "origin": "owner", "expiredTime": 86400, "createdAtDateString": "2021-01-01T00:00:00.000Z", "createdAt": 1704067200000, "updatedAtDateString": "2021-02-01T00:00:00.000Z", "updatedAt": 1706659200000 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/check-url/{customUrl}": { "get": { "summary": "Check Custom URL Availability", "description": "Check if a custom URL is available for organization registration.\n This endpoint is publicly accessible (no auth required) to allow\n URL validation during the registration flow before org creation.", "operationId": "Organization.CheckCustomUrl", "tags": [ "Organization" ], "parameters": [ { "name": "customUrl", "description": "The custom URL to check (path parameter)", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "available": { "type": "boolean", "description": "Whether the URL is available" }, "customUrl": { "type": "string", "description": "The URL that was checked" } }, "required": [ "available", "customUrl" ] }, "example": { "available": true, "customUrl": "my-company" }, "description": "" } } }, "Error 4xx": { "description": "Invalid custom URL format", "content": { "application/json": { "schema": { "type": "object", "properties": { "ValidationError": { "description": "Invalid custom URL format" } }, "required": [ "ValidationError" ] }, "example": {}, "description": "" } } } }, "security": [ { "public": [] } ] } }, "/organizations/{organizationId}/invitations": { "post": { "summary": "Create Invitation", "description": "Create invitation for organization", "operationId": "Organization.CreateInvitation", "tags": [ "Organization" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "email": { "type": "string", "description": "The email of user." }, "familyName": { "type": "string", "description": "The family name of user." }, "givenName": { "type": "string", "description": "The given name of user." }, "teamIds": { "type": "array", "items": { "type": "string" }, "description": "The team ids of user." } }, "required": [ "email", "familyName", "givenName", "teamIds" ] }, "example": { "familyName": "Ashton", "givenName": "Kevin", "email": "example@infodeck.io" }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "code": { "type": "string" }, "familyName": { "type": "string" }, "givenName": { "type": "string" }, "email": { "type": "string" }, "locale": { "type": "string" }, "appRole": { "type": "string" }, "organizationId": { "type": "string" }, "origin": { "type": "string" }, "expiredTime": { "type": "number" }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" } }, "required": [ "code", "familyName", "givenName", "email", "appRole", "organizationId", "origin", "expiredTime", "createdAtDateString", "createdAt" ], "description": "Data of the user who received the invitation." } }, "required": [ "data" ] }, "example": { "data": { "code": "l9CgQxxxxxxxxxx=", "familyName": "Ashton", "givenName": "Kevin", "email": "example@infodeck.io", "appRole": "RequesterAndViewer", "organizationId": "o-organizationId", "origin": "owner", "expiredTime": 86400, "createdAtDateString": "2021-01-01T00:00:00.000Z", "createdAt": 1704067200000 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "List Invitations", "description": "List invitations for organization", "operationId": "Organization.ListInvitations", "tags": [ "Organization" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "maxResults", "description": "The maximum number of results to return.", "in": "query", "schema": { "type": "number", "minimum": 10, "maximum": 100 }, "required": false }, { "name": "nextToken", "description": "To retrieve the next set of results.", "in": "query", "schema": { "type": "string" }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "code": { "type": "string" }, "organizationId": { "type": "string" }, "appRole": { "type": "string" }, "origin": { "type": "string" }, "email": { "type": "string" }, "metadata": { "type": "object", "properties": {}, "required": [] }, "expiredAt": { "type": "string" }, "usedAt": { "type": "string" }, "canceledAt": { "type": "string" }, "createdAtDateString": { "type": "string" }, "createdAt": {} }, "required": [ "code", "organizationId", "appRole", "origin", "email", "metadata", "expiredAt", "usedAt", "canceledAt", "createdAtDateString", "createdAt" ] }, "description": "Array of invitation data objects." } }, "required": [ "data" ] }, "example": { "data": [ { "code": "l9CgQxxxxxxxxxx==", "organizationId": "o-organizationId", "appRole": "RequesterAndViewer", "origin": "Owner", "email": "example@infodeck.io", "metadata": {}, "expiredAt": "2024-01-03T00:00:00.000Z", "usedAt": null, "canceledAt": null, "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000 } ] }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations": { "post": { "summary": "Create Organization", "description": "Create Organization", "operationId": "Organization.CreateOrganization", "tags": [ "Organization" ], "parameters": [], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "companyName": { "type": "string", "description": "The company name of organization." }, "companyAddress": { "type": "string", "description": "The company address of organization." }, "companyVat": { "type": "string", "description": "The company VAT of organization." }, "customUrl": { "type": "string", "description": "The URL of organization." }, "timezone": { "type": "string", "description": "The timezone of organization." }, "finance": { "type": "object", "properties": { "address": { "type": "object", "properties": { "city": { "type": "string" }, "country": { "type": "string" }, "line1": { "type": "string" }, "line2": { "type": "string" }, "postalCode": { "type": "string" }, "state": { "type": "string" } }, "required": [] } }, "required": [], "description": "Financial information of the organization." } }, "required": [ "companyName", "customUrl", "timezone" ] }, "example": { "companyName": "Infodeck", "companyVat": "VAT-XXXXX", "companyAddress": "Taipei City", "customUrl": "infodeck", "timezone": "Asia/Taipei", "finance": { "address": { "city": "Taipei", "country": "TW", "line1": "6F, No. 287, Section 3, Nanjing East Road", "line2": "Songshan District", "postalCode": "10595", "state": "Taipei City" } } }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" }, "awsAccountId": { "type": "string" }, "awsRegion": { "type": "string" }, "ownerEmail": { "type": "string" }, "emailDomain": { "type": "string" }, "customerId": { "type": "string" }, "customUrl": { "type": "string" }, "companyName": { "type": "string" }, "companyVat": { "type": "string" }, "companyAddress": { "type": "string" }, "iotEndpoint": { "type": "string" }, "timezone": { "type": "string" }, "statistics": { "type": "object", "properties": { "assetType": { "type": "number" }, "deck": { "type": "number" }, "eventRule": { "type": "number" }, "eventSchedule": { "type": "number" }, "integrationService": { "type": "number" }, "location": { "type": "number" }, "team": { "type": "number" }, "thing": { "type": "number" }, "user": { "type": "number" }, "workOrder": { "type": "number" }, "workRequest": { "type": "number" } }, "required": [ "assetType", "deck", "eventRule", "eventSchedule", "integrationService", "location", "team", "thing", "user", "workOrder", "workRequest" ] }, "subscriptionPlan": { "type": "string" }, "subscriptionStatus": { "type": "string" }, "finance": { "type": "object", "properties": { "email": { "type": "string" }, "phoneNumber": { "type": "string" }, "address": { "type": "object", "properties": { "city": { "type": "string" }, "country": { "type": "string" }, "line1": { "type": "string" }, "line2": { "type": "string" }, "postalCode": { "type": "string" }, "state": { "type": "string" } }, "required": [ "city", "country", "line1", "line2", "postalCode", "state" ] } }, "required": [ "email", "phoneNumber", "address" ] }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" } }, "required": [ "id", "type", "awsAccountId", "awsRegion", "ownerEmail", "emailDomain", "customerId", "customUrl", "companyName", "companyVat", "companyAddress", "iotEndpoint", "timezone", "statistics", "subscriptionPlan", "subscriptionStatus", "finance", "createdAtDateString", "createdAt" ], "description": "Data of the organization subscribed" } }, "required": [ "data" ] }, "example": { "data": { "id": "o-organizationId", "type": "MultiTenant", "awsAccountId": "965578212345", "awsRegion": "ap-northeast-1", "ownerEmail": "ownerEmail@infodeck.io", "emailDomain": "infodeck.io", "customerId": "acc_PniZJxxxxxxxxxxC", "customUrl": "infodeck", "companyName": "Infodeck", "companyVat": "VAT-XXXXX", "companyAddress": "Taipei City", "iotEndpoint": "a3m4oxxxxxxxxxx-ats.iot.ap-northeast-1.amazonaws.com", "timezone": "Asia/Taipei", "statistics": { "assetType": 2, "deck": 3, "eventRule": 0, "eventSchedule": 0, "integrationService": 1, "location": 2, "team": 0, "thing": 0, "user": 2, "workOrder": 0, "workRequest": 0 }, "subscriptionPlan": "price_1OyTQxxxxxxxxxxE", "subscriptionStatus": "active", "finance": { "email": "dev+paymenttest@infodeck.io", "phoneNumber": "+886912345678", "address": { "city": "Taipei", "country": "TW", "line1": "6F, No. 287, Section 3, Nanjing East Road", "line2": "Songshan District", "postalCode": "10595", "state": "Taiwan" } }, "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/users/{userId}": { "delete": { "summary": "Delete User", "description": "Delete user for organization", "operationId": "Organization.DeleteUser", "tags": [ "Organization" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "userId", "description": "The ID of user.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": {}, "required": [], "description": "Data of the user." } }, "required": [ "data" ] }, "example": { "data": { "deleted": true } }, "description": "" } } }, "400": { "description": "The request has invalid data.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has invalid data." }, "message": { "type": "string", "description": "The request has invalid data message." } }, "required": [ "error", "message" ] }, "example": { "error": "Bad Request", "message": "The request cannot be processed due to a bad request." }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "Get User", "description": "Get user for organization", "operationId": "Organization.GetUser", "tags": [ "Organization" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "userId", "description": "The ID of user.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "sub": { "type": "string" }, "organizationId": { "type": "string" }, "emailVerified": { "type": "string" }, "familyName": { "type": "string" }, "givenName": { "type": "string" }, "email": { "type": "string" }, "appRole": { "type": "string" }, "status": { "type": "string" }, "picture": { "type": "string" }, "team": {}, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "id", "sub", "organizationId", "emailVerified", "familyName", "givenName", "email", "appRole", "status", "team", "createdAtDateString", "createdAt", "updatedAtDateString", "updatedAt" ], "description": "Data of the user." } }, "required": [ "data" ] }, "example": { "data": { "id": "53abe59e-xxxx-xxxx-xxxx-11aa5d05dd6e", "sub": "53abe59e-xxxx-xxxx-xxxx-11aa5d05dd6e", "organizationId": "o-organizationId", "emailVerified": "true", "familyName": "Kevin", "givenName": "Ashton", "email": "example@infodeck.io", "appRole": "RequesterAndViewer", "status": "ACTIVE", "picture": "https://app.infodeck.io/public/organizations/o-orgId/users/userId/defaultimage.jpg", "teams": [ { "id": "t-teamId", "organizationId": "o-organizationId", "name": "Administrator Team", "description": "Administrator team created by the system, cannot be deleted", "users": [ "d59a2a9a-xxxx-xxxx-xxxx-4cc2186a01f1" ], "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000 } ], "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000, "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1706659200000 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/stats/api-calls": { "get": { "summary": "Get API Call Statistics", "description": "Get API call count per organization from CloudWatch Logs.\nQueries CloudWatch Logs Insights to count API requests for the organization.\nResults are cached for 1 hour to reduce CloudWatch Logs costs.", "operationId": "Organization.GetApiCallStats", "tags": [ "Organization" ], "parameters": [ { "name": "days", "description": "Number of days to query (7, 30, or 90)", "in": "query", "schema": { "type": "string", "enum": [ "\"7\"", "\"30\"", "\"90\"" ], "default": "30" }, "required": false }, { "name": "forceRefresh", "description": "Force refresh cache (bypass 1-hour cache)", "in": "query", "schema": { "type": "string", "enum": [ "\"true\"", "\"false\"" ] }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "totalRequests": { "type": "number", "description": "Total number of API requests in the period" }, "dailyAverage": { "type": "number", "description": "Average requests per day" }, "topEndpoints": { "type": "array", "items": { "type": "object", "properties": { "endpoint": { "type": "string" }, "count": { "type": "number" } }, "required": [ "endpoint", "count" ] }, "description": "Top 10 most called endpoints" }, "cachedAt": { "type": "number", "description": "Unix timestamp when data was fetched" }, "isCached": { "type": "boolean", "description": "Whether the response was served from cache" }, "queryDays": { "type": "number", "description": "Number of days queried" } }, "required": [ "totalRequests", "dailyAverage", "topEndpoints", "cachedAt", "isCached", "queryDays" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/invitations/{code}/context": { "get": { "summary": "Get Invitation Context", "description": "Returns display context for an invitation acceptance screen (org\n name + status, contractor company name + status, role label). Authenticated\n endpoint — the caller must be the invitee (email binding) or the request fails\n as 404. All invalid states (not found, wrong user, wrong org, used, canceled,\n expired) fold into a generic ResourceNotFoundError to avoid token-state\n enumeration. Auth: verifyOrganization only (not full RBAC), so pre-accept\n users who don't yet hold an OrgRoleAssignment can still fetch this context.", "operationId": "Organization.GetInvitationContext", "tags": [ "Organization" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "code", "description": "The code of invitation.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "organizationName": { "type": "string" }, "organizationStatus": { "type": "string" }, "contractorCompanyName": {}, "contractorCompanyStatus": {}, "actorRole": {}, "roleLabel": {} }, "required": [ "organizationName", "organizationStatus", "contractorCompanyName", "contractorCompanyStatus", "actorRole", "roleLabel" ], "description": "Display context for the invitation acceptance screen." } }, "required": [ "data" ] }, "example": { "data": { "organizationName": "Acme Facilities", "organizationStatus": "ACTIVE", "contractorCompanyName": "Steady Winds Contractor Co", "contractorCompanyStatus": "ACTIVE", "actorRole": "ContractorSupervisor", "roleLabel": "Service Partner Supervisor" } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/api/v2/organizations/{organizationId}/access-context": { "get": { "summary": "Get Organization Access Context", "description": "Get the authenticated user's access bootstrap context for the organization shell", "operationId": "Organization.GetOrganizationAccessContext", "tags": [ "Organization" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "organizationId": { "type": "string" }, "userId": { "type": "string" }, "status": { "type": "string" }, "actorRole": { "type": "string" }, "capabilityBundles": { "type": "array", "items": { "type": "string" } }, "effectiveCapabilityBundles": { "type": "array", "items": { "type": "string" } }, "siteScope": { "type": "array", "items": { "type": "string" } }, "contractorScope": { "type": "array", "items": { "type": "string" } }, "effectiveActions": { "type": "array", "items": { "type": "string" } }, "legacyRoles": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "roleId": { "type": "string" }, "name": { "type": "string" } }, "required": [ "id", "name" ] } } }, "required": [ "organizationId", "userId", "status", "capabilityBundles", "effectiveCapabilityBundles", "siteScope", "contractorScope", "effectiveActions", "legacyRoles" ], "description": "" } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/iot-endpoint-and-credentials": { "get": { "summary": "Get Organization IoT Endpoint And Credentials", "description": "Get Organization IoT Endpoint And Credentials", "operationId": "Organization.GetOrganizationIotEndpointAndCredentials", "tags": [ "Organization" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "awsRegion": { "type": "string" }, "iotEndpoint": { "type": "string" }, "credentials": { "type": "object", "properties": { "accessKeyId": { "type": "string" }, "secretAccessKey": { "type": "string" }, "sessionToken": { "type": "string" }, "expiration": { "type": "string" } }, "required": [ "accessKeyId", "secretAccessKey", "sessionToken", "expiration" ] } }, "required": [ "awsRegion", "iotEndpoint", "credentials" ], "description": "Data of the organization credentials." } }, "required": [ "data" ] }, "example": { "data": { "iotEndpoint": "a3m4oxxxxxxxxxx-ats.iot.ap-northeast-1.amazonaws.com", "awsRegion": "ap-northeast-1", "credentials": { "accessKeyId": "ABCDEFGHIJKLMNOPQRST", "secretAccessKey": "p9+7+f/ABCDEFGHIJKLMNO/ABCDEFGHIJKLMNOPQ", "sessionToken": "ABCDEFGHIJKLMNOPQRS//////////", "expiration": "2024-01-01T00:00:00.000Z" } } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/logo/upload-url": { "post": { "summary": "Get Organization Logo Upload URL", "description": "Return a presigned URL for organization logo upload.", "operationId": "Organization.GetOrganizationLogoUploadUrl", "tags": [ "Organization" ], "parameters": [], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "uploadUrl": { "type": "string", "description": "Presigned S3 upload URL" }, "s3Key": { "type": "string", "description": "S3 object key for the uploaded logo" }, "expiresIn": { "type": "number", "description": "URL expiration time in seconds" } }, "required": [ "uploadUrl", "s3Key", "expiresIn" ] }, "example": {}, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/usage": { "get": { "summary": "Get usage", "description": "Get usage for organization", "operationId": "Organization.GetUsage", "tags": [ "Organization" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "startDate", "description": "Start date for usage request.", "in": "query", "schema": { "type": "number" }, "required": true }, { "name": "endDate", "description": "End date for usage request.", "in": "query", "schema": { "type": "number" }, "required": true } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "usageSms": { "type": "number" }, "usageWhatsapp": { "type": "number" }, "usageEmail": { "type": "number" }, "usageSage": { "type": "number" } }, "required": [ "usageSms", "usageWhatsapp", "usageEmail", "usageSage" ], "description": "Organization usage object." } }, "required": [ "data" ] }, "example": { "data": { "usageSms": 1, "usageWhatsapp": 1, "usageEmail": 1, "usageSage": 1 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/stats/live": { "get": { "summary": "Get Live Usage Statistics", "description": "Get live entity counts from actual data sources in real-time,\nbypassing the cached organizationStatistics that has cross-account sync issues.\nResults are cached for 5 minutes to reduce load.", "operationId": "Organization.GetUsageStatisticsLive", "tags": [ "Organization" ], "parameters": [ { "name": "forceRefresh", "description": "Force refresh cache (bypass 5-min cache)", "in": "query", "schema": { "type": "string", "enum": [ "\"true\"", "\"false\"" ] }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "locations": { "type": "number", "description": "Total number of locations" }, "assetTypes": { "type": "number", "description": "Total number of asset types" }, "physicalAssets": { "type": "number", "description": "Total number of physical assets (non-IoT)" }, "iotAssets": { "type": "number", "description": "Total number of IoT-connected assets" }, "iotDevicesOnline": { "type": "number", "description": "Total number of IoT devices currently online" }, "members": { "type": "number", "description": "Total number of members/users" }, "teams": { "type": "number", "description": "Total number of teams" }, "deckboards": { "type": "number", "description": "Total number of deckboards" }, "smartWorkflows": { "type": "number", "description": "Total number of smart workflows (event rules)" }, "eventSchedules": { "type": "number", "description": "Total number of event schedules" }, "integrations": { "type": "number", "description": "Total number of integrations" }, "cachedAt": { "type": "number", "description": "Unix timestamp when data was fetched" }, "isCached": { "type": "boolean", "description": "Whether the response was served from cache" } }, "required": [ "locations", "assetTypes", "physicalAssets", "iotAssets", "iotDevicesOnline", "members", "teams", "deckboards", "smartWorkflows", "eventSchedules", "integrations", "cachedAt", "isCached" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/users/{userId}/labor-profile": { "get": { "summary": "Get User Labor Profile", "description": "Get labor profile for a user (hourly rate, overtime settings, loaded rate)", "operationId": "Organization.GetUserLaborProfile", "tags": [ "Organization" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "userId", "description": "User ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "hourlyRateCents": { "type": "number" }, "wageType": { "type": "string" }, "overtimeEnabled": { "type": "boolean" }, "overtimeMultiplier": { "type": "number" }, "dailyOvertimeThreshold": { "type": "number" }, "weeklyOvertimeThreshold": { "type": "number" }, "loadedRateMultiplier": { "type": "number" }, "effectiveDate": { "type": "number" }, "updatedBy": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "hourlyRateCents", "wageType", "effectiveDate", "updatedBy", "updatedAt" ], "description": "Labor profile object (null if not set)" } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } } }, "security": [ { "admin": [] } ] }, "put": { "summary": "Update User Labor Profile", "description": "Update labor profile for a user (hourly rate, overtime settings, loaded rate)", "operationId": "Organization.UpdateUserLaborProfile", "tags": [ "Organization" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "userId", "description": "User ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "hourlyRateCents": { "type": "number", "description": "Base hourly rate in cents (e.g., 6500 = $65.00)" }, "wageType": { "type": "string", "description": "Wage type: HOURLY, MONTHLY, or ANNUAL" }, "overtimeEnabled": { "type": "boolean", "description": "Whether overtime tracking is enabled" }, "overtimeMultiplier": { "type": "number", "description": "Overtime rate multiplier (e.g., 1.5 for time-and-a-half)" }, "dailyOvertimeThreshold": { "type": "number", "description": "Hours per day after which overtime kicks in (default: 8)" }, "weeklyOvertimeThreshold": { "type": "number", "description": "Hours per week after which overtime kicks in (default: 40)" }, "loadedRateMultiplier": { "type": "number", "description": "Loaded rate multiplier for true labor cost" }, "effectiveDate": { "type": "number", "description": "When this rate becomes effective (Unix timestamp)" } }, "required": [ "hourlyRateCents", "wageType", "effectiveDate" ] }, "example": {}, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": {}, "required": [], "description": "Updated labor profile" } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "admin": [] } ] } }, "/organizations/{organizationId}/users/{userId}/language-preference": { "get": { "summary": "Get User Language Preference", "description": "Get the user's preferred display language. Returns null if using organization default.", "operationId": "Organization.GetUserLanguagePreference", "tags": [ "Organization" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "userId", "description": "User ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "preferredLanguage": { "type": "string" } }, "required": [ "preferredLanguage" ], "description": "Language preference object" } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "put": { "summary": "Update User Language Preference", "description": "Update the user's preferred display language. Set to null to use organization default.", "operationId": "Organization.UpdateUserLanguagePreference", "tags": [ "Organization" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "userId", "description": "User ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "preferredLanguage": { "type": "string", "description": "Language code: 'en', 'zh-TW', 'ms', 'ta', or null to clear" } }, "required": [ "preferredLanguage" ] }, "example": {}, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "preferredLanguage": { "type": "string" } }, "required": [ "preferredLanguage" ], "description": "Updated language preference" } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/users/{userId}/notification-preferences": { "get": { "summary": "Get User Notification Preferences", "description": "Get notification preferences for a user (email and in-app settings for work orders, requests, forms, SLA, system events)", "operationId": "Organization.GetUserNotificationPreferences", "tags": [ "Organization" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "userId", "description": "User ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "workOrders": { "type": "object", "properties": {}, "required": [] }, "requests": { "type": "object", "properties": {}, "required": [] }, "forms": { "type": "object", "properties": {}, "required": [] }, "sla": { "type": "object", "properties": {}, "required": [] }, "system": { "type": "object", "properties": {}, "required": [] } }, "required": [ "workOrders", "requests", "forms", "sla", "system" ], "description": "Notification preferences object" } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "put": { "summary": "Update User Notification Preferences", "description": "Update notification preferences for a user", "operationId": "Organization.UpdateUserNotificationPreferences", "tags": [ "Organization" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "userId", "description": "User ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "notificationPreferences": { "type": "object", "properties": { "workOrders": { "type": "object", "properties": {}, "required": [] }, "requests": { "type": "object", "properties": {}, "required": [] }, "forms": { "type": "object", "properties": {}, "required": [] }, "sla": { "type": "object", "properties": {}, "required": [] }, "system": { "type": "object", "properties": {}, "required": [] } }, "required": [ "workOrders", "requests", "forms", "sla", "system" ], "description": "Complete notification preferences object" } }, "required": [ "notificationPreferences" ] }, "example": {}, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": {}, "required": [], "description": "Updated notification preferences" } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}": { "get": { "summary": "Get current user organization", "description": "Get current user organization", "operationId": "Organization.Get_current_user_organization", "tags": [ "Organization" ], "parameters": [ { "name": "organizationId", "description": "", "in": "path", "required": false, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" }, "awsAccountId": { "type": "string" }, "awsRegion": { "type": "string" }, "ownerEmail": { "type": "string" }, "emailDomain": { "type": "string" }, "customerId": { "type": "string" }, "customUrl": { "type": "string" }, "companyName": { "type": "string" }, "companyVat": { "type": "string" }, "companyAddress": { "type": "string" }, "iotEndpoint": { "type": "string" }, "timezone": { "type": "string" }, "statistics": { "type": "object", "properties": {}, "required": [] }, "subscriptionPlan": { "type": "string" }, "subscriptionStatus": { "type": "string" }, "finance": { "type": "object", "properties": { "email": { "type": "string" }, "phoneNumber": { "type": "string" }, "address": { "type": "object", "properties": { "city": { "type": "string" }, "country": { "type": "string" }, "line1": { "type": "string" }, "line2": { "type": "string" }, "postalCode": { "type": "string" }, "state": { "type": "string" } }, "required": [ "city", "country", "line1", "line2", "postalCode", "state" ] } }, "required": [ "email", "phoneNumber", "address" ] }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "id", "type", "awsAccountId", "awsRegion", "ownerEmail", "emailDomain", "customerId", "customUrl", "companyName", "companyVat", "companyAddress", "iotEndpoint", "timezone", "statistics", "subscriptionPlan", "subscriptionStatus", "finance", "createdAtDateString", "createdAt", "updatedAtDateString", "updatedAt" ], "description": "Data of the organization." } }, "required": [ "data" ] }, "example": { "data": { "id": "o-organizationId", "type": "MultiTenant", "awsAccountId": "965578212345", "awsRegion": "ap-northeast-1", "ownerEmail": "ownerEmail@infodeck.io", "emailDomain": "infodeck.io", "customerId": "acc_PniZJxxxxxxxxxxC", "customUrl": "infodeck", "companyName": "Infodeck", "companyVat": "VAT-XXXXX", "companyAddress": "Taipei City", "iotEndpoint": "a3m4oxxxxxxxxxx-ats.iot.ap-northeast-1.amazonaws.com", "timezone": "Asia/Taipei", "statistics": { "assetType": 2, "deck": 3, "eventRule": 0, "eventSchedule": 0, "integrationService": 1, "location": 2, "team": 0, "thing": 0, "user": 2, "workOrder": 0, "workRequest": 0 }, "subscriptionPlan": "price_1OyTQxxxxxxxxxxE", "subscriptionStatus": "active", "finance": { "email": "dev+paymenttest@infodeck.io", "phoneNumber": "+886912345678", "address": { "city": "Taipei", "country": "TW", "line1": "6F, No. 287, Section 3, Nanjing East Road", "line2": "Songshan District", "postalCode": "10595", "state": "Taiwan" } }, "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000, "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1706659200000 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "put": { "summary": "Update Organization", "description": "Update Organization", "operationId": "Organization.UpdateOrganization", "tags": [ "Organization" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "companyName": { "type": "string", "description": "The company name of organization." }, "companyVat": { "type": "string", "description": "The company VAT of organization." }, "customUrl": { "type": "string", "description": "The URL of organization." }, "companyAddress": { "type": "string", "description": "The address of organization." }, "currency": { "type": "string", "description": "The currency code (ISO 4217) for labor cost calculations. Supported: USD, CAD, MXN, BRL, ARS, EUR, GBP, CHF, SEK, NOK, PLN, SGD, MYR, TWD, AUD, NZD, JPY, CNY, HKD, INR, KRW, AED, ZAR." }, "notificationFooterText": { "type": "string", "description": "Optional org-branded footer text used in tracking and notification emails." }, "finance": { "type": "object", "properties": { "phoneNumber": { "type": "string" }, "email": { "type": "string" }, "address": { "type": "object", "properties": { "city": { "type": "string" }, "country": { "type": "string" }, "line1": { "type": "string" }, "line2": { "type": "string" }, "postalCode": { "type": "string" }, "state": { "type": "string" } }, "required": [] } }, "required": [], "description": "Financial information of the organization (optional)." } }, "required": [ "companyName", "customUrl" ] }, "example": { "companyName": "Infodeck", "companyVat": "VAT-XXXXX", "companyAddress": "Taipei City", "customUrl": "infodeck", "timezone": "Asia/Taipei" }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" }, "awsAccountId": { "type": "string" }, "awsRegion": { "type": "string" }, "ownerEmail": { "type": "string" }, "emailDomain": { "type": "string" }, "customerId": { "type": "string" }, "customUrl": { "type": "string" }, "companyName": { "type": "string" }, "companyVat": { "type": "string" }, "companyAddress": { "type": "string" }, "iotEndpoint": { "type": "string" }, "timezone": { "type": "string" }, "statistics": { "type": "object", "properties": {}, "required": [] }, "subscriptionPlan": { "type": "string" }, "subscriptionStatus": { "type": "string" }, "finance": { "type": "object", "properties": { "email": { "type": "string" }, "phoneNumber": { "type": "string" }, "address": { "type": "object", "properties": { "city": { "type": "string" }, "country": { "type": "string" }, "line1": { "type": "string" }, "line2": { "type": "string" }, "postalCode": { "type": "string" }, "state": { "type": "string" } }, "required": [ "city", "country", "line1", "line2", "postalCode", "state" ] } }, "required": [ "email", "phoneNumber", "address" ] }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "id", "type", "awsAccountId", "awsRegion", "ownerEmail", "emailDomain", "customerId", "customUrl", "companyName", "companyVat", "companyAddress", "iotEndpoint", "timezone", "statistics", "subscriptionPlan", "subscriptionStatus", "finance", "updatedAtDateString", "updatedAt" ], "description": "Data of the organization." } }, "required": [ "data" ] }, "example": { "data": { "id": "o-organizationId", "type": "MultiTenant", "awsAccountId": "965578212345", "awsRegion": "ap-northeast-1", "ownerEmail": "ownerEmail@infodeck.io", "emailDomain": "infodeck.io", "customerId": "acc_PniZJxxxxxxxxxxC", "customUrl": "infodeck", "companyName": "Infodeck", "companyVat": "VAT-XXXXX", "companyAddress": "Taipei City", "iotEndpoint": "a3m4oxxxxxxxxxx-ats.iot.ap-northeast-1.amazonaws.com", "timezone": "Asia/Taipei", "statistics": { "assetType": 2, "deck": 3, "eventRule": 0, "eventSchedule": 0, "integrationService": 1, "location": 2, "team": 0, "thing": 0, "user": 2, "workOrder": 0, "workRequest": 0 }, "subscriptionPlan": "price_1OyTQxxxxxxxxxxE", "subscriptionStatus": "active", "finance": { "email": "dev+paymenttest@infodeck.io", "phoneNumber": "+886912345678", "address": { "city": "Taipei", "country": "TW", "line1": "6F, No. 287, Section 3, Nanjing East Road", "line2": "Songshan District", "postalCode": "10595", "state": "Taiwan" } }, "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1706659200000 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/stats": { "get": { "summary": "List Stats", "description": "List stats for organization", "operationId": "Organization.ListStats", "tags": [ "Organization" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "assetType": { "type": "number" }, "deck": { "type": "number" }, "eventRule": { "type": "number" }, "eventSchedule": { "type": "number" }, "integrationService": { "type": "number" }, "location": { "type": "number" }, "team": { "type": "number" }, "thing": { "type": "number" }, "user": { "type": "number" }, "workOrder": { "type": "number" }, "workRequest": { "type": "number" } }, "required": [ "assetType", "deck", "eventRule", "eventSchedule", "integrationService", "location", "team", "thing", "user", "workOrder", "workRequest" ], "description": "Organization stats object." } }, "required": [ "data" ] }, "example": { "data": { "assetType": 0, "deck": 0, "eventRule": 0, "eventSchedule": 0, "integrationService": 0, "location": 0, "team": 0, "thing": 0, "user": 0, "workOrder": 0, "workRequest": 0 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/teams": { "get": { "summary": "List Teams", "description": "List teams for organization", "operationId": "Organization.ListTeams", "tags": [ "Organization" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "maxResults", "description": "The maximum number of results to return.", "in": "query", "schema": { "type": "number", "minimum": 10, "maximum": 100 }, "required": false }, { "name": "nextToken", "description": "To retrieve the next set of results.", "in": "query", "schema": { "type": "string" }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "organizationId": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "user": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "email": { "type": "string" }, "firstName": { "type": "string" }, "lastName": { "type": "string" } }, "required": [ "id", "email", "firstName", "lastName" ] } }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "id", "organizationId", "name", "description", "user", "createdAtDateString", "createdAt", "updatedAtDateString", "updatedAt" ] }, "description": "Array of team data objects." } }, "required": [ "data" ] }, "example": { "data": [ { "id": "6d708f0e-xxxx-xxxx-xxxx-f0d9c59488ef", "organizationId": "o-organizationId", "name": "IDT-Team", "description": "IDT-Team-Description", "user": [ { "id": "53abe59e-xxxx-xxxx-xxxx-11aa5d05dd6e", "email": "example@infodeck.io", "firstName": "Ashton", "lastName": "Kevin" } ], "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000, "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1706659200000 } ] }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "post": { "summary": "Create Team", "description": "Create team for organization", "operationId": "Organization_Team.CreateTeam", "tags": [ "Organization Team" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of team." }, "description": { "type": "string", "description": "The description of team." }, "image": { "type": "string", "description": "The image file name of team." } }, "required": [ "name", "description" ] }, "example": { "name": "IDT-Team", "description": "IDT-Team-Description", "image": "image.png" }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "organizationId": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" } }, "required": [ "id", "organizationId", "name", "description", "createdAtDateString", "createdAt" ], "description": "Data of the team." } }, "required": [ "data" ] }, "example": { "data": { "id": "6d708f0e-xxxx-xxxx-xxxx-f0d9c59488ef", "organizationId": "o-organizationId", "name": "IDT-Team", "description": "IDT-Team-Description", "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/users": { "get": { "summary": "List Users", "description": "List users for organization", "operationId": "Organization.ListUsers", "tags": [ "Organization" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "joinRequest", "description": "Return join request users.", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "maxResults", "description": "The maximum number of results to return.", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "nextToken", "description": "To retrieve the next set of results.", "in": "query", "schema": { "type": "string" }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "sub": { "type": "string" }, "organizationId": { "type": "string" }, "emailVerified": { "type": "string" }, "familyName": { "type": "string" }, "givenName": { "type": "string" }, "email": { "type": "string" }, "appRole": { "type": "string" }, "status": { "type": "string" }, "picture": { "type": "string" }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "id", "sub", "organizationId", "emailVerified", "familyName", "givenName", "email", "appRole", "status", "createdAtDateString", "createdAt", "updatedAtDateString", "updatedAt" ] }, "description": "Array of user data objects." } }, "required": [ "data" ] }, "example": { "data": [ { "id": "53abe59e-xxxx-xxxx-xxxx-11aa5d05dd6e", "sub": "53abe59e-xxxx-xxxx-xxxx-11aa5d05dd6e", "organizationId": "o-organizationId", "emailVerified": "true", "familyName": "Kevin", "givenName": "Ashton", "email": "example@infodeck.io", "appRole": "RequesterAndViewer", "status": "ACTIVE", "picture": "https://app.infodeck.io/public/organizations/o-orgId/users/userId/defaultimage.jpg", "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000, "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1706659200000 } ] }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/teams/{teamId}/users": { "get": { "summary": "List Users In Team", "description": "List users in team for organization", "operationId": "Organization.ListUsersInTeam", "tags": [ "Organization" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "teamId", "description": "The ID of team.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "maxResults", "description": "The maximum number of results to return.", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "nextToken", "description": "To retrieve the next set of results.", "in": "query", "schema": { "type": "string" }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "sub": { "type": "string" }, "organizationId": { "type": "string" }, "emailVerified": { "type": "string" }, "familyName": { "type": "string" }, "givenName": { "type": "string" }, "email": { "type": "string" }, "appRole": { "type": "string" }, "status": { "type": "string" }, "picture": { "type": "string" }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "id", "sub", "organizationId", "emailVerified", "familyName", "givenName", "email", "appRole", "status", "createdAtDateString", "createdAt", "updatedAtDateString", "updatedAt" ] }, "description": "Array of user data objects within a team." } }, "required": [ "data" ] }, "example": { "data": [ { "id": "53abe59e-xxxx-xxxx-xxxx-11aa5d05dd6e", "sub": "53abe59e-xxxx-xxxx-xxxx-11aa5d05dd6e", "organizationId": "o-organizationId", "emailVerified": "true", "familyName": "Kevin", "givenName": "Ashton", "email": "example@infodeck.io", "appRole": "RequesterAndViewer", "status": "ACTIVE", "picture": "https://app.infodeck.io/public/organizations/o-orgId/users/userId/defaultimage.jpg", "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000, "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1706659200000 } ] }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/teams/{teamId}": { "put": { "summary": "Update Team", "description": "Update team for organization", "operationId": "Organization.UpdateTeam", "tags": [ "Organization" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "teamId", "description": "The ID of team", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of team." }, "description": { "type": "string", "description": "The description of team." }, "image": { "type": "string", "description": "The image file name of team." } }, "required": [ "name", "description" ] }, "example": { "name": "IDT-Team", "description": "IDT-Team-Description", "image": "image.png" }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "organizationId": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" }, "updatedAtDateString": { "type": "string" }, "updatedAt": {} }, "required": [ "id", "organizationId", "name", "description", "createdAtDateString", "createdAt", "updatedAtDateString", "updatedAt" ], "description": "Data of the team." } }, "required": [ "data" ] }, "example": { "data": { "id": "6d708f0e-xxxx-xxxx-xxxx-f0d9c59488ef", "organizationId": "o-organizationId", "name": "IDT-Team", "description": "IDT-Team-Description", "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1706659200000 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "delete": { "summary": "Delete Team", "description": "Delete team for organization", "operationId": "Organization_Team.DeleteTeam", "tags": [ "Organization Team" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "teamId", "description": "The ID of team.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": {}, "required": [], "description": "Data of the team." } }, "required": [ "data" ] }, "example": { "data": { "deleted": true } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "Get team", "description": "Get team for organization", "operationId": "Organization_Team.GetTeam", "tags": [ "Organization Team" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "teamId", "description": "The ID of team.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "organizationId": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "user": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "email": { "type": "string" }, "firstName": { "type": "string" }, "lastName": { "type": "string" } }, "required": [ "id", "email", "firstName", "lastName" ] } }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "id", "organizationId", "name", "description", "user", "createdAtDateString", "createdAt", "updatedAtDateString", "updatedAt" ], "description": "Data of the team." } }, "required": [ "data" ] }, "example": { "data": { "id": "6d708f0e-xxxx-xxxx-xxxx-f0d9c59488ef", "organizationId": "o-organizationId", "name": "IDT-Team", "description": "IDT-Team-Description", "user": [ { "id": "53abe59e-xxxx-xxxx-xxxx-11aa5d05dd6e", "email": "example@infodeck.io", "firstName": "Ashton", "lastName": "Kevin" } ], "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000, "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1706659200000 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/users/{userId}/status": { "put": { "summary": "Update User Status", "description": "Update status for organization user", "operationId": "Organization.UpdateUserStatus", "tags": [ "Organization" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "userId", "description": "The ID of user.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "description": "SUCCESS, CONFIRM_JOIN, PENDING_ACCEPT." } }, "required": [ "status" ] }, "example": { "status": "CONFIRM_JOIN" }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": {}, "required": [], "description": "Status of the user." } }, "required": [ "data" ] }, "example": { "data": { "status": "CONFIRM_JOIN" } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/add-ons": { "get": { "summary": "Get add-ons for organization", "description": "Get add-ons for organization", "operationId": "Organization_Addons.GetAddOnsForOrganization", "tags": [ "Organization Addons" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "infodeckLns": { "type": "object", "properties": { "status": { "type": "string" }, "tenantId": { "type": "string" }, "apiKey": { "type": "string" } }, "required": [ "status", "tenantId", "apiKey" ] }, "anyFeedback": { "type": "object", "properties": { "status": { "type": "string" } }, "required": [ "status" ] } }, "required": [ "infodeckLns", "anyFeedback" ], "description": "Data container for the add-ons information." } }, "required": [ "data" ] }, "example": { "data": { "infodeckLns": { "status": "Success", "tenantId": "b004ebe0-xxxx-xxxx-xxxx-dacd251b6f00", "apiKey": "eyJ0exxxxxxxxxx4" }, "anyFeedback": { "status": "Success" } } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "put": { "summary": "Update add-ons for organization", "description": "Update add-ons for organization", "operationId": "Organization_Addons.UpdateAddOnsForOrganization", "tags": [ "Organization Addons" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "infodeckLns": { "type": "object", "properties": { "status": { "type": "string" }, "tenantId": { "type": "string" }, "apiKey": { "type": "string" } }, "required": [ "status", "tenantId", "apiKey" ], "description": "The infodeckLns of organization." }, "anyFeedback": { "type": "object", "properties": { "status": { "type": "string" } }, "required": [ "status" ], "description": "The anyFeedback of organization." } }, "required": [ "infodeckLns", "anyFeedback" ] }, "example": { "infodeckLns": { "status": "Success", "tenantId": "52f14cd4-xxxx-xxxx-xxxx-4025e1d49242", "apiKey": "eyJ0xxxxxxxxxxxxxxxxxxxxxx4" }, "anyFeedback": { "status": "Success" } }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "infodeckLns": { "type": "object", "properties": { "status": { "type": "string" }, "tenantId": { "type": "string" }, "apiKey": { "type": "string" } }, "required": [ "status", "tenantId", "apiKey" ] }, "anyFeedback": { "type": "object", "properties": { "status": { "type": "string" } }, "required": [ "status" ] } }, "required": [ "infodeckLns", "anyFeedback" ], "description": "Data container for the add-ons information." } }, "required": [ "data" ] }, "example": { "data": { "infodeckLns": { "status": "Success", "tenantId": "b004ebe0-xxxx-xxxx-xxxx-dacd251b6f00", "apiKey": "eyJ0exxxxxxxxxx4" }, "anyFeedback": { "status": "Success" } } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/entitlements": { "get": { "summary": "Get Entitlements", "description": "Get organization entitlements (feature flags and limits) from DynamoDB.\nThis is the source of truth for frontend feature gating.", "operationId": "Organization_Entitlements.GetEntitlements", "tags": [ "Organization Entitlements" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "subscriptionStatus": { "type": "string" }, "planId": { "type": "string" }, "planName": { "type": "string" }, "trialEndsAt": { "type": "number" }, "gracePeriodEndsAt": { "type": "number" }, "readOnlyStartedAt": { "type": "number" }, "currentPeriodEnd": { "type": "number" }, "subscriptionStartedAt": { "type": "number" }, "subscriptionEndsAt": { "type": "number" }, "limits": { "type": "object", "properties": { "maxUsers": {}, "maxAssets": {}, "maxLocations": {}, "maxWorkOrdersPerMonth": {}, "maxForms": {}, "maxStorageBytes": {}, "maxApiCallsPerMonth": {}, "maxSmsPerMonth": {}, "maxWhatsappPerMonth": {} }, "required": [ "maxUsers", "maxAssets", "maxLocations", "maxWorkOrdersPerMonth", "maxForms", "maxStorageBytes", "maxApiCallsPerMonth", "maxSmsPerMonth", "maxWhatsappPerMonth" ] }, "features": { "type": "object", "properties": { "workOrdersEnabled": { "type": "boolean" }, "assetsEnabled": { "type": "boolean" }, "iotEnabled": { "type": "boolean" }, "advancedReportingEnabled": { "type": "boolean" }, "customFormsEnabled": { "type": "boolean" }, "apiAccessEnabled": { "type": "boolean" }, "ssoEnabled": { "type": "boolean" }, "whiteLabelEnabled": { "type": "boolean" }, "multiLocationEnabled": { "type": "boolean" }, "slaEnabled": { "type": "boolean" }, "smartWorkflowsEnabled": { "type": "boolean" } }, "required": [ "workOrdersEnabled", "assetsEnabled", "iotEnabled", "advancedReportingEnabled", "customFormsEnabled", "apiAccessEnabled", "ssoEnabled", "whiteLabelEnabled", "multiLocationEnabled", "slaEnabled", "smartWorkflowsEnabled" ] }, "canAccess": { "type": "boolean" } }, "required": [ "subscriptionStatus", "planId", "planName", "limits", "features", "canAccess" ], "description": "Entitlements data" } }, "required": [ "data" ] }, "example": { "data": { "subscriptionStatus": "active", "planId": "pro-annual", "planName": "Professional", "currentPeriodEnd": 1736899200000, "limits": { "maxUsers": 25, "maxAssets": 500, "maxLocations": 5, "maxWorkOrdersPerMonth": null, "maxForms": 50, "maxStorageBytes": 10737418240, "maxApiCallsPerMonth": 100000, "maxSmsPerMonth": 100, "maxWhatsappPerMonth": 500 }, "features": { "workOrdersEnabled": true, "assetsEnabled": true, "iotEnabled": true, "advancedReportingEnabled": true, "customFormsEnabled": true, "apiAccessEnabled": true, "ssoEnabled": false, "whiteLabelEnabled": false, "multiLocationEnabled": true, "slaEnabled": true, "smartWorkflowsEnabled": true }, "canAccess": true } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } } }, "security": [] } }, "/organizations/{organizationId}/subscription": { "get": { "summary": "Get Subscription", "description": "Get Subscription", "operationId": "Organization_Stripe.GetSubscription", "tags": [ "Organization Stripe" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "organizationId": { "type": "string" }, "customerId": { "type": "string" }, "plan": { "type": "object", "properties": { "active": { "type": "boolean" }, "aggregate_usage": { "type": "string" }, "amount": { "type": "number" }, "amount_decimal": { "type": "string" }, "billing_scheme": { "type": "string" }, "created_at": { "type": "number" }, "currency": { "type": "string" }, "id": { "type": "string" }, "interval": { "type": "string" }, "interval_count": { "type": "number" }, "livemode": { "type": "boolean" }, "metadata": { "type": "object", "properties": {}, "required": [] }, "nickname": { "type": "string" }, "object": { "type": "string" }, "product": { "type": "string" }, "tiers_mode": { "type": "string" }, "transform_usage": { "type": "object", "properties": {}, "required": [] }, "trial_period_days": { "type": "number" }, "usage_type": { "type": "string" } }, "required": [ "active", "aggregate_usage", "amount", "amount_decimal", "billing_scheme", "created_at", "currency", "id", "interval", "interval_count", "livemode", "metadata", "nickname", "object", "product", "tiers_mode", "transform_usage", "trial_period_days", "usage_type" ] }, "planId": { "type": "string" }, "price": { "type": "object", "properties": { "active": { "type": "boolean" }, "billing_scheme": { "type": "string" }, "created_at": { "type": "number" }, "currency": { "type": "string" }, "custom_unit_amount": { "type": "string" }, "id": { "type": "string" }, "livemode": { "type": "boolean" }, "lookup_key": { "type": "string" }, "metadata": { "type": "object", "properties": {}, "required": [] }, "nickname": { "type": "string" }, "object": { "type": "string" }, "product": { "type": "string" }, "recurring": { "type": "object", "properties": { "aggregate_usage": { "type": "string" }, "interval": { "type": "string" }, "interval_count": { "type": "number" }, "usage_type": { "type": "string" } }, "required": [ "aggregate_usage", "interval", "interval_count", "usage_type" ] }, "tax_behavior": { "type": "string" }, "tiers_mode": { "type": "number" }, "transform_quantity": { "type": "object", "properties": {}, "required": [] }, "type": { "type": "string" }, "unit_amount": { "type": "number" }, "unit_amount_decimal": { "type": "string" } }, "required": [ "active", "billing_scheme", "created_at", "currency", "custom_unit_amount", "id", "livemode", "lookup_key", "metadata", "nickname", "object", "product", "recurring", "tax_behavior", "tiers_mode", "transform_quantity", "type", "unit_amount", "unit_amount_decimal" ] }, "priceId": { "type": "string" }, "status": { "type": "string" }, "subscription": { "type": "object", "properties": { "application": { "type": "string" }, "application_fee_percent": { "type": "string" }, "automatic_tax": { "type": "object", "properties": { "enabled": { "type": "object", "properties": {}, "required": [] }, "liability": { "type": "object", "properties": {}, "required": [] } }, "required": [ "enabled", "liability" ] }, "billing_cycle_anchor": { "type": "number" }, "billing_cycle_anchor_config": { "type": "string" }, "billing_thresholds": { "type": "string" }, "canceled_at": { "type": "string" }, "cancellation_details": { "type": "object", "properties": { "comment": { "type": "string" }, "feedback": { "type": "string" }, "reason": { "type": "string" } }, "required": [ "comment", "feedback", "reason" ] }, "cancel_at": { "type": "string" }, "cancel_at_period_end": { "type": "boolean" }, "collection_method": { "type": "string" }, "created": { "type": "number" }, "currency": { "type": "string" }, "current_period_end": { "type": "number" }, "current_period_start": { "type": "number" }, "days_until_due": { "type": "string" }, "default_payment_method": { "type": "string" }, "default_source": { "type": "string" }, "default_tax_rates": { "type": "string" }, "description": { "type": "string" }, "discount": { "type": "string" }, "ended_at": { "type": "string" }, "invoice_settings": { "type": "object", "properties": { "account_tax_ids": { "type": "string" }, "issuer": { "type": "object", "properties": { "type": { "type": "string" } }, "required": [ "type" ] } }, "required": [ "account_tax_ids", "issuer" ] }, "latest_invoice": { "type": "string" }, "livemode": { "type": "boolean" }, "metadata": { "type": "object", "properties": {}, "required": [] }, "next_pending_invoice_item_invoice": { "type": "string" }, "object": { "type": "string" }, "on_behalf_of": { "type": "string" }, "pause_collection": { "type": "string" }, "payment_settings": { "type": "object", "properties": { "payment_method_options": { "type": "string" }, "payment_method_types": { "type": "string" }, "save_default_payment_method": { "type": "string" } }, "required": [ "payment_method_options", "payment_method_types", "save_default_payment_method" ] }, "pending_invoice_item_interval": { "type": "string" }, "pending_setup_intent": { "type": "string" }, "pending_update": { "type": "string" }, "quantity": { "type": "number" }, "schedule": { "type": "string" }, "start_date": { "type": "number" }, "status": { "type": "string" }, "test_clock": { "type": "string" }, "transfer_data": { "type": "string" }, "trial_end": { "type": "number" }, "trial_settings": { "type": "object", "properties": { "end_behavior": { "type": "object", "properties": { "missing_payment_method": { "type": "string" } }, "required": [ "missing_payment_method" ] } }, "required": [ "end_behavior" ] }, "trial_start": { "type": "number" } }, "required": [ "application", "application_fee_percent", "automatic_tax", "billing_cycle_anchor", "billing_cycle_anchor_config", "billing_thresholds", "canceled_at", "cancellation_details", "cancel_at", "cancel_at_period_end", "collection_method", "created", "currency", "current_period_end", "current_period_start", "days_until_due", "default_payment_method", "default_source", "default_tax_rates", "description", "discount", "ended_at", "invoice_settings", "latest_invoice", "livemode", "metadata", "next_pending_invoice_item_invoice", "object", "on_behalf_of", "pause_collection", "payment_settings", "pending_invoice_item_interval", "pending_setup_intent", "pending_update", "quantity", "schedule", "start_date", "status", "test_clock", "transfer_data", "trial_end", "trial_settings", "trial_start" ] }, "subscriptionId": { "type": "string" }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "organizationId", "customerId", "plan", "planId", "price", "priceId", "status", "subscription", "subscriptionId", "createdAtDateString", "createdAt", "updatedAtDateString", "updatedAt" ], "description": "Data of the organization subscription." } }, "required": [ "data" ] }, "example": { "data": { "organizationId": "o-organizationId", "createdAt": 1704067200000, "customerId": "acc_PoBsnxxxxxxxxxxE", "plan": { "active": true, "aggregate_usage": null, "amount": 60000, "amount_decimal": "60000", "billing_scheme": "per_unit", "created": 1710000000, "currency": "usd", "id": "price_1OwL8xxxxxxxxxx6", "interval": "month", "interval_count": 1, "livemode": false, "metadata": { "LOL": "PEANUT" }, "nickname": null, "object": "plan", "product": { "active": true, "attributes": [], "created": 1710000000, "default_price": "price_1OwL85xxxxxxxxxx6", "description": "Regular plan with limitations", "features": [ { "name": "No priority support" } ], "id": "prod_PlstGxxxxxxxxxxTM", "images": [ "https://example.com/images/product.png" ], "livemode": false, "metadata": { "MAX_LIMIT_DECK": "3" }, "name": "Basic Plan", "object": "product", "package_dimensions": null, "shippable": null, "statement_descriptor": null, "tax_code": "txcd_10103001", "type": "service", "unit_label": null, "updated": 1720000000, "url": null }, "tiers_mode": null, "transform_usage": null, "trial_period_days": null, "usage_type": "licensed" }, "planId": "price_1OwL8xxxxxxxxxx6", "price": { "active": true, "billing_scheme": "per_unit", "created": 1710000000, "currency": "usd", "custom_unit_amount": null, "id": "price_1OwL8xxxxxxxxxx6", "livemode": false, "lookup_key": null, "metadata": { "LOL": "PEANUT" }, "nickname": null, "object": "price", "product": "prod_PlstGxxxxxxxxxxM", "recurring": { "aggregate_usage": null, "interval": "month", "interval_count": 1, "trial_period_days": null, "usage_type": "licensed" }, "tax_behavior": "unspecified", "tiers_mode": null, "transform_quantity": null, "type": "recurring", "unit_amount": 60000, "unit_amount_decimal": "60000" }, "priceId": "price_1OwL8xxxxxxxxxx6", "status": "trialing", "subscription": { "application": null, "application_fee_percent": null, "automatic_tax": { "enabled": false, "liability": null }, "billing_cycle_anchor": 1720000000, "billing_cycle_anchor_config": null, "billing_thresholds": null, "canceled_at": null, "cancellation_details": { "comment": null, "feedback": null, "reason": null }, "cancel_at": null, "cancel_at_period_end": false, "collection_method": "charge_automatically", "created": 1710000000, "currency": "usd", "current_period_end": 1720000000, "current_period_start": 1710000000, "days_until_due": null, "default_payment_method": null, "default_source": null, "default_tax_rates": [], "description": null, "discount": null, "ended_at": null, "invoice_settings": { "account_tax_ids": null, "issuer": { "type": "self" } }, "latest_invoice": "in_1OyZUxxxxxxxxxxt", "livemode": false, "metadata": {}, "next_pending_invoice_item_invoice": null, "object": "subscription", "on_behalf_of": null, "pause_collection": null, "payment_settings": { "payment_method_options": null, "payment_method_types": null, "save_default_payment_method": "off" }, "pending_invoice_item_interval": null, "pending_setup_intent": "seti_1OyZUxxxxxxxxxxV", "pending_update": null, "quantity": 1, "schedule": null, "start_date": 1710000000, "status": "trialing", "test_clock": "clock_1OymAxxxxxxxxxx9", "transfer_data": null, "trial_end": 1720000000, "trial_settings": { "end_behavior": { "missing_payment_method": "cancel" } }, "trial_start": 1710000000 }, "subscriptionId": "sub_1OyZUxxxxxxxxxxX", "createdAtDateString": "2024-01-01T00:00:00.000Z", "created": 1720000000000, "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1720000000000 } }, "description": "" } } }, "400": { "description": "The request has invalid data.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has invalid data." }, "message": { "type": "string", "description": "The request has invalid data message." } }, "required": [ "error", "message" ] }, "example": { "error": "Bad Request", "message": "The request cannot be processed due to a bad request." }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [] } }, "/organizations/{organizationId}/permissions": { "get": { "summary": "List permissions", "description": "List Permissions", "operationId": "Permissions.ListPermissions", "tags": [ "Permissions" ], "parameters": [ { "name": "organizationId", "description": "", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "maxResults", "description": "The maximum number of results to return.", "in": "query", "schema": { "type": "number", "minimum": 10, "maximum": 100 }, "required": false }, { "name": "nextToken", "description": "To retrieve the next set of results.", "in": "query", "schema": { "type": "string" }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "description": { "type": "string" }, "groups": { "type": "array", "items": { "type": "string" } }, "categoryId": { "type": "string" }, "actionId": { "type": "string" }, "createdAt": { "type": "number" }, "updatedAt": { "type": "number" }, "createdBy": { "type": "string" }, "updatedBy": { "type": "string" } }, "required": [ "id", "description", "groups", "categoryId", "actionId", "createdAt", "updatedAt", "createdBy", "updatedBy" ] }, "description": "Array of permission objects, each representing a specific set of permissions granted or available." } }, "required": [ "data" ] }, "example": { "data": [ { "id": "prm-lns:tenants:device-profiles:delete", "description": "Permission to delete lns:tenants:device-profiles", "groups": [ "Team can Manage Assets, Asset type, Integrations, Smart workflows and Infodeck LNS" ], "categoryId": "lns", "actionId": "lns:tenants:device-profiles:delete", "createdAt": 1714365479329, "updatedAt": 1714365479329, "createdBy": "system", "updatedBy": "system" } ] }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/reservable/policies": { "post": { "summary": "Create Reservable Policy", "description": "Creates a new reservable policy for the organization. The policy scope\ndetermines where it applies (ORG_DEFAULT, a specific location node, or a specific resource).", "operationId": "ReservablePolicy.CreateReservablePolicy", "tags": [ "ReservablePolicy" ], "parameters": [ { "name": "organizationId", "description": "Organization's unique ID.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "Policy display name." }, "description": { "type": "string", "description": "Optional description." }, "isActive": { "type": "boolean", "default": "true", "description": "Whether the policy is active." }, "appliesToKinds": { "type": "array", "items": { "type": "string" }, "description": "Resource kinds this policy applies to (SPACE, ASSET)." }, "scope": { "type": "object", "properties": { "type": { "type": "string" }, "nodeId": { "type": "string" }, "resourceId": { "type": "string" } }, "required": [ "type" ], "description": "Policy scope definition." }, "shared": { "type": "object", "properties": {}, "required": [], "description": "Shared booking rules applied to all resource kinds." }, "spaceRules": { "type": "object", "properties": {}, "required": [], "description": "Space-specific booking rules." }, "assetRules": { "type": "object", "properties": {}, "required": [], "description": "Asset-specific booking rules." } }, "required": [ "name", "appliesToKinds", "scope", "shared" ] }, "example": {}, "description": "" } }, "required": true }, "responses": { "201": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": {}, "required": [], "description": "Created policy object." } }, "required": [ "data" ] }, "example": {}, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "List Reservable Policies", "description": "Returns all reservable policies for the organization. Results are filtered\nby the caller's RBAC authorizer when present.", "operationId": "ReservablePolicy.ListReservablePolicies", "tags": [ "ReservablePolicy" ], "parameters": [ { "name": "organizationId", "description": "Organization's unique ID.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] }, "description": "Array of policy objects." } }, "required": [ "data" ] }, "example": {}, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/reservable/policies/{policyId}": { "delete": { "summary": "Delete Reservable Policy", "description": "Permanently deletes a reservable policy. This action cannot be undone.\nEnsure no active resources depend on this policy before deleting.", "operationId": "ReservablePolicy.DeleteReservablePolicy", "tags": [ "ReservablePolicy" ], "parameters": [ { "name": "organizationId", "description": "Organization's unique ID.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "policyId", "description": "Policy's unique ID.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": {}, "required": [], "description": "Deleted policy confirmation." } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "Get Reservable Policy", "description": "Returns a single reservable policy by ID.", "operationId": "ReservablePolicy.GetReservablePolicy", "tags": [ "ReservablePolicy" ], "parameters": [ { "name": "organizationId", "description": "Organization's unique ID.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "policyId", "description": "Policy's unique ID.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": {}, "required": [], "description": "Policy object." } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "404": { "description": "Policy not found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "NotFound": { "description": "Policy not found." } }, "required": [ "NotFound" ] }, "example": {}, "description": "" } } } }, "security": [ { "user": [] } ] }, "put": { "summary": "Update Reservable Policy", "description": "Updates an existing reservable policy. Supports optimistic concurrency control\nvia the version field — include the current version to prevent overwriting concurrent edits.", "operationId": "ReservablePolicy.UpdateReservablePolicy", "tags": [ "ReservablePolicy" ], "parameters": [ { "name": "organizationId", "description": "Organization's unique ID.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "policyId", "description": "Policy's unique ID.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "Updated policy display name." }, "description": { "type": "string", "description": "Updated description." }, "isActive": { "type": "boolean", "description": "Enable or disable the policy." }, "appliesToKinds": { "type": "array", "items": { "type": "string" }, "description": "Updated list of resource kinds." }, "scope": { "type": "object", "properties": {}, "required": [], "description": "Updated scope definition." }, "shared": { "type": "object", "properties": {}, "required": [], "description": "Updated shared booking rules." }, "spaceRules": { "type": "object", "properties": {}, "required": [], "description": "Updated space-specific rules." }, "assetRules": { "type": "object", "properties": {}, "required": [], "description": "Updated asset-specific rules." }, "version": { "type": "number", "description": "Current version for optimistic concurrency control." } }, "required": [] }, "example": {}, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": {}, "required": [], "description": "Updated policy object." } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "404": { "description": "Policy not found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "NotFound": { "description": "Policy not found." } }, "required": [ "NotFound" ] }, "example": {}, "description": "" } } }, "409": { "description": "Version mismatch — policy was modified by another request.", "content": { "application/json": { "schema": { "type": "object", "properties": { "Conflict": { "description": "Version mismatch — policy was modified by another request." } }, "required": [ "Conflict" ] }, "example": {}, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/reservable/resources/{resourceId}/policy": { "get": { "summary": "Resolve Effective Policy", "description": "Resolves the effective policy for a specific resource using the tree-walk\nresolution algorithm. Checks in priority order: RESOURCE scope → NODE ancestors (closest\nfirst) → ORG_DEFAULT. Returns the first active, kind-matching policy found along with the\nfull resolution chain for transparency.", "operationId": "ReservablePolicy.ResolveReservablePolicy", "tags": [ "ReservablePolicy" ], "parameters": [ { "name": "organizationId", "description": "Organization's unique ID.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "resourceId", "description": "Reservable resource's unique ID.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "effectivePolicy": {}, "resolutionChain": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] } } }, "required": [ "effectivePolicy", "resolutionChain" ], "description": "Resolution result." } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "NotFound": { "description": "Resource not found." } }, "required": [ "NotFound" ] }, "example": {}, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/reservable/resources": { "post": { "summary": "Create Reservable Resource", "description": "Creates a new reservable resource (space or asset) within the organization.", "operationId": "ReservableResource.CreateReservableResource", "tags": [ "ReservableResource" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "kind": { "type": "string", "description": "Resource kind: SPACE or ASSET" }, "name": { "type": "string", "description": "Display name of the resource" }, "description": { "type": "string", "description": "Optional description" }, "status": { "type": "string", "description": "Initial status (default: ACTIVE)" }, "isReservable": { "type": "boolean", "description": "Whether the resource can be reserved (default: true)" }, "publicBookingEnabled": { "type": "boolean", "description": "Whether the resource is visible/bookable from the public booking portal (default: false)" }, "facilityType": { "type": "string", "description": "Facility type for SPACE resources" }, "capacity": { "type": "number", "description": "Maximum occupancy for SPACE resources" }, "amenities": { "type": "array", "items": { "type": "string" }, "description": "List of amenity identifiers" }, "images": { "type": "array", "items": { "type": "string" }, "description": "List of image URLs" }, "bookableHours": { "type": "object", "properties": {}, "required": [], "description": "Bookable time window { start, end } in HH:mm format" }, "bookableDays": { "type": "array", "items": { "type": "number" }, "description": "Bookable days of week (0=Sun, 6=Sat)" }, "bufferMinutes": { "type": "number", "description": "Buffer time between reservations in minutes" }, "assetTypeId": { "type": "string", "description": "Asset type ID for ASSET resources" }, "assetTypeName": { "type": "string", "description": "Asset type display name" }, "assetId": { "type": "string", "description": "Physical asset ID linked to this resource" }, "serialNumber": { "type": "string", "description": "Asset serial number" }, "locationNodeId": { "type": "string", "description": "Location node ID where resource resides" }, "locationNodeName": { "type": "string", "description": "Location node display name" }, "locationAncestorIds": { "type": "array", "items": { "type": "string" }, "description": "Ancestor location node IDs for hierarchy" }, "floorPlanId": { "type": "string", "description": "Floor plan ID for map placement" }, "floorPlanObjectId": { "type": "string", "description": "Object ID on the floor plan canvas" } }, "required": [ "kind", "name", "locationNodeId", "locationNodeName" ] }, "example": {}, "description": "" } }, "required": true }, "responses": { "201": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": {}, "required": [], "description": "Created resource object." } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "List Reservable Resources", "description": "Returns a list of reservable resources for the organization.\nResults are filtered according to the requesting user's RBAC scope.", "operationId": "ReservableResource.ListReservableResources", "tags": [ "ReservableResource" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "kind", "description": "Filter by resource kind: SPACE or ASSET", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "status", "description": "Filter by resource status (e.g. ACTIVE, INACTIVE)", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "locationNodeId", "description": "Filter resources at a specific location node", "in": "query", "schema": { "type": "string" }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] }, "description": "Array of resource objects." } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/reservable/resources/{resourceId}": { "delete": { "summary": "Delete Reservable Resource", "description": "Soft-deletes a reservable resource by setting its status to INACTIVE\nand marking it as non-reservable. The resource record is retained for audit purposes.", "operationId": "ReservableResource.DeleteReservableResource", "tags": [ "ReservableResource" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "resourceId", "description": "Reservable resource ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": {}, "required": [], "description": "Deleted resource confirmation." } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "Get Reservable Resource", "description": "Returns the full details of a single reservable resource by ID.", "operationId": "ReservableResource.GetReservableResource", "tags": [ "ReservableResource" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "resourceId", "description": "Reservable resource ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": {}, "required": [], "description": "Resource object." } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "put": { "summary": "Update Reservable Resource", "description": "Updates an existing reservable resource. Supports optimistic concurrency\ncontrol via the version field. Only fields provided in the request body are updated.", "operationId": "ReservableResource.UpdateReservableResource", "tags": [ "ReservableResource" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "resourceId", "description": "Reservable resource ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "version": { "type": "number", "description": "Current version for optimistic concurrency control" }, "name": { "type": "string", "description": "Updated display name" }, "description": { "type": "string", "description": "Updated description" }, "status": { "type": "string", "description": "Updated status (ACTIVE, INACTIVE)" }, "isReservable": { "type": "boolean", "description": "Whether the resource is bookable" }, "publicBookingEnabled": { "type": "boolean", "description": "Whether the resource is visible/bookable from the public booking portal" }, "facilityType": { "type": "string", "description": "Facility type for SPACE resources" }, "capacity": { "type": "number", "description": "Maximum occupancy" }, "amenities": { "type": "array", "items": { "type": "string" }, "description": "Updated amenity identifiers" }, "images": { "type": "array", "items": { "type": "string" }, "description": "Updated image URLs" }, "bookableHours": { "type": "object", "properties": {}, "required": [], "description": "Updated bookable window { start, end }" }, "bookableDays": { "type": "array", "items": { "type": "number" }, "description": "Updated bookable days of week" }, "bufferMinutes": { "type": "number", "description": "Updated buffer time in minutes" }, "assetTypeId": { "type": "string", "description": "Updated asset type ID" }, "assetTypeName": { "type": "string", "description": "Updated asset type name" }, "assetId": { "type": "string", "description": "Updated physical asset ID" }, "serialNumber": { "type": "string", "description": "Updated serial number" }, "locationNodeId": { "type": "string", "description": "Updated location node ID" }, "locationNodeName": { "type": "string", "description": "Updated location node name" }, "locationAncestorIds": { "type": "array", "items": { "type": "string" }, "description": "Updated ancestor location IDs" }, "floorPlanId": { "type": "string", "description": "Updated floor plan ID" }, "floorPlanObjectId": { "type": "string", "description": "Updated floor plan object ID" } }, "required": [] }, "example": {}, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": {}, "required": [], "description": "Updated resource object." } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/reservable/resources/{resourceId}/availability": { "get": { "summary": "Get Resource Availability", "description": "Returns a resource availability snapshot for a time window, including active\nreservations and the resolved effective policy (tree-walk).\nUnix timestamps only.", "operationId": "ReservableResource.GetReservableResourceAvailability", "tags": [ "ReservableResource" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "resourceId", "description": "Reservable resource ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "dateFrom", "description": "Unix timestamp (ms) range start", "in": "query", "schema": { "type": "string" }, "required": true }, { "name": "dateTo", "description": "Unix timestamp (ms) range end (exclusive)", "in": "query", "schema": { "type": "string" }, "required": true } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "resource": { "type": "object", "properties": {}, "required": [] }, "policyResolution": { "type": "object", "properties": { "effectivePolicy": {}, "resolutionChain": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] } } }, "required": [ "effectivePolicy", "resolutionChain" ] }, "reservations": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] } } }, "required": [ "resource", "policyResolution", "reservations" ], "description": "Availability snapshot." } }, "required": [ "data" ] }, "example": {}, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/reservable/reservations/conflicts": { "get": { "summary": "Check Reservation Conflicts", "description": "Returns any existing reservations that overlap with the requested time range\nfor the given resource. Excludes CANCELLED, REJECTED, and NO_SHOW reservations.\nUsed before creating or editing a reservation to surface conflicts to the user.", "operationId": "Reservation.CheckReservationConflicts", "tags": [ "Reservation" ], "parameters": [ { "name": "organizationId", "description": "Organization's unique ID.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "resourceId", "description": "ID of the resource to check for conflicts.", "in": "query", "schema": { "type": "string" }, "required": true }, { "name": "startAt", "description": "Unix timestamp (as string) for the desired start time.", "in": "query", "schema": { "type": "string" }, "required": true }, { "name": "endAt", "description": "Unix timestamp (as string) for the desired end time.", "in": "query", "schema": { "type": "string" }, "required": true }, { "name": "excludeReservationId", "description": "Reservation ID to exclude from the conflict check\n (used when editing an existing reservation to avoid self-conflict).", "in": "query", "schema": { "type": "string" }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] }, "description": "Array of conflicting reservation objects. Empty array means no conflicts." } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/reservable/reservations": { "post": { "summary": "Create Reservation", "description": "Creates a new reservation for a reservable resource (space or asset).\nThe backend loads the resource, resolves the effective policy, enforces conflicts/rules,\nand derives approval requirements server-side.", "operationId": "Reservation.CreateReservation", "tags": [ "Reservation" ], "parameters": [ { "name": "organizationId", "description": "Organization's unique ID.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "resourceId": { "type": "string", "description": "ID of the resource being reserved." }, "startAt": { "type": "number", "description": "Unix timestamp for the reservation start time." }, "endAt": { "type": "number", "description": "Unix timestamp for the reservation end time." }, "isHalfDay": { "type": "boolean", "description": "Whether this is a half-day booking." }, "halfDayPeriod": { "type": "string", "description": "Half-day period: AM or PM." }, "title": { "type": "string", "description": "Title or name for the reservation." }, "purpose": { "type": "string", "description": "Purpose or reason for the booking." }, "attendeeCount": { "type": "number", "description": "Expected number of attendees." }, "amenitiesRequested": { "type": "array", "items": { "type": "string" }, "description": "List of requested amenity identifiers." }, "notes": { "type": "string", "description": "Additional notes for approvers or facility managers." }, "isRecurring": { "type": "boolean", "description": "Whether this is a recurring reservation." }, "recurringPattern": { "type": "string", "description": "Recurrence pattern (DAILY, WEEKLY, MONTHLY)." }, "recurringEndDate": { "type": "number", "description": "Unix timestamp for when the recurrence ends." }, "sourceChannel": { "type": "string", "description": "Originating channel: WEB, MOBILE, PWA, KIOSK, or API." } }, "required": [ "resourceId", "startAt", "endAt", "sourceChannel" ] }, "example": {}, "description": "" } }, "required": true }, "responses": { "201": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": {}, "required": [], "description": "Created reservation object." } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "List Reservations", "description": "Returns a filtered list of reservations for the organization.\nQuery priority: resourceId → requesterId → status → default (own reservations).\nResults are filtered through the caller's RBAC authorizer.", "operationId": "Reservation.ListReservations", "tags": [ "Reservation" ], "parameters": [ { "name": "organizationId", "description": "Organization's unique ID.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "resourceId", "description": "Filter by resource ID. Returns all reservations for the resource.", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "requesterId", "description": "Filter by requester user ID.", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "status", "description": "Filter by reservation status (e.g. PENDING, CONFIRMED, CANCELLED).", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "startDate", "description": "Unix timestamp (as string) for the start of the date range.", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "endDate", "description": "Unix timestamp (as string) for the end of the date range.", "in": "query", "schema": { "type": "string" }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] }, "description": "Array of reservation objects matching the query." } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/reservable/reservations/{reservationId}": { "get": { "summary": "Get Reservation", "description": "Returns a single reservation by its ID.\nThrows 404 if the reservation does not exist within the organization or is outside the user's RBAC scope.", "operationId": "Reservation.GetReservation", "tags": [ "Reservation" ], "parameters": [ { "name": "organizationId", "description": "Organization's unique ID.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "reservationId", "description": "Reservation's unique ID.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": {}, "required": [], "description": "Reservation object." } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/reservable/reservations/{reservationId}/transition": { "post": { "summary": "Transition Reservation", "description": "Transitions a reservation to a new status by applying a lifecycle action.\nValid actions and the statuses they are allowed from are governed by the reservation\nstate machine (RESERVATION_TRANSITIONS).", "operationId": "Reservation.TransitionReservation", "tags": [ "Reservation" ], "parameters": [ { "name": "organizationId", "description": "Organization's unique ID.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "reservationId", "description": "Reservation's unique ID.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "action": { "type": "string", "description": "Action to apply: approve, reject, cancel, check-in, check-out,\n checkout-asset, return-asset, or no-show." }, "reason": { "type": "string", "description": "Reason for the action (used for reject and cancel actions)." }, "notes": { "type": "string", "description": "Additional notes recorded on the timeline event." }, "conditionOnReturn": { "type": "string", "description": "Condition of asset on return (used for return-asset action)." } }, "required": [ "action" ] }, "example": {}, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": {}, "required": [], "description": "Updated reservation object reflecting the new status." } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "409": { "description": "The resource has conflict.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource has conflict." }, "message": { "type": "string", "description": "The resource has conflict message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceConflict", "message": "The operation could not be completed because it conflicts with another request." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/roles": { "post": { "summary": "Create Role", "description": "Create Role", "operationId": "Role.CreateRole", "tags": [ "Role" ], "parameters": [ { "name": "organizationId", "description": "The ID of the organization where the role is to be created.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the role." }, "description": { "type": "string", "description": "The description of the role." }, "policies": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] }, "description": "The policies associated with the role. Each policy defines actions, effects, and resources." } }, "required": [ "name", "policies" ] }, "example": { "name": "Administrator", "description": "Full access to all resources.", "policies": [ { "actions": [ "create:*", "delete:*" ], "effect": "allow", "resources": [ "*" ] } ] }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "description": { "type": "string" }, "policies": { "type": "array", "items": { "type": "object", "properties": { "resources": { "type": "array", "items": { "type": "string" } }, "actions": { "type": "array", "items": { "type": "string" } }, "effect": { "type": "string" } }, "required": [ "resources", "actions", "effect" ] } }, "createdBy": { "type": "string" }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "id", "description", "policies", "createdBy", "createdAtDateString", "createdAt", "updatedAtDateString", "updatedAt" ], "description": "Data of the created role including its ID, description, policies, and timestamps." } }, "required": [ "data" ] }, "example": { "data": { "id": "rl-admin", "description": "Admin role", "policies": [ { "resources": [ "*" ], "actions": [ "*" ], "effect": "allow" } ], "createdBy": "d6b0e137-xxxx-xxxx-xxxx-c944cc12a5f4", "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000, "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1706659200000 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "List Roles", "description": "List Roles", "operationId": "Role.ListRoles", "tags": [ "Role" ], "parameters": [ { "name": "organizationId", "description": "The ID of the organization whose roles are to be listed.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "maxResults", "description": "The maximum number of results to return.", "in": "query", "schema": { "type": "number", "minimum": 10, "maximum": 100 }, "required": false }, { "name": "nextToken", "description": "A token to retrieve the next set of results, used for pagination.", "in": "query", "schema": { "type": "string" }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "description": { "type": "string" }, "policies": { "type": "array", "items": { "type": "object", "properties": { "resources": { "type": "array", "items": { "type": "string" } }, "actions": { "type": "array", "items": { "type": "string" } }, "effect": { "type": "string" } }, "required": [ "resources", "actions", "effect" ] } }, "createdBy": { "type": "string" }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "id", "description", "policies", "createdBy", "createdAtDateString", "createdAt", "updatedAtDateString", "updatedAt" ] }, "description": "Data of the created role including its ID, description, policies, and timestamps.." } }, "required": [ "data" ] }, "example": { "data": [ { "id": "rl-admin", "description": "Admin role", "policies": [ { "resources": [ "*" ], "actions": [ "*" ], "effect": "allow" } ], "createdBy": "d6b0e137-xxxx-xxxx-xxxx-c944cc12a5f4", "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000, "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1706659200000 } ] }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/roles/{roleId}": { "delete": { "summary": "Delete Role", "description": "Delete Role", "operationId": "Role.DeleteRole", "tags": [ "Role" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "roleId", "description": "The ID of role.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "deleted": { "type": "boolean" } }, "required": [ "deleted" ], "description": "Data of the role." } }, "required": [ "data" ] }, "example": { "data": { "deleted": true } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "Get Role", "description": "Get Role", "operationId": "Role.GetRole", "tags": [ "Role" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "roleId", "description": "The ID of role.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "description": { "type": "string" }, "policies": { "type": "array", "items": { "type": "object", "properties": { "resources": { "type": "array", "items": { "type": "string" } }, "actions": { "type": "array", "items": { "type": "string" } }, "effect": { "type": "string" } }, "required": [ "resources", "actions", "effect" ] } }, "createdBy": { "type": "string" }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "id", "description", "policies", "createdBy", "createdAtDateString", "createdAt", "updatedAtDateString", "updatedAt" ], "description": "Data of the created role including its ID, description, policies, and timestamps." } }, "required": [ "data" ] }, "example": { "data": { "id": "rl-admin", "description": "Admin role", "policies": [ { "resources": [ "*" ], "actions": [ "*" ], "effect": "allow" } ], "createdBy": "d6b0e137-xxxx-xxxx-xxxx-c944cc12a5f4", "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000, "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1706659200000 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "put": { "summary": "Update Role", "description": "Update Role", "operationId": "Role.UpdateRole", "tags": [ "Role" ], "parameters": [ { "name": "organizationId", "description": "The ID of the organization where the role is located.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "roleId", "description": "The ID of the role to update.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "The new name of the role, if updating." }, "description": { "type": "string", "description": "The new description of the role, if updating." }, "policies": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] }, "description": "The new policies for the role, if updating." } }, "required": [] }, "example": { "name": "Team Leader", "description": "Manages team of developers.", "policies": [ { "actions": [ "edit:*" ], "effect": "allow", "resources": [ "*" ] } ] }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "description": { "type": "string" }, "policies": { "type": "array", "items": { "type": "object", "properties": { "resources": { "type": "array", "items": { "type": "string" } }, "actions": { "type": "array", "items": { "type": "string" } }, "effect": { "type": "string" } }, "required": [ "resources", "actions", "effect" ] } }, "createdBy": { "type": "string" }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "id", "description", "policies", "createdBy", "createdAtDateString", "createdAt", "updatedAtDateString", "updatedAt" ], "description": "Data of the created role including its ID, description, policies, and timestamps." } }, "required": [ "data" ] }, "example": { "data": { "id": "rl-admin", "description": "Admin role", "policies": [ { "resources": [ "*" ], "actions": [ "*" ], "effect": "allow" } ], "createdBy": "d6b0e137-xxxx-xxxx-xxxx-c944cc12a5f4", "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000, "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1706659200000 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/sla-templates": { "post": { "summary": "Create SLA Template", "description": "Create a new SLA template for the organization", "operationId": "SLATemplate.CreateSLATemplate", "tags": [ "SLATemplate" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "name", "description": "Template name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "description", "description": "Template description", "in": "path", "required": false, "schema": { "type": "string" } }, { "name": "isActive", "description": "Whether template is active", "in": "path", "required": false, "schema": { "type": "boolean", "default": "true" } }, { "name": "priorities", "description": "Priority-based SLA times", "in": "path", "required": true, "schema": { "type": "object", "properties": { "High": { "type": "object", "properties": { "responseTimeMinutes": { "type": "number" }, "resolutionTimeMinutes": { "type": "number" } }, "required": [ "responseTimeMinutes", "resolutionTimeMinutes" ] }, "Medium": { "type": "object", "properties": { "responseTimeMinutes": { "type": "number" }, "resolutionTimeMinutes": { "type": "number" } }, "required": [ "responseTimeMinutes", "resolutionTimeMinutes" ] }, "Low": { "type": "object", "properties": { "responseTimeMinutes": { "type": "number" }, "resolutionTimeMinutes": { "type": "number" } }, "required": [ "responseTimeMinutes", "resolutionTimeMinutes" ] }, "None": { "type": "object", "properties": { "responseTimeMinutes": { "type": "number" }, "resolutionTimeMinutes": { "type": "number" } }, "required": [ "responseTimeMinutes", "resolutionTimeMinutes" ] } }, "required": [ "High", "Medium", "Low", "None" ] } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "organizationId": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "isActive": { "type": "boolean" }, "isDefault": { "type": "boolean" }, "isCustomized": { "type": "boolean" }, "priorities": { "type": "object", "properties": { "High": { "type": "object", "properties": { "responseTimeMinutes": { "type": "number" }, "resolutionTimeMinutes": { "type": "number" } }, "required": [ "responseTimeMinutes", "resolutionTimeMinutes" ] }, "Medium": { "type": "object", "properties": { "responseTimeMinutes": { "type": "number" }, "resolutionTimeMinutes": { "type": "number" } }, "required": [ "responseTimeMinutes", "resolutionTimeMinutes" ] }, "Low": { "type": "object", "properties": { "responseTimeMinutes": { "type": "number" }, "resolutionTimeMinutes": { "type": "number" } }, "required": [ "responseTimeMinutes", "resolutionTimeMinutes" ] }, "None": { "type": "object", "properties": { "responseTimeMinutes": { "type": "number" }, "resolutionTimeMinutes": { "type": "number" } }, "required": [ "responseTimeMinutes", "resolutionTimeMinutes" ] } }, "required": [ "High", "Medium", "Low", "None" ] }, "createdAt": { "type": "number" }, "updatedAt": { "type": "number" }, "createdBy": { "type": "string" }, "updatedBy": { "type": "string" } }, "required": [ "id", "organizationId", "name", "description", "isActive", "isDefault", "isCustomized", "priorities", "createdAt", "updatedAt", "createdBy", "updatedBy" ], "description": "Response data" } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "List SLA Templates", "description": "List all SLA templates for the organization", "operationId": "SLATemplate.ListSLATemplates", "tags": [ "SLATemplate" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "isActive", "description": "Filter by active status (true/false)", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "isActive", "description": "Filter by active status (true/false)", "in": "query", "schema": { "type": "string" }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "organizationId": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "isActive": { "type": "boolean" }, "isDefault": { "type": "boolean" }, "isCustomized": { "type": "boolean" }, "priorities": { "type": "object", "properties": {}, "required": [] }, "createdAt": { "type": "number" }, "updatedAt": { "type": "number" } }, "required": [ "id", "organizationId", "name", "description", "isActive", "isDefault", "isCustomized", "priorities", "createdAt", "updatedAt" ] }, "description": "Array of SLA templates" } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/sla-templates/{templateId}": { "delete": { "summary": "Delete SLA Template", "description": "Delete an SLA template (cannot delete default templates or templates in use)", "operationId": "SLATemplate.DeleteSLATemplate", "tags": [ "SLATemplate" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "templateId", "description": "SLA Template ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "organizationId": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "isActive": { "type": "boolean" }, "isDefault": { "type": "boolean" }, "isCustomized": { "type": "boolean" }, "priorities": { "type": "object", "properties": { "High": { "type": "object", "properties": { "responseTimeMinutes": { "type": "number" }, "resolutionTimeMinutes": { "type": "number" } }, "required": [ "responseTimeMinutes", "resolutionTimeMinutes" ] }, "Medium": { "type": "object", "properties": { "responseTimeMinutes": { "type": "number" }, "resolutionTimeMinutes": { "type": "number" } }, "required": [ "responseTimeMinutes", "resolutionTimeMinutes" ] }, "Low": { "type": "object", "properties": { "responseTimeMinutes": { "type": "number" }, "resolutionTimeMinutes": { "type": "number" } }, "required": [ "responseTimeMinutes", "resolutionTimeMinutes" ] }, "None": { "type": "object", "properties": { "responseTimeMinutes": { "type": "number" }, "resolutionTimeMinutes": { "type": "number" } }, "required": [ "responseTimeMinutes", "resolutionTimeMinutes" ] } }, "required": [ "High", "Medium", "Low", "None" ] }, "createdAt": { "type": "number" }, "updatedAt": { "type": "number" }, "createdBy": { "type": "string" }, "updatedBy": { "type": "string" } }, "required": [ "id", "organizationId", "name", "description", "isActive", "isDefault", "isCustomized", "priorities", "createdAt", "updatedAt", "createdBy", "updatedBy" ], "description": "Response data" } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "400": { "description": "The request has invalid data.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has invalid data." }, "message": { "type": "string", "description": "The request has invalid data message." } }, "required": [ "error", "message" ] }, "example": { "error": "Bad Request", "message": "The request cannot be processed due to a bad request." }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "Get SLA Template", "description": "Get a specific SLA template by ID", "operationId": "SLATemplate.GetSLATemplate", "tags": [ "SLATemplate" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "templateId", "description": "SLA Template ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "organizationId": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "isActive": { "type": "boolean" }, "isDefault": { "type": "boolean" }, "isCustomized": { "type": "boolean" }, "priorities": { "type": "object", "properties": { "High": { "type": "object", "properties": { "responseTimeMinutes": { "type": "number" }, "resolutionTimeMinutes": { "type": "number" } }, "required": [ "responseTimeMinutes", "resolutionTimeMinutes" ] }, "Medium": { "type": "object", "properties": { "responseTimeMinutes": { "type": "number" }, "resolutionTimeMinutes": { "type": "number" } }, "required": [ "responseTimeMinutes", "resolutionTimeMinutes" ] }, "Low": { "type": "object", "properties": { "responseTimeMinutes": { "type": "number" }, "resolutionTimeMinutes": { "type": "number" } }, "required": [ "responseTimeMinutes", "resolutionTimeMinutes" ] }, "None": { "type": "object", "properties": { "responseTimeMinutes": { "type": "number" }, "resolutionTimeMinutes": { "type": "number" } }, "required": [ "responseTimeMinutes", "resolutionTimeMinutes" ] } }, "required": [ "High", "Medium", "Low", "None" ] }, "createdAt": { "type": "number" }, "updatedAt": { "type": "number" }, "createdBy": { "type": "string" }, "updatedBy": { "type": "string" } }, "required": [ "id", "organizationId", "name", "description", "isActive", "isDefault", "isCustomized", "priorities", "createdAt", "updatedAt", "createdBy", "updatedBy" ], "description": "Response data" } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "put": { "summary": "Update SLA Template", "description": "Update an existing SLA template", "operationId": "SLATemplate.UpdateSLATemplate", "tags": [ "SLATemplate" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "templateId", "description": "SLA Template ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "name", "description": "Template name", "in": "path", "required": false, "schema": { "type": "string" } }, { "name": "description", "description": "Template description", "in": "path", "required": false, "schema": { "type": "string" } }, { "name": "isActive", "description": "Whether template is active", "in": "path", "required": false, "schema": { "type": "boolean" } }, { "name": "isCustomized", "description": "Whether template has been customized", "in": "path", "required": false, "schema": { "type": "boolean" } }, { "name": "priorities", "description": "Priority-based SLA times", "in": "path", "required": false, "schema": { "type": "object", "properties": {}, "required": [] } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "organizationId": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "isActive": { "type": "boolean" }, "isDefault": { "type": "boolean" }, "isCustomized": { "type": "boolean" }, "priorities": { "type": "object", "properties": { "High": { "type": "object", "properties": { "responseTimeMinutes": { "type": "number" }, "resolutionTimeMinutes": { "type": "number" } }, "required": [ "responseTimeMinutes", "resolutionTimeMinutes" ] }, "Medium": { "type": "object", "properties": { "responseTimeMinutes": { "type": "number" }, "resolutionTimeMinutes": { "type": "number" } }, "required": [ "responseTimeMinutes", "resolutionTimeMinutes" ] }, "Low": { "type": "object", "properties": { "responseTimeMinutes": { "type": "number" }, "resolutionTimeMinutes": { "type": "number" } }, "required": [ "responseTimeMinutes", "resolutionTimeMinutes" ] }, "None": { "type": "object", "properties": { "responseTimeMinutes": { "type": "number" }, "resolutionTimeMinutes": { "type": "number" } }, "required": [ "responseTimeMinutes", "resolutionTimeMinutes" ] } }, "required": [ "High", "Medium", "Low", "None" ] }, "createdAt": { "type": "number" }, "updatedAt": { "type": "number" }, "createdBy": { "type": "string" }, "updatedBy": { "type": "string" } }, "required": [ "id", "organizationId", "name", "description", "isActive", "isDefault", "isCustomized", "priorities", "createdAt", "updatedAt", "createdBy", "updatedBy" ], "description": "Response data" } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "400": { "description": "The request has invalid data.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has invalid data." }, "message": { "type": "string", "description": "The request has invalid data message." } }, "required": [ "error", "message" ] }, "example": { "error": "Bad Request", "message": "The request cannot be processed due to a bad request." }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/locations/{locationId}/sla-override": { "get": { "summary": "Get Location SLA Override", "description": "Get the SLA template override for a specific location", "operationId": "SLATemplate.GetLocationSLAOverride", "tags": [ "SLATemplate" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "locationId", "description": "Location ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "locationId": { "type": "string" }, "locationName": { "type": "string" }, "slaTemplateId": { "type": "string" }, "slaTemplateName": { "type": "string" }, "isOverridden": { "type": "boolean" } }, "required": [ "locationId", "locationName", "slaTemplateId", "slaTemplateName", "isOverridden" ], "description": "Response data" } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/sla-settings": { "get": { "summary": "Get Organization SLA Settings", "description": "Get the SLA settings for an organization", "operationId": "SLATemplate.GetOrganizationSLASettings", "tags": [ "SLATemplate" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "organizationId": { "type": "string" }, "isSLAEnabled": { "type": "boolean" }, "defaultTemplateId": { "type": "string" }, "defaultTemplateName": { "type": "string" }, "activeTemplateCount": { "type": "number" } }, "required": [ "organizationId", "isSLAEnabled", "defaultTemplateId", "defaultTemplateName", "activeTemplateCount" ], "description": "Response data" } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/sla-templates/initialize": { "post": { "summary": "Initialize Default SLA Templates", "description": "Initialize default SLA templates for the organization (creates Emergency, High, Medium, Low priority templates)", "operationId": "SLATemplate.InitializeDefaultSLATemplates", "tags": [ "SLATemplate" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "organizationId": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "isActive": { "type": "boolean" }, "isDefault": { "type": "boolean" }, "isCustomized": { "type": "boolean" }, "priorities": { "type": "object", "properties": {}, "required": [] }, "createdAt": { "type": "number" }, "updatedAt": { "type": "number" } }, "required": [ "id", "organizationId", "name", "description", "isActive", "isDefault", "isCustomized", "priorities", "createdAt", "updatedAt" ] }, "description": "Array of SLA templates" } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/locations/{locationId}/sla-metrics": { "get": { "summary": "Get Location SLA Metrics", "description": "Get aggregated SLA compliance metrics for a specific location", "operationId": "SLA_Metrics.GetLocationSLAMetrics", "tags": [ "SLA Metrics" ], "parameters": [ { "name": "organizationId", "description": "Organization unique identifier", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "locationId", "description": "Location unique identifier", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "startDate", "description": "Start date (ISO 8601). Defaults to 30 days ago.", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "endDate", "description": "End date (ISO 8601). Defaults to today.", "in": "query", "schema": { "type": "string" }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "startDate": { "type": "string", "description": "Start date of metrics period (ISO 8601)" }, "endDate": { "type": "string", "description": "End date of metrics period (ISO 8601)" }, "response": { "type": "object", "properties": { "total": { "type": "number" }, "onTime": { "type": "number" }, "overdue": { "type": "number" }, "percentage": { "type": "number" } }, "required": [ "total", "onTime", "overdue", "percentage" ], "description": "Response SLA metrics" }, "resolution": { "type": "object", "properties": { "total": { "type": "number" }, "onTime": { "type": "number" }, "overdue": { "type": "number" }, "percentage": { "type": "number" } }, "required": [ "total", "onTime", "overdue", "percentage" ], "description": "Resolution SLA metrics" }, "byPriority": { "type": "object", "properties": {}, "required": [], "description": "Priority-level breakdown" } }, "required": [ "startDate", "endDate", "response", "resolution", "byPriority" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/sla-metrics": { "get": { "summary": "Get Organization SLA Metrics", "description": "Get aggregated SLA compliance metrics for an organization", "operationId": "SLA_Metrics.GetOrganizationSLAMetrics", "tags": [ "SLA Metrics" ], "parameters": [ { "name": "organizationId", "description": "Organization unique identifier", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "startDate", "description": "Start date (ISO 8601). Defaults to 30 days ago.", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "endDate", "description": "End date (ISO 8601). Defaults to today.", "in": "query", "schema": { "type": "string" }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "startDate": { "type": "string", "description": "Start date of metrics period (ISO 8601)" }, "endDate": { "type": "string", "description": "End date of metrics period (ISO 8601)" }, "response": { "type": "object", "properties": { "total": { "type": "number" }, "onTime": { "type": "number" }, "overdue": { "type": "number" }, "percentage": { "type": "number" } }, "required": [ "total", "onTime", "overdue", "percentage" ], "description": "Response SLA metrics" }, "resolution": { "type": "object", "properties": { "total": { "type": "number" }, "onTime": { "type": "number" }, "overdue": { "type": "number" }, "percentage": { "type": "number" } }, "required": [ "total", "onTime", "overdue", "percentage" ], "description": "Resolution SLA metrics" }, "byPriority": { "type": "object", "properties": { "0": { "type": "object", "properties": {}, "required": [] }, "1": { "type": "object", "properties": {}, "required": [] }, "2": { "type": "object", "properties": {}, "required": [] }, "3": { "type": "object", "properties": {}, "required": [] } }, "required": [ "0", "1", "2", "3" ], "description": "Priority-level breakdown" } }, "required": [ "startDate", "endDate", "response", "resolution", "byPriority" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/sla-immediate-attention": { "get": { "summary": "Get SLA Immediate Attention", "description": "Get work orders needing immediate attention (breached SLAs)", "operationId": "SLA_Metrics.GetSLAImmediateAttention", "tags": [ "SLA Metrics" ], "parameters": [ { "name": "organizationId", "description": "Organization unique identifier", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "totalOverdue": { "type": "number", "description": "Total overdue work orders" }, "responseOverdue": { "type": "number", "description": "Work orders with breached response SLA" }, "resolutionOverdue": { "type": "number", "description": "Work orders with breached resolution SLA" }, "byPriority": { "type": "object", "properties": {}, "required": [], "description": "Overdue counts by priority level" }, "teamsWithOverdue": { "description": "Teams with overdue work orders" }, "usersWithOverdue": { "description": "Users with overdue work orders" }, "overdueWorkOrders": { "description": "Detailed list of overdue work orders" } }, "required": [ "totalOverdue", "responseOverdue", "resolutionOverdue", "byPriority", "teamsWithOverdue", "usersWithOverdue", "overdueWorkOrders" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/teams/{teamId}/sla-metrics": { "get": { "summary": "Get Team SLA Metrics", "description": "Get aggregated SLA compliance metrics for a specific team", "operationId": "SLA_Metrics.GetTeamSLAMetrics", "tags": [ "SLA Metrics" ], "parameters": [ { "name": "organizationId", "description": "Organization unique identifier", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "teamId", "description": "Team unique identifier", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "startDate", "description": "Start date (ISO 8601). Defaults to 30 days ago.", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "endDate", "description": "End date (ISO 8601). Defaults to today.", "in": "query", "schema": { "type": "string" }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "startDate": { "type": "string", "description": "Start date of metrics period (ISO 8601)" }, "endDate": { "type": "string", "description": "End date of metrics period (ISO 8601)" }, "response": { "type": "object", "properties": { "total": { "type": "number" }, "onTime": { "type": "number" }, "overdue": { "type": "number" }, "percentage": { "type": "number" } }, "required": [ "total", "onTime", "overdue", "percentage" ], "description": "Response SLA metrics" }, "resolution": { "type": "object", "properties": { "total": { "type": "number" }, "onTime": { "type": "number" }, "overdue": { "type": "number" }, "percentage": { "type": "number" } }, "required": [ "total", "onTime", "overdue", "percentage" ], "description": "Resolution SLA metrics" }, "byPriority": { "type": "object", "properties": {}, "required": [], "description": "Priority-level breakdown" } }, "required": [ "startDate", "endDate", "response", "resolution", "byPriority" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/api/v2/organizations/{organizationId}/locations/{locationId}/sla-override": { "delete": { "summary": "Delete Location SLA Override", "description": "Remove the SLA template override for a specific location, reverting to organization default", "operationId": "SLA_Templates.DeleteLocationSLAOverride", "tags": [ "SLA Templates" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "locationId", "description": "Location ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "description": "Success message" }, "locationId": { "type": "string", "description": "Location ID" }, "locationName": { "type": "string", "description": "Location name" } }, "required": [ "message", "locationId", "locationName" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "put": { "summary": "Update Location SLA Override", "description": "Update or remove the SLA template override for a specific location", "operationId": "SLA_Templates.UpdateLocationSLAOverride", "tags": [ "SLA Templates" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "locationId", "description": "The ID of location.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "slaTemplateId": { "type": "string", "description": "The ID of SLA template to override with (null to remove override)" } }, "required": [] }, "example": { "slaTemplateId": "slat-abc123" }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "locationId": { "type": "string" }, "locationName": { "type": "string" }, "slaTemplateId": { "type": "string" }, "slaTemplate": { "type": "object", "properties": {}, "required": [] } }, "required": [ "locationId", "locationName", "slaTemplateId", "slaTemplate" ], "description": "Data of the updated location SLA override." } }, "required": [ "data" ] }, "example": { "data": { "locationId": "l-abc123", "locationName": "Main Building", "slaTemplateId": null, "slaTemplate": null } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/api/v2/organizations/{organizationId}/sla-settings": { "put": { "summary": "Update Organization SLA Settings", "description": "Update the SLA settings for the organization", "operationId": "SLA_Templates.UpdateOrganizationSLASettings", "tags": [ "SLA Templates" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "enabled": { "type": "boolean", "description": "Whether SLA enforcement is enabled for the organization." }, "selectedTemplateId": { "type": "string", "description": "The ID of the selected SLA template for the organization." } }, "required": [ "enabled" ] }, "example": { "enabled": true, "selectedTemplateId": "facility-basic" }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "organizationId": { "type": "string", "description": "The ID of the organization." }, "organizationName": { "type": "string", "description": "The name of the organization." }, "slaSettings": { "type": "object", "properties": { "enabled": { "type": "boolean" } }, "required": [ "enabled" ], "description": "The updated SLA settings for the organization." } }, "required": [ "organizationId", "organizationName", "slaSettings" ] }, "example": { "organizationId": "o-organizationId", "organizationName": "Infodeck", "slaSettings": { "enabled": false } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/statistics/work-orders/status": { "get": { "summary": "Count Work Orders By Date", "description": "Count Work Orders By Date", "operationId": "Statistics.CountWorkOrdersByDate", "tags": [ "Statistics" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "startDate", "description": "The start date number of query", "in": "query", "schema": { "type": "number" }, "required": true }, { "name": "endDate", "description": "The end date number of query", "in": "query", "schema": { "type": "number" }, "required": true } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "statusName": { "type": "string" }, "value": { "type": "number" } }, "required": [ "statusName", "value" ] }, "description": "Data of the work order status statistic." } }, "required": [ "data" ] }, "example": { "data": { "statusName": "Open", "value": 2 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/statistics/work-orders/status/{status}": { "get": { "summary": "Count Work Orders By Status", "description": "Count Work Orders By Status", "operationId": "Statistics.CountWorkOrdersByStatus", "tags": [ "Statistics" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "status", "description": "The status of work order.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "startDate", "description": "The start date number of query", "in": "query", "schema": { "type": "number" }, "required": true }, { "name": "endDate", "description": "The end date number of query", "in": "query", "schema": { "type": "number" }, "required": true } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "statusName": { "type": "string" }, "value": { "type": "number" } }, "required": [ "statusName", "value" ], "description": "Work order status count statistics during the period." } }, "required": [ "data" ] }, "example": { "data": { "statusName": "Open", "value": 2 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/statistics/assets/metrics": { "post": { "summary": "Get Asset Metrics.", "description": "Get Asset Metrics", "operationId": "Statistics.GetAssetMetrics", "tags": [ "Statistics" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "startTime": { "type": "number", "description": "The startTime of metrics statistic." }, "endTime": { "type": "number", "description": "The endTime of metrics statistic." }, "period": { "type": "number", "description": "The period of metrics statistic." }, "metrics": { "type": "array", "items": { "type": "object", "properties": { "assetId": { "type": "string" }, "properties": { "type": "object", "properties": { "key": { "type": "string" }, "aggregation": { "type": "string" }, "alias": { "type": "string" } }, "required": [ "key", "aggregation" ] } }, "required": [ "assetId", "properties" ] }, "description": "The metrics of statistic." } }, "required": [ "startTime", "endTime", "period", "metrics" ] }, "example": { "startTime": 1700000000000, "endTime": 1800000000000, "period": 300, "metrics": [ { "assetId": "a-assetId", "properties": [ { "key": "Temperature", "aggregation": "average", "alias": "Temperature" } ] } ] }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "startTime": { "type": "number" }, "endTime": { "type": "number" }, "period": { "type": "number" }, "metrics": { "type": "array", "items": { "type": "object", "properties": { "assetId": { "type": "string" }, "properties": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "aggregation": { "type": "string" }, "alias": { "type": "string" } }, "required": [ "key", "aggregation" ] } } }, "required": [ "assetId", "properties" ] } } }, "required": [ "startTime", "endTime", "period", "metrics" ], "description": "Data of the metrics statistic." } }, "required": [ "data" ] }, "example": { "data": { "startTime": 1700000000000, "endTime": 1800000000000, "period": 300, "metrics": [ { "assetId": "a-assetId", "properties": [ { "key": "Temperature", "aggregation": "average", "alias": "Temperature" } ] } ] } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/statistics/assets/properties/{property}": { "post": { "summary": "Get Assets Property Metrics.", "description": "Get assets property metrics", "operationId": "Statistics.GetAssetsPropertyMetrics", "tags": [ "Statistics" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "property", "description": "The property of assets.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "startDate": { "type": "number", "description": "The startDate of metrics statistic." }, "endDate": { "type": "number", "description": "The endDate of metrics statistic." }, "assetIds": { "type": "array", "items": { "type": "string" }, "description": "The ID of assets." } }, "required": [ "startDate", "endDate", "assetIds" ] }, "example": { "startDate": 1700000000000, "endDate": 1800000000000, "assetIds": [ "a-assetId" ] }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "assetId": { "type": "object", "properties": { "timestamps": { "type": "array", "items": { "type": "number" } }, "values": { "type": "array", "items": { "type": "number" } } }, "required": [ "timestamps", "values" ] } }, "required": [ "assetId" ], "description": "Metrics of the assets." } }, "required": [ "data" ] }, "example": { "data": { "a-823572394723947900": { "timestamps": [ 1721703000000 ], "values": [ 37 ] } } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/statistics/assets/rawdata": { "post": { "summary": "Get Assets Rawdata.", "description": "Get Assets Rawdata", "operationId": "Statistics.GetAssetsRawdata", "tags": [ "Statistics" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "startTime": { "type": "number", "description": "The startTime of metrics statistic." }, "endTime": { "type": "number", "description": "The endTime of metrics statistic." }, "assetTypeId": { "type": "string", "description": "The ID of asset type." }, "assetIds": { "type": "array", "items": { "type": "string" }, "description": "The ID of assets." }, "properties": { "type": "array", "items": { "type": "string" }, "description": "The properties of asset type." }, "exportFormat": { "type": "string", "description": "The format of export file." } }, "required": [ "startTime", "endTime", "properties" ] }, "example": { "startTime": 1700000000000, "endTime": 1800000000000, "assetTypeId": "at-assetTypeId", "assetIds": [ "a-assetId" ], "properties": [ "Temperature" ], "exportFormat": "CSV" }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "startTime": { "type": "number" }, "endTime": { "type": "number" }, "assetTypeId": { "type": "string" }, "assetIds": { "type": "array", "items": { "type": "string" } }, "properties": { "type": "array", "items": { "type": "string" } }, "exportFormat": { "type": "string" } }, "required": [ "startTime", "endTime", "assetTypeId", "assetIds", "properties", "exportFormat" ], "description": "Rawdata of the assets." } }, "required": [ "data" ] }, "example": { "data": { "startTime": 1700000000000, "endTime": 1800000000000, "assetTypeId": "at-assetTypeId", "assetIds": [ "a-assetId" ], "properties": [ "Temperature" ], "exportFormat": "CSV" } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/statistics/assets/summary": { "get": { "summary": "Get Assets Summary", "description": "Get Assets Summary", "operationId": "Statistics.GetAssetsSummary", "tags": [ "Statistics" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "staticAssetTotal": { "type": "number" }, "iotDeviceTotal": { "type": "number" }, "iotDeviceOnlineTotal": { "type": "number" } }, "required": [ "staticAssetTotal", "iotDeviceTotal", "iotDeviceOnlineTotal" ], "description": "Data of the asset summary." } }, "required": [ "data" ] }, "example": { "data": { "staticAssetTotal": 1, "iotDeviceTotal": 2, "iotDeviceOnlineTotal": 3 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/statistics/integrations/summary": { "get": { "summary": "Get Integration Services Summary", "description": "Get Integration Services Summary", "operationId": "Statistics.GetIntegrationServicesSummary", "tags": [ "Statistics" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "total": { "type": "number" } }, "required": [ "total" ], "description": "Data of the integration." } }, "required": [ "data" ] }, "example": { "data": { "total": 0 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/statistics/work-orders/metrics": { "post": { "summary": "Get Work Order Metrics.", "description": "Get Work Order Metrics", "operationId": "Statistics.GetWorkOrderMetrics", "tags": [ "Statistics" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "startTime": { "type": "number", "description": "The startTime of metrics statistic." }, "endTime": { "type": "number", "description": "The endTime of metrics statistic." }, "period": { "type": "number", "description": "The period of metrics statistic." }, "metrics": { "type": "array", "items": { "type": "object", "properties": { "locationId": { "type": "string" }, "statuses": { "type": "array", "items": { "type": "string" } }, "priorities": { "type": "array", "items": { "type": "string" } }, "aggregation": { "type": "string" } }, "required": [ "locationId", "statuses", "priorities", "aggregation" ] }, "description": "The metrics of statistic." } }, "required": [ "startTime", "endTime", "period", "metrics" ] }, "example": { "startTime": 1700000000000, "endTime": 1800000000000, "period": 300, "metrics": [ { "locationId": "l-locationId", "statuses": [ "Open", "Accept" ], "priorities": [ "Low" ], "aggregation": "sum" } ] }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "locationId": { "type": "object", "properties": { "timestamps": { "type": "array", "items": { "type": "number" } }, "values": { "type": "array", "items": { "type": "number" } } }, "required": [ "timestamps", "values" ] } }, "required": [ "locationId" ], "description": "Data of the metrics statistic." } }, "required": [ "data" ] }, "example": { "data": { "l-locationId": { "timestamps": [ 1727193600000 ], "values": [ 5 ] } } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/things/{thingName}": { "get": { "summary": "Get Thing", "description": "Get thing", "operationId": "Thing.GetThing", "tags": [ "Thing" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "thingName", "description": "The name of IoT device", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "thingArn": { "type": "string" }, "thingName": { "type": "string" }, "thingTypeName": { "type": "string" }, "attributes": { "type": "object", "properties": {}, "required": [] }, "shadows": { "type": "object", "properties": {}, "required": [] }, "version": { "type": "number" } }, "required": [ "thingArn", "thingName", "thingTypeName", "attributes", "shadows", "version" ] }, "description": "Data of the things." } }, "required": [ "data" ] }, "example": { "data": { "thingArn": "arn:aws:iot:ap-northeast-1:012345678901:thing/o-organizationId-a-24e124148b323456", "thingName": "o-organizationId-a-24e124148b323456", "thingTypeName": "o-organizationId-Default", "attributes": { "assetTypeId": "o-organizationId-at-assetType", "createdAt": "2024-01-01T00:00:00.000Z", "integrationId": "o-organizationId-is-integrationId", "locationId": "o-organizationId-l-locationId" }, "shadows": { "DeviceUplink": { "state": { "reported": { "Payload": { "Temperature": 25.4, "Humidity": 62, "CO2": 869, "rssi": -91 }, "ExpiredAt": 1711341602287 } }, "metadata": { "reported": { "Payload": { "Temperature": { "timestamp": 1711330802 }, "Humidity": { "timestamp": 1711330802 }, "CO2": { "timestamp": 1711330802 }, "rssi": { "timestamp": 1711330802 } }, "ExpiredAt": { "timestamp": 1711330802 } } }, "version": 21415, "timestamp": 1711330849 }, "version": 1 } } }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/thing-groups": { "get": { "summary": "List thing groups", "description": "List thing groups", "operationId": "Thing.ListThingGroups", "tags": [ "Thing" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "thingTypeName", "description": "The name of IoT type", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "maxResults", "description": "The maximum number of results to return.", "in": "query", "schema": { "type": "string", "default": "10" }, "required": false }, { "name": "nextToken", "description": "To retrieve the next set of results.", "in": "query", "schema": { "type": "string" }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "groupArn": { "type": "string" }, "groupName": { "type": "string" } }, "required": [ "groupArn", "groupName" ] }, "description": "Data of the thing groups." }, "nextToken": { "type": "string", "description": "To retrieve the next set of results." } }, "required": [ "data" ] }, "example": { "data": [ { "groupArn": "arn:aws:iot:ap-northeast-1:012345678901:thing/o-organizationId-a-24e124148b323456", "groupName": "o-organizationId-a-24e124148b323456" } ] }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/things": { "get": { "summary": "List things", "description": "List things", "operationId": "Thing.ListThings", "tags": [ "Thing" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "thingTypeName", "description": "The name of IoT type", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "maxResults", "description": "The maximum number of results to return.", "in": "query", "schema": { "type": "string", "default": "10" }, "required": false }, { "name": "nextToken", "description": "To retrieve the next set of results.", "in": "query", "schema": { "type": "string" }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "thingArn": { "type": "string" }, "thingName": { "type": "string" }, "thingTypeName": { "type": "string" }, "attributes": { "type": "object", "properties": {}, "required": [] }, "version": { "type": "number" } }, "required": [ "thingArn", "thingName", "thingTypeName", "attributes", "version" ] }, "description": "Data of the things." }, "nextToken": { "type": "string", "description": "To retrieve the next set of results." } }, "required": [ "data" ] }, "example": { "data": [ { "thingArn": "arn:aws:iot:ap-northeast-1:012345678901:thing/o-organizationId-a-24e124148b323456", "thingName": "o-organizationId-a-24e124148b323456", "thingTypeName": "o-organizationId-Default", "attributes": { "assetTypeId": "o-organizationId-at-assetType", "createdAt": "2024-01-01T00:00:00.000Z", "integrationId": "o-organizationId-is-integrationId", "locationId": "o-organizationId-l-locationId" }, "shadows": { "DeviceUplink": { "state": { "reported": { "Payload": { "Temperature": 25.4, "Humidity": 62, "CO2": 869, "rssi": -91 }, "ExpiredAt": 1711341602287 } }, "metadata": { "reported": { "Payload": { "Temperature": { "timestamp": 1711330802 }, "Humidity": { "timestamp": 1711330802 }, "CO2": { "timestamp": 1711330802 }, "rssi": { "timestamp": 1711330802 } }, "ExpiredAt": { "timestamp": 1711330802 } } }, "version": 21415, "timestamp": 1711330849 }, "version": 1 } } ] }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/v2/organizations/{organizationId}/users/{userId}/2fa/settings": { "get": { "summary": "Get 2FA Settings", "description": "Get user's 2FA settings including whether it's enforced by organization", "operationId": "TwoFactorAuth.Get2FASettings", "tags": [ "TwoFactorAuth" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "userId", "description": "User ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "twoFactorEnabled": { "type": "boolean" }, "twoFactorMethod": { "type": "string" }, "isOrganizationEnforced": { "type": "boolean" }, "canToggle": { "type": "boolean" }, "trustedDeviceCount": { "type": "number" } }, "required": [ "twoFactorEnabled", "twoFactorMethod", "isOrganizationEnforced", "canToggle", "trustedDeviceCount" ], "description": "Response data" } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } } }, "security": [ { "user (self-access only)": [] } ] }, "put": { "summary": "Update 2FA Settings", "description": "Update user's 2FA settings. Requires current 2FA code to disable.", "operationId": "TwoFactorAuth.Update2FASettings", "tags": [ "TwoFactorAuth" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "userId", "description": "User ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "twoFactorEnabled": { "type": "boolean", "description": "Whether to enable or disable 2FA" }, "verificationCode": { "type": "string", "description": "Required when disabling 2FA (current 2FA code)" } }, "required": [ "twoFactorEnabled" ] }, "example": {}, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "twoFactorEnabled": { "type": "boolean" }, "twoFactorMethod": { "type": "string" }, "message": { "type": "string" } }, "required": [ "twoFactorEnabled", "twoFactorMethod", "message" ], "description": "Response data" } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user (self-access only)": [] } ] } }, "/v2/organizations/{organizationId}/security-settings": { "get": { "summary": "Get Organization Security Settings", "description": "Get organization's security settings including 2FA enforcement status.\n Accessible to the org owner, canonical FacilityOwner, or OrganizationAdmin actorRole.", "operationId": "TwoFactorAuth.GetOrgSecuritySettings", "tags": [ "TwoFactorAuth" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "organizationId": { "type": "string" }, "force2FAEnabled": { "type": "boolean" }, "force2FAEnabledAt": { "type": "number" }, "force2FAEnabledBy": { "type": "string" }, "isOwner": { "type": "boolean" } }, "required": [ "organizationId", "force2FAEnabled", "force2FAEnabledAt", "force2FAEnabledBy", "isOwner" ], "description": "Response data" } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } } }, "security": [ { "owner": [] } ] }, "put": { "summary": "Update Organization Security Settings", "description": "Update organization's security settings including 2FA enforcement.\n The org owner, canonical FacilityOwner, or OrganizationAdmin actorRole can modify these settings.\n When enabling force 2FA, an announcement email is sent to all users.", "operationId": "TwoFactorAuth.UpdateOrgSecuritySettings", "tags": [ "TwoFactorAuth" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "force2FAEnabled": { "type": "boolean", "description": "Whether to enforce 2FA for all users" } }, "required": [ "force2FAEnabled" ] }, "example": {}, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "organizationId": { "type": "string" }, "force2FAEnabled": { "type": "boolean" }, "force2FAEnabledAt": { "type": "number" }, "force2FAEnabledBy": { "type": "string" }, "message": { "type": "string" }, "announcementSent": { "type": "boolean" } }, "required": [ "organizationId", "force2FAEnabled", "force2FAEnabledAt", "force2FAEnabledBy", "message", "announcementSent" ], "description": "Response data" } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "owner": [] } ] } }, "/v2/organizations/{organizationId}/users/{userId}/2fa/devices": { "get": { "summary": "List Trusted Devices", "description": "List all trusted devices for a user", "operationId": "TwoFactorAuth.ListTrustedDevices", "tags": [ "TwoFactorAuth" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "userId", "description": "User ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "limit", "description": "Maximum number of devices to return (max 100)", "in": "query", "schema": { "type": "number", "default": 50 }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "deviceName": { "type": "string" }, "lastUsedAt": { "type": "number" }, "lastUsedAtFormatted": { "type": "string" }, "createdAt": { "type": "number" }, "createdAtFormatted": { "type": "string" }, "trustExpiresAt": { "type": "number" }, "trustExpiresAtFormatted": { "type": "string" }, "loginCount": { "type": "number" } }, "required": [ "id", "deviceName", "lastUsedAt", "lastUsedAtFormatted", "createdAt", "createdAtFormatted", "trustExpiresAt", "trustExpiresAtFormatted", "loginCount" ] }, "description": "List of trusted devices" }, "metadata": { "type": "object", "properties": { "totalCount": { "type": "number" }, "limit": { "type": "number" } }, "required": [ "totalCount", "limit" ], "description": "Response metadata" } }, "required": [ "data", "metadata" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } } }, "security": [ { "user (self-access only)": [] } ] } }, "/v2/organizations/{organizationId}/users/{userId}/2fa/devices/{deviceId}": { "delete": { "summary": "Remove Trusted Device", "description": "Remove a trusted device from the user's account", "operationId": "TwoFactorAuth.RemoveTrustedDevice", "tags": [ "TwoFactorAuth" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "userId", "description": "User ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "deviceId", "description": "Device ID to remove", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "message": { "type": "string" }, "deviceId": { "type": "string" } }, "required": [ "message", "deviceId" ], "description": "Response data" } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } } }, "security": [ { "user (self-access only)": [] } ] } }, "/v2/authentications/2fa/resend": { "post": { "summary": "Resend 2FA Code", "description": "Resend a new 2FA verification code to the user's email (rate limited: 60s cooldown)", "operationId": "TwoFactorAuth.Resend2FACode", "tags": [ "TwoFactorAuth" ], "parameters": [], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "sessionToken": { "type": "string", "description": "Encrypted session token from login response" } }, "required": [ "sessionToken" ] }, "example": {}, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "message": { "type": "string" }, "sessionToken": { "type": "string" }, "expiresIn": { "type": "number" }, "nextResendAvailableAt": { "type": "number" } }, "required": [ "message", "sessionToken", "expiresIn", "nextResendAvailableAt" ], "description": "Response data" } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "400": { "description": "The request has invalid data.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has invalid data." }, "message": { "type": "string", "description": "The request has invalid data message." } }, "required": [ "error", "message" ] }, "example": { "error": "Bad Request", "message": "The request cannot be processed due to a bad request." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [] } }, "/v2/authentications/2fa/verify": { "post": { "summary": "Verify 2FA Code", "description": "Verify the 6-digit OTP code sent to user's email during 2FA login", "operationId": "TwoFactorAuth.Verify2FACode", "tags": [ "TwoFactorAuth" ], "parameters": [], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "description": "6-digit OTP code" }, "sessionToken": { "type": "string", "description": "Encrypted session token from login response" }, "rememberDevice": { "type": "boolean", "default": "false", "description": "Whether to trust this device for 30 days" }, "deviceFingerprint": { "type": "object", "properties": {}, "required": [], "description": "Device information for \"remember device\" feature" } }, "required": [ "code", "sessionToken" ] }, "example": {}, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "token": { "type": "string" }, "accessToken": { "type": "string" }, "refreshToken": { "type": "string" }, "idToken": { "type": "string" }, "tokenType": { "type": "string" }, "expiresIn": { "type": "number" }, "deviceTrusted": { "type": "boolean" } }, "required": [ "token", "accessToken", "refreshToken", "idToken", "tokenType", "expiresIn", "deviceTrusted" ], "description": "Response data" } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "400": { "description": "The request has invalid data.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has invalid data." }, "message": { "type": "string", "description": "The request has invalid data message." } }, "required": [ "error", "message" ] }, "example": { "error": "Bad Request", "message": "The request cannot be processed due to a bad request." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [] } }, "/organizations/{organizationId}/plans/compare": { "get": { "summary": "Get Plan Comparison", "description": "Compare current plan with target plan for downgrade warning (V2 API)", "operationId": "Usage.GetPlanComparison", "tags": [ "Usage" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "targetPlan", "description": "Target plan ID (lite, basic, professional, enterprise)", "in": "query", "schema": { "type": "string" }, "required": true } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "currentPlan": { "type": "object", "properties": {}, "required": [] }, "targetPlan": { "type": "object", "properties": {}, "required": [] }, "isDowngrade": { "type": "boolean" }, "featuresLost": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] } }, "limitChanges": { "type": "array", "items": { "type": "object", "properties": { "usageAvailable": { "type": "boolean" }, "calculationMethod": { "type": "string" } }, "required": [ "usageAvailable", "calculationMethod" ] } }, "recommendation": { "type": "object", "properties": {}, "required": [] } }, "required": [ "currentPlan", "targetPlan", "isDowngrade", "featuresLost", "limitChanges" ], "description": "Plan comparison data" } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/usage/summary": { "get": { "summary": "Get Usage Summary", "description": "Get comprehensive usage summary for organization (V2 API)", "operationId": "Usage.GetUsageSummary", "tags": [ "Usage" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "organizationId": { "type": "string" }, "subscriptionStatus": { "type": "string" }, "planName": { "type": "string" }, "trial": { "type": "object", "properties": {}, "required": [] }, "gracePeriod": { "type": "object", "properties": {}, "required": [] }, "resources": { "type": "object", "properties": {}, "required": [] }, "communication": { "type": "object", "properties": {}, "required": [] }, "quotaBreakdown": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] } }, "featuresUsed": { "type": "array", "items": { "type": "string" } }, "period": { "type": "object", "properties": {}, "required": [] } }, "required": [ "organizationId", "subscriptionStatus", "planName", "resources", "communication", "quotaBreakdown", "featuresUsed", "period" ], "description": "Usage summary data" } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/users/{userId}/notifications": { "post": { "summary": "Create User Device Endpoint", "description": "Create User Device Endpoint", "operationId": "User_Notification.CreateUserDeviceEndpoint", "tags": [ "User Notification" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "userId", "description": "The ID of user.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "endpoint": { "type": "string", "description": "The equivalent endpoint of phone or browser." }, "platform": { "type": "string", "description": "The notification platform(GCM, APNS, APNS_SANDBOX, BROWSER)." } }, "required": [ "endpoint", "platform" ] }, "example": {}, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": {}, "required": [], "description": "Registration success." } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "delete": { "summary": "Delete User Device Endpoint", "description": "Delete User Device Endpoint", "operationId": "User_Notification.DeleteUserDeviceEndpoint", "tags": [ "User Notification" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "userId", "description": "The ID of user.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": {}, "required": [], "description": "Cancel registration success." } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "List User Notifications", "description": "List user notifications", "operationId": "User_Notification.ListUserNotifications", "tags": [ "User Notification" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "userId", "description": "The ID of user.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "startDate", "description": "The start date number of timestamp. (Default: 1700000000000)", "in": "query", "schema": { "type": "number" }, "required": false }, { "name": "endDate", "description": "The end date number of timestamp. (Default: 1700000000000)", "in": "query", "schema": { "type": "number" }, "required": false }, { "name": "maxResults", "description": "The maximum number of results to return.", "in": "query", "schema": { "type": "number", "minimum": 10, "maximum": 100 }, "required": false }, { "name": "nextToken", "description": "To retrieve the next set of results.", "in": "query", "schema": { "type": "string" }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "notificationId": { "type": "string" }, "userId": { "type": "string" }, "source": { "type": "string" }, "sourceId": { "type": "string" }, "title": { "type": "string" }, "description": { "type": "string" }, "address": { "type": "string" }, "chatRoomId": { "type": "string" }, "entities": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] } }, "image": { "type": "string" }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" } }, "required": [ "id", "notificationId", "userId", "source", "sourceId", "title", "description", "address", "chatRoomId", "entities", "image", "createdAtDateString", "createdAt" ] }, "description": "An array of user notification data." } }, "required": [ "data" ] }, "example": { "data": [ { "id": "ABCDE", "notificationId": "nf-notificationId", "userId": "593b34c0-xxxx-xxxx-xxxx-a454c6f9f50dd", "source": "Asset", "sourceId": "ABCDE", "title": "IDT-Asset-Title", "description": "IDT-Asset-Description", "address": "Taipei City", "chatRoomId": "ABCDE", "entities": [], "image": "abc.png", "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000 } ] }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/webhooks": { "post": { "summary": "Create Webhook", "description": "Register a new webhook subscription. The signing secret is only returned in this response — store it securely.", "operationId": "Webhook.CreateWebhook", "tags": [ "Webhook" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "url": { "type": "string", "description": "HTTPS endpoint URL to receive webhook events." }, "events": { "type": "array", "items": { "type": "string" }, "description": "Event types to subscribe to (e.g. 'asset.created', '*'). Max 20." }, "payloadMode": { "type": "string", "enum": [ "\"thin\"", "\"fat\"" ], "default": "thin", "description": "Payload mode: 'thin' sends IDs only, 'fat' sends full entity." }, "description": { "type": "string", "description": "Optional description (max 200 chars)." }, "metadata": { "type": "object", "properties": {}, "required": [], "description": "Optional key-value metadata (max 10 keys, key max 40 chars, value max 500 chars)." }, "filtering": { "type": "object", "properties": {}, "required": [], "description": "Event filtering configuration. Only mode 'include' supported in v1." } }, "required": [ "url", "events" ] }, "example": {}, "description": "" } }, "required": true }, "responses": { "201": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "webhook": { "type": "object", "properties": {}, "required": [] }, "signingSecret": { "type": "string" } }, "required": [ "webhook", "signingSecret" ], "description": "Create result." } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "List Webhooks", "description": "List all webhook subscriptions for an organization with optional status filter and cursor pagination.", "operationId": "Webhook.ListWebhooks", "tags": [ "Webhook" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "status", "description": "Filter by webhook status.", "in": "query", "schema": { "type": "string", "enum": [ "\"active\"", "\"suspended\"", "\"disabled\"" ] }, "required": false }, { "name": "cursor", "description": "Pagination cursor from previous response.", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "limit", "description": "Number of items per page.", "in": "query", "schema": { "type": "number", "minimum": 1, "maximum": 100, "default": 20 }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] }, "description": "Array of webhook objects." }, "meta": { "type": "object", "properties": { "cursor": { "type": "string" }, "hasMore": { "type": "boolean" } }, "required": [ "cursor", "hasMore" ], "description": "Pagination metadata." } }, "required": [ "data", "meta" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/webhooks/{webhookId}": { "delete": { "summary": "Delete Webhook", "description": "Soft-delete a webhook subscription and clean up its signing secrets from SSM.", "operationId": "Webhook.DeleteWebhook", "tags": [ "Webhook" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "webhookId", "description": "Webhook ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "204": { "content": { "application/json": { "schema": { "type": "object", "properties": { "-": { "type": "string", "description": "No content." } }, "required": [ "-" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "Get Webhook", "description": "Get a single webhook subscription by ID.", "operationId": "Webhook.GetWebhook", "tags": [ "Webhook" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "webhookId", "description": "Webhook ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": {}, "required": [], "description": "Webhook object." } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "patch": { "summary": "Update Webhook", "description": "Update a webhook subscription. At least one field must be provided.", "operationId": "Webhook.UpdateWebhook", "tags": [ "Webhook" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "webhookId", "description": "Webhook ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "url": { "type": "string", "description": "HTTPS endpoint URL." }, "events": { "type": "array", "items": { "type": "string" }, "description": "Event types (1-20 items)." }, "payloadMode": { "type": "string", "enum": [ "\"thin\"", "\"fat\"" ], "description": "Payload mode." }, "status": { "type": "string", "enum": [ "\"active\"", "\"disabled\"" ], "description": "Webhook status." }, "description": { "type": "string", "description": "Description (max 200 chars)." }, "metadata": { "type": "object", "properties": {}, "required": [], "description": "Key-value metadata (max 10 keys)." }, "filtering": { "type": "object", "properties": {}, "required": [], "description": "Event filtering configuration. Only mode 'include' supported in v1." } }, "required": [] }, "example": {}, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": {}, "required": [], "description": "Updated webhook object." } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/webhooks/{webhookId}/deliveries": { "get": { "summary": "List Deliveries", "description": "List delivery logs for a webhook with optional status/eventType filter and cursor pagination.", "operationId": "Webhook.ListWebhookDeliveries", "tags": [ "Webhook" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "webhookId", "description": "Webhook ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "status", "description": "Filter by delivery status.", "in": "query", "schema": { "type": "string", "enum": [ "\"success\"", "\"failed\"" ] }, "required": false }, { "name": "eventType", "description": "Filter by event type.", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "cursor", "description": "Pagination cursor.", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "limit", "description": "Number of items per page.", "in": "query", "schema": { "type": "number", "minimum": 1, "maximum": 100, "default": 20 }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] }, "description": "Array of delivery log objects." }, "meta": { "type": "object", "properties": { "cursor": { "type": "string" }, "hasMore": { "type": "boolean" } }, "required": [ "cursor", "hasMore" ], "description": "Pagination metadata." } }, "required": [ "data", "meta" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/webhooks/{webhookId}/deliveries/{deliveryId}/retry": { "post": { "summary": "Retry Delivery", "description": "Retry a specific failed delivery by re-enqueuing it to SQS.", "operationId": "Webhook.RetryWebhookDelivery", "tags": [ "Webhook" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "webhookId", "description": "Webhook ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "deliveryId", "description": "Delivery ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "eventId": { "type": "string" } }, "required": [ "eventId" ], "description": "Retry result." } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/webhooks/{webhookId}/rotate-secret": { "post": { "summary": "Rotate Webhook Secret", "description": "Rotate the HMAC signing secret. 'graceful' keeps the old secret valid for 24 hours. 'immediate' invalidates it instantly.", "operationId": "Webhook.RotateWebhookSecret", "tags": [ "Webhook" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "webhookId", "description": "Webhook ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "mode": { "type": "string", "enum": [ "\"graceful\"", "\"immediate\"" ], "description": "Rotation mode." } }, "required": [ "mode" ] }, "example": {}, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "signingSecret": { "type": "string" }, "previousSecretExpiresAt": { "type": "number" } }, "required": [ "signingSecret" ], "description": "Rotation result." } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/webhooks/{webhookId}/test": { "post": { "summary": "Test Webhook", "description": "Send a test event to the webhook endpoint to verify connectivity. Enqueues a 'webhook.test' event via SQS.", "operationId": "Webhook.TestWebhook", "tags": [ "Webhook" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "webhookId", "description": "Webhook ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "eventId": { "type": "string" } }, "required": [ "eventId" ], "description": "Test result." } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/event-rules": { "post": { "summary": "Create Event Rule", "description": "Create new event rule", "operationId": "Workflows.CreateEventRule", "tags": [ "Workflows" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of event rule." }, "description": { "type": "string", "description": "The description of event rule." }, "stage": { "type": "string", "description": "The stage of event rule." }, "expression": { "type": "string", "description": "The expression of event rule." }, "conditions": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] }, "description": "The conditions of event rule." }, "devices": { "type": "array", "items": { "type": "string" }, "description": "The devices of event rule." }, "period": { "type": "object", "properties": {}, "required": [], "description": "The period of event rule." }, "actions": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] }, "description": "The actions of event rule." }, "hashtags": { "type": "array", "items": { "type": "string" }, "description": "The hashtags of event rule." }, "status": { "type": "string", "description": "The status of event rule." } }, "required": [ "name", "stage", "period", "actions", "status" ] }, "example": { "name": "IDT-EventRule", "description": "IDT-EventRule-Description", "stage": "IoTCore", "status": "Enabled", "targetName": "IoTCore-Target-Name", "expression": "IoTCore-Expression", "hashtags": [ "Important" ], "conditions": [ { "assetIds": [ "a-assetId" ], "property": "Temperature", "symbol": ">", "valueDataType": "integer", "value": "25", "operator": "AND" } ], "devices": [ "a-assetId" ], "period": { "startTime": { "hour": 20, "minute": 34 }, "endTime": { "hour": 21, "minute": 34 }, "dayOfWeek": [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ], "dayOfMonth": [ 31 ] }, "actions": [ { "type": "enqueue", "parameters": { "name": "Power Off", "assetId": "a-assetId", "confirmed": true, "fPort": 85, "payload": "080000ff", "payloadDataType": "string" } } ] }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "name": { "type": "string" }, "description": { "type": "string" }, "stage": { "type": "string" }, "status": { "type": "string" }, "targetName": { "type": "string" }, "expression": { "type": "string" }, "hashtags": { "type": "array", "items": { "type": "string" } }, "conditions": { "type": "array", "items": { "type": "object", "properties": { "assetId": { "type": "string" }, "property": { "type": "string" }, "symbol": { "type": "string" }, "valueDataType": { "type": "string" }, "value": { "type": "string" }, "operator": { "type": "string" } }, "required": [ "assetId", "property", "symbol", "valueDataType", "value", "operator" ] } }, "devices": { "type": "array", "items": { "type": "string" } }, "period": { "type": "object", "properties": { "startTime": { "type": "object", "properties": {}, "required": [] }, "endTime": { "type": "object", "properties": {}, "required": [] }, "dayOfWeek": { "type": "array", "items": { "type": "string" } }, "dayOfMonth": { "type": "array", "items": { "type": "number" } } }, "required": [ "startTime", "endTime", "dayOfWeek", "dayOfMonth" ] }, "actions": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string" }, "parameters": { "type": "object", "properties": {}, "required": [] } }, "required": [ "type", "parameters" ] } }, "createdBy": { "type": "string" }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" } }, "required": [ "name", "description", "stage", "status", "targetName", "expression", "hashtags", "conditions", "devices", "period", "actions", "createdBy", "createdAtDateString", "createdAt" ], "description": "Data of the event rule." } }, "required": [ "data" ] }, "example": { "data": { "name": "IDT-EventRule", "description": "IDT-EventRule-Description", "stage": "IoTCore", "status": "Enabled", "targetName": "IoTCore-Target-Name", "expression": "IoTCore-Expression", "hashtags": [ "Important" ], "conditions": [ { "assetIds": [ "a-assetId" ], "property": "Temperature", "symbol": ">", "valueDataType": "integer", "value": "25", "operator": "AND" } ], "devices": [ "a-assetId" ], "period": { "startTime": { "hour": 20, "minute": 34 }, "endTime": { "hour": 21, "minute": 34 }, "dayOfWeek": [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ], "dayOfMonth": [ 31 ] }, "actions": [ { "type": "enqueue", "parameters": { "name": "Power Off", "assetId": "a-assetId", "confirmed": true, "fPort": 85, "payload": "080000ff", "payloadDataType": "string" } } ], "createdBy": "d6b0e137-xxxx-xxxx-xxxx-c944cc12a5f4", "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "List Event Rules", "description": "List event rules", "operationId": "Workflows.ListEventRules", "tags": [ "Workflows" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "stage", "description": "The stage of event rule.", "in": "query", "schema": { "type": "string", "enum": [ "Edge", "IoTCore" ] }, "required": false }, { "name": "maxResults", "description": "The maximum number of results to return.", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "nextToken", "description": "To retrieve the next set of results.", "in": "query", "schema": { "type": "string" }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "organizationId": { "type": "string" }, "name": { "type": "string" }, "stage": { "type": "string" }, "status": { "type": "string" }, "targetName": { "type": "string" }, "expression": { "type": "string" }, "hashtags": { "type": "array", "items": { "type": "string" } }, "conditions": { "type": "array", "items": { "type": "object", "properties": { "assetId": { "type": "string" }, "property": { "type": "string" }, "symbol": { "type": "string" }, "valueDataType": { "type": "string" }, "value": { "type": "string" }, "operator": { "type": "string" } }, "required": [ "assetId", "property", "symbol", "valueDataType", "value", "operator" ] } }, "devices": { "type": "array", "items": { "type": "string" } }, "actions": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string" }, "parameters": { "type": "object", "properties": {}, "required": [] } }, "required": [ "type", "parameters" ] } }, "createdBy": { "type": "string" }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "id", "organizationId", "name", "stage", "status", "targetName", "expression", "hashtags", "conditions", "devices", "actions", "createdBy", "createdAtDateString", "createdAt", "updatedAtDateString", "updatedAt" ] }, "description": "An array of event rule objects." } }, "required": [ "data" ] }, "example": { "data": [ { "id": "er_eventRuleId", "organizationId": "o-organizationId", "name": "IDT-EventRule", "stage": "IoTCore", "status": "Enabled", "targetName": "IoTCore-Target-Name", "expression": "IoTCore-Expression", "hashtags": [ "Important" ], "conditions": [ { "assetIds": [ "a-assetId" ], "property": "Temperature", "symbol": ">", "valueDataType": "integer", "value": "25", "operator": "AND" } ], "devices": [ "a-assetId" ], "actions": [ { "type": "enqueue", "parameters": { "name": "Power Off", "assetId": "a-assetId", "confirmed": true, "fPort": 85, "payload": "080000ff", "payloadDataType": "string" } } ], "createdBy": "d6b0e137-xxxx-xxxx-xxxx-c944cc12a5f4", "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000, "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1706659200000 } ] }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/event-schedules": { "post": { "summary": "Create Event Schedule", "description": "Create new event rule", "operationId": "Workflows.CreateEventSchedule", "tags": [ "Workflows" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of event schedule." }, "description": { "type": "string", "description": "The description of event schedule." }, "stage": { "type": "string", "description": "The stage of event schedule." }, "targetName": { "type": "string", "description": "The target name of event schedule, when stage is edge." }, "expressionType": { "type": "string", "description": "The expression type of event schedule." }, "oneTimeExpression": { "type": "number", "description": "The one-time expression of event schedule." }, "cronExpression": { "type": "object", "properties": {}, "required": [], "description": "The cron expression of event schedule." }, "rateExpression": { "type": "object", "properties": {}, "required": [], "description": "The rate expression of event schedule." }, "timezone": { "type": "number", "description": "The timezone of event schedule." }, "startDate": { "type": "number", "description": "The start date of event schedule." }, "endDate": { "type": "number", "description": "The end date of event schedule." }, "actions": { "type": "array", "items": { "type": "string" }, "description": "The actions of event schedule." }, "hashtags": { "type": "array", "items": { "type": "string" }, "description": "The hashtags of event rule." }, "status": { "type": "string", "description": "The status of event schedule." } }, "required": [ "name", "stage", "expressionType", "actions", "status" ] }, "example": { "name": "IDT-EventSchedule", "description": "IDT-EventSchedule-Description", "stage": "EventBridgeScheduler", "status": "Enabled", "targetName": "IoTCore-Target-Name", "expressionType": "cron", "hashtags": [ "Important" ], "cronExpression": { "atHours": 11, "atMinutes": 47, "dayOfMonth": [ 7 ] }, "actions": [ { "type": "EnqueueDevice", "parameters": { "name": "Power Off", "assetId": "a-assetId", "confirmed": true, "fPort": 85, "payload": "080000ff", "payloadDataType": "string" } } ] }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "name": { "type": "string" }, "description": { "type": "string" }, "stage": { "type": "string" }, "status": { "type": "string" }, "targetName": { "type": "string" }, "expressionType": { "type": "string" }, "hashtags": { "type": "array", "items": { "type": "string" } }, "cronExpression": { "type": "object", "properties": { "atHours": { "type": "number" }, "atMinutes": { "type": "number" }, "dayOfMonth": { "type": "array", "items": { "type": "number" } } }, "required": [ "atHours", "atMinutes", "dayOfMonth" ] }, "actions": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string" }, "parameters": { "type": "object", "properties": { "name": { "type": "string" }, "assetId": { "type": "string" }, "confirmed": { "type": "boolean" }, "fPort": { "type": "number" }, "payload": { "type": "string" }, "payloadDataType": { "type": "string" } }, "required": [ "name", "assetId", "confirmed", "fPort", "payload", "payloadDataType" ] } }, "required": [ "type", "parameters" ] } }, "createdBy": { "type": "string" }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" } }, "required": [ "name", "description", "stage", "status", "targetName", "expressionType", "hashtags", "cronExpression", "actions", "createdBy", "createdAtDateString", "createdAt" ], "description": "Data of the event schedule." } }, "required": [ "data" ] }, "example": { "data": { "name": "IDT-EventSchedule", "description": "IDT-EventSchedule-Description", "stage": "EventBridgeScheduler", "status": "Enabled", "targetName": "IoTCore-Target-Name", "expressionType": "cron", "hashtags": [ "Important" ], "cronExpression": { "atHours": 11, "atMinutes": 47, "dayOfMonth": [ 7 ] }, "actions": [ { "type": "EnqueueDevice", "parameters": { "name": "Power Off", "assetId": "a-assetId", "confirmed": true, "fPort": 85, "payload": "080000ff", "payloadDataType": "string" } } ], "createdBy": "d6b0e137-xxxx-xxxx-xxxx-c944cc12a5f4", "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "List Event Schedules", "description": "List event schedules", "operationId": "Workflows.ListEventSchedules", "tags": [ "Workflows" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "stage", "description": "The stage of event schedule.", "in": "query", "schema": { "type": "string", "enum": [ "Edge", "EventBridgeScheduler" ] }, "required": false }, { "name": "maxResults", "description": "The maximum number of results to return.", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "nextToken", "description": "To retrieve the next set of results.", "in": "query", "schema": { "type": "string" }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "description": { "type": "string" }, "stage": { "type": "string" }, "status": { "type": "string" }, "targetName": { "type": "string" }, "expressionType": { "type": "string" }, "hashtags": { "type": "array", "items": { "type": "string" } }, "cronExpression": { "type": "object", "properties": { "atHours": { "type": "number" }, "atMinutes": { "type": "number" }, "dayOfMonth": { "type": "array", "items": { "type": "number" } } }, "required": [ "atHours", "atMinutes", "dayOfMonth" ] }, "actions": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string" }, "parameters": { "type": "object", "properties": { "name": { "type": "string" }, "assetId": { "type": "string" }, "confirmed": { "type": "boolean" }, "fPort": { "type": "number" }, "payload": { "type": "string" }, "payloadDataType": { "type": "string" } }, "required": [ "name", "assetId", "confirmed", "fPort", "payload", "payloadDataType" ] } }, "required": [ "type", "parameters" ] } }, "createdBy": { "type": "string" }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "name", "description", "stage", "status", "targetName", "expressionType", "hashtags", "cronExpression", "actions", "createdBy", "createdAtDateString", "createdAt", "updatedAtDateString", "updatedAt" ] }, "description": "An array of event schedule objects." } }, "required": [ "data" ] }, "example": { "data": [ { "name": "IDT-EventSchedule", "description": "IDT-EventSchedule-Description", "stage": "EventBridgeScheduler", "status": "Enabled", "targetName": "IoTCore-Target-Name", "expressionType": "cron", "hashtags": [ "Important" ], "cronExpression": { "atHours": 11, "atMinutes": 47, "dayOfMonth": [ 7 ] }, "actions": [ { "type": "EnqueueDevice", "parameters": { "name": "Power Off", "assetId": "a-assetId", "confirmed": true, "fPort": 85, "payload": "080000ff", "payloadDataType": "string" } } ], "createdBy": "d6b0e137-xxxx-xxxx-xxxx-c944cc12a5f4", "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000, "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1706659200000 } ] }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/event-rules/{eventRuleId}": { "delete": { "summary": "Delete Event Rule", "description": "Delete event rule", "operationId": "Workflows.DeleteEventRule", "tags": [ "Workflows" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "eventRuleId", "description": "The ID of event rule.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": {}, "required": [], "description": "Data of the event rule." } }, "required": [ "data" ] }, "example": { "data": { "deleted": true } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "Get Event Rule", "description": "Get event rule", "operationId": "Workflows.GetEventRule", "tags": [ "Workflows" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "eventRuleId", "description": "The ID of event rule.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "name": { "type": "string" }, "description": { "type": "string" }, "stage": { "type": "string" }, "status": { "type": "string" }, "targetName": { "type": "string" }, "expression": { "type": "string" }, "hashtags": { "type": "array", "items": { "type": "string" } }, "conditions": { "type": "array", "items": { "type": "object", "properties": { "assetId": { "type": "string" }, "property": { "type": "string" }, "symbol": { "type": "string" }, "valueDataType": { "type": "string" }, "value": { "type": "string" }, "operator": { "type": "string" } }, "required": [ "assetId", "property", "symbol", "valueDataType", "value", "operator" ] } }, "devices": { "type": "array", "items": { "type": "string" } }, "period": { "type": "object", "properties": { "startTime": { "type": "object", "properties": {}, "required": [] }, "endTime": { "type": "object", "properties": {}, "required": [] }, "dayOfWeek": { "type": "array", "items": { "type": "string" } }, "dayOfMonth": { "type": "array", "items": { "type": "number" } } }, "required": [ "startTime", "endTime", "dayOfWeek", "dayOfMonth" ] }, "actions": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string" }, "parameters": { "type": "object", "properties": { "name": { "type": "string" }, "assetId": { "type": "string" }, "confirmed": { "type": "boolean" }, "fPort": { "type": "number" }, "payload": { "type": "string" }, "payloadDataType": { "type": "string" } }, "required": [ "name", "assetId", "confirmed", "fPort", "payload", "payloadDataType" ] } }, "required": [ "type", "parameters" ] } }, "createdBy": { "type": "string" }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "name", "description", "stage", "status", "targetName", "expression", "hashtags", "conditions", "devices", "period", "actions", "createdBy", "createdAtDateString", "createdAt", "updatedAtDateString", "updatedAt" ], "description": "Data of the event rule." } }, "required": [ "data" ] }, "example": { "data": { "name": "IDT-EventRule", "description": "IDT-EventRule-Description", "stage": "IoTCore", "status": "Enabled", "targetName": "IoTCore-Target-Name", "expression": "IoTCore-Expression", "hashtags": [ "Important" ], "conditions": [ { "assetIds": [ "a-assetId" ], "property": "Temperature", "symbol": ">", "valueDataType": "integer", "value": "25", "operator": "AND" } ], "devices": [ "a-assetId" ], "period": { "startTime": { "hour": 20, "minute": 34 }, "endTime": { "hour": 21, "minute": 34 }, "dayOfWeek": [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ], "dayOfMonth": [ 31 ] }, "actions": [ { "type": "enqueue", "parameters": { "name": "Power Off", "assetId": "a-assetId", "confirmed": true, "fPort": 85, "payload": "080000ff", "payloadDataType": "string" } } ], "createdBy": "d6b0e137-xxxx-xxxx-xxxx-c944cc12a5f4", "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000, "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1706659200000 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "put": { "summary": "Update Event Rule", "description": "Update event rule", "operationId": "Workflows.UpdateEventRule", "tags": [ "Workflows" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "eventRuleId", "description": "The ID of event rule.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of event rule." }, "description": { "type": "string", "description": "The description of event rule." }, "expression": { "type": "string", "description": "The expression of event rule." }, "conditions": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] }, "description": "The conditions of event rule." }, "devices": { "type": "array", "items": { "type": "string" }, "description": "The devices of event rule." }, "period": { "type": "object", "properties": {}, "required": [], "description": "The period of event rule." }, "actions": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] }, "description": "The actions of event rule." }, "hashtags": { "type": "array", "items": { "type": "string" }, "description": "The hashtags of event rule." }, "status": { "type": "string", "description": "The status of event rule." } }, "required": [ "name", "period", "actions", "status" ] }, "example": { "name": "IDT-EventRule", "description": "IDT-EventRule-Description", "stage": "IoTCore", "status": "Enabled", "targetName": "IoTCore-Target-Name", "expression": "IoTCore-Expression", "hashtags": [ "Important" ], "conditions": [ { "assetIds": [ "a-assetId" ], "property": "Temperature", "symbol": ">", "valueDataType": "integer", "value": "25", "operator": "AND" } ], "devices": [ "a-assetId" ], "period": { "startTime": { "hour": 20, "minute": 34 }, "endTime": { "hour": 21, "minute": 34 }, "dayOfWeek": [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ], "dayOfMonth": [ 31 ] }, "actions": [ { "type": "enqueue", "parameters": { "name": "Power Off", "assetId": "a-assetId", "confirmed": true, "fPort": 85, "payload": "080000ff", "payloadDataType": "string" } } ] }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "name": { "type": "string" }, "description": { "type": "string" }, "stage": { "type": "string" }, "status": { "type": "string" }, "targetName": { "type": "string" }, "expression": { "type": "string" }, "hashtags": { "type": "array", "items": { "type": "string" } }, "conditions": { "type": "array", "items": { "type": "object", "properties": { "assetId": { "type": "string" }, "property": { "type": "string" }, "symbol": { "type": "string" }, "valueDataType": { "type": "string" }, "value": { "type": "string" }, "operator": { "type": "string" } }, "required": [ "assetId", "property", "symbol", "valueDataType", "value", "operator" ] } }, "devices": { "type": "array", "items": { "type": "string" } }, "period": { "type": "object", "properties": { "startTime": { "type": "object", "properties": {}, "required": [] }, "endTime": { "type": "object", "properties": {}, "required": [] }, "dayOfWeek": { "type": "array", "items": { "type": "string" } }, "dayOfMonth": { "type": "array", "items": { "type": "number" } } }, "required": [ "startTime", "endTime", "dayOfWeek", "dayOfMonth" ] }, "actions": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string" }, "parameters": { "type": "object", "properties": { "name": { "type": "string" }, "assetId": { "type": "string" }, "confirmed": { "type": "boolean" }, "fPort": { "type": "number" }, "payload": { "type": "string" }, "payloadDataType": { "type": "string" } }, "required": [ "name", "assetId", "confirmed", "fPort", "payload", "payloadDataType" ] } }, "required": [ "type", "parameters" ] } }, "updatedBy": { "type": "string" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "name", "description", "stage", "status", "targetName", "expression", "hashtags", "conditions", "devices", "period", "actions", "updatedBy", "updatedAtDateString", "updatedAt" ], "description": "Data of the updated event rule." } }, "required": [ "data" ] }, "example": { "data": { "name": "IDT-EventRule", "description": "IDT-EventRule-Description", "stage": "IoTCore", "status": "Enabled", "targetName": "IoTCore-Target-Name", "expression": "IoTCore-Expression", "hashtags": [ "Important" ], "conditions": [ { "assetIds": [ "a-assetId" ], "property": "Temperature", "symbol": ">", "valueDataType": "integer", "value": "25", "operator": "AND" } ], "devices": [ "a-assetId" ], "period": { "startTime": { "hour": 20, "minute": 34 }, "endTime": { "hour": 21, "minute": 34 }, "dayOfWeek": [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ], "dayOfMonth": [ 31 ] }, "actions": [ { "type": "enqueue", "parameters": { "name": "Power Off", "assetId": "a-assetId", "confirmed": true, "fPort": 85, "payload": "080000ff", "payloadDataType": "string" } } ], "updatedBy": "d6b0e137-xxxx-xxxx-xxxx-c944cc12a5f4", "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1706659200000 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/event-schedules/{eventScheduleId}": { "delete": { "summary": "Delete Event Schedule", "description": "Delete event schedule", "operationId": "Workflows.DeleteEventSchedule", "tags": [ "Workflows" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "eventScheduleId", "description": "The ID of event schedule.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": {}, "required": [], "description": "Data of the event schedule." } }, "required": [ "data" ] }, "example": { "data": { "deleted": true } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "Get Event Schedule", "description": "Get event schedule", "operationId": "Workflows.GetEventSchedule", "tags": [ "Workflows" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "eventScheduleId", "description": "The ID of event schedule.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "name": { "type": "string" }, "description": { "type": "string" }, "stage": { "type": "string" }, "status": { "type": "string" }, "targetName": { "type": "string" }, "expressionType": { "type": "string" }, "hashtags": { "type": "array", "items": { "type": "string" } }, "cronExpression": { "type": "object", "properties": { "atHours": { "type": "number" }, "atMinutes": { "type": "number" }, "dayOfMonth": { "type": "array", "items": { "type": "number" } } }, "required": [ "atHours", "atMinutes", "dayOfMonth" ] }, "actions": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string" }, "parameters": { "type": "object", "properties": { "name": { "type": "string" }, "assetId": { "type": "string" }, "confirmed": { "type": "boolean" }, "fPort": { "type": "number" }, "payload": { "type": "string" }, "payloadDataType": { "type": "string" } }, "required": [ "name", "assetId", "confirmed", "fPort", "payload", "payloadDataType" ] } }, "required": [ "type", "parameters" ] } }, "createdBy": { "type": "string" }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "name", "description", "stage", "status", "targetName", "expressionType", "hashtags", "cronExpression", "actions", "createdBy", "createdAtDateString", "createdAt", "updatedAtDateString", "updatedAt" ], "description": "Data of the event schedule." } }, "required": [ "data" ] }, "example": { "data": { "name": "IDT-EventSchedule", "description": "IDT-EventSchedule-Description", "stage": "EventBridgeScheduler", "status": "Enabled", "targetName": "IoTCore-Target-Name", "expressionType": "cron", "hashtags": [ "Important" ], "cronExpression": { "atHours": 11, "atMinutes": 47, "dayOfMonth": [ 7 ] }, "actions": [ { "type": "EnqueueDevice", "parameters": { "name": "Power Off", "assetId": "a-assetId", "confirmed": true, "fPort": 85, "payload": "080000ff", "payloadDataType": "string" } } ], "createdBy": "d6b0e137-xxxx-xxxx-xxxx-c944cc12a5f4", "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000, "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1706659200000 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "put": { "summary": "Update Event Schedule", "description": "Update event schedule", "operationId": "Workflows.UpdateEventSchedule", "tags": [ "Workflows" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "eventScheduleId", "description": "The ID of event schedule.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of event schedule." }, "description": { "type": "string", "description": "The description of event schedule." }, "expressionType": { "type": "string", "description": "The expression type of event schedule." }, "oneTimeExpression": { "type": "number", "description": "The one-time expression of event schedule." }, "cronExpression": { "type": "object", "properties": {}, "required": [], "description": "The cron expression of event schedule." }, "rateExpression": { "type": "object", "properties": {}, "required": [], "description": "The rate expression of event schedule." }, "timezone": { "type": "number", "description": "The timezone of event schedule." }, "startDate": { "type": "number", "description": "The start date of event schedule." }, "endDate": { "type": "number", "description": "The end date of event schedule." }, "actions": { "type": "array", "items": { "type": "string" }, "description": "The actions of event schedule." }, "hashtags": { "type": "array", "items": { "type": "string" }, "description": "The hashtags of event schedule." }, "status": { "type": "string", "description": "The status of event schedule." } }, "required": [ "expressionType", "actions", "status" ] }, "example": { "name": "IDT-EventSchedule", "description": "IDT-EventSchedule-Description", "stage": "EventBridgeScheduler", "status": "Enabled", "targetName": "IoTCore-Target-Name", "expressionType": "cron", "hashtags": [ "Important" ], "cronExpression": { "atHours": 11, "atMinutes": 47, "dayOfMonth": [ 7 ] }, "actions": [ { "type": "EnqueueDevice", "parameters": { "name": "Power Off", "assetId": "a-assetId", "confirmed": true, "fPort": 85, "payload": "080000ff", "payloadDataType": "string" } } ] }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "name": { "type": "string" }, "description": { "type": "string" }, "stage": { "type": "string" }, "status": { "type": "string" }, "targetName": { "type": "string" }, "expressionType": { "type": "string" }, "hashtags": { "type": "array", "items": { "type": "string" } }, "cronExpression": { "type": "object", "properties": { "atHours": { "type": "number" }, "atMinutes": { "type": "number" }, "dayOfMonth": { "type": "array", "items": { "type": "number" } } }, "required": [ "atHours", "atMinutes", "dayOfMonth" ] }, "actions": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string" }, "parameters": { "type": "object", "properties": { "name": { "type": "string" }, "assetId": { "type": "string" }, "confirmed": { "type": "boolean" }, "fPort": { "type": "number" }, "payload": { "type": "string" }, "payloadDataType": { "type": "string" } }, "required": [ "name", "assetId", "confirmed", "fPort", "payload", "payloadDataType" ] } }, "required": [ "type", "parameters" ] } }, "updatedBy": { "type": "string" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "name", "description", "stage", "status", "targetName", "expressionType", "hashtags", "cronExpression", "actions", "updatedBy", "updatedAtDateString", "updatedAt" ], "description": "Data of the updated event schedule." } }, "required": [ "data" ] }, "example": { "data": { "name": "IDT-EventSchedule", "description": "IDT-EventSchedule-Description", "stage": "EventBridgeScheduler", "status": "Enabled", "targetName": "IoTCore-Target-Name", "expressionType": "cron", "hashtags": [ "Important" ], "cronExpression": { "atHours": 11, "atMinutes": 47, "dayOfMonth": [ 7 ] }, "actions": [ { "type": "EnqueueDevice", "parameters": { "name": "Power Off", "assetId": "a-assetId", "confirmed": true, "fPort": 85, "payload": "080000ff", "payloadDataType": "string" } } ], "updatedBy": "d6b0e137-xxxx-xxxx-xxxx-c944cc12a5f4", "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1706659200000 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/work-requests/{workRequestId}/accept": { "put": { "summary": "Accept Work Request", "description": "Accept work request to order", "operationId": "Works.AcceptWorkRequest", "tags": [ "Works" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "workRequestId", "description": "The ID of work request.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "organizationId": { "type": "string" }, "assetIds": { "type": "array", "items": { "type": "string" } }, "locationId": { "type": "string" }, "isTemplate": { "type": "boolean" }, "subject": { "type": "string" }, "description": { "type": "string" }, "workflowId": { "type": "string" }, "images": { "type": "array", "items": { "type": "string" } }, "priority": { "type": "string" }, "reason": { "type": "string" }, "status": { "type": "string" }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" } }, "required": [ "id", "organizationId", "assetIds", "locationId", "isTemplate", "subject", "description", "workflowId", "images", "priority", "reason", "status", "createdAtDateString", "createdAt" ], "description": "Data of the work request." } }, "required": [ "data" ] }, "example": { "data": { "id": "wr-workRequestId", "organizationId": "o-organizationId", "assetIds": [ "a-24e124535b312345" ], "locationId": "l-locationId", "isTemplate": false, "subject": "Accept Work Request", "description": "", "workflowId": "er_eventRuleId", "images": [], "priority": "None", "reason": "test", "status": "Accept", "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/work-orders/{workOrderId}/comments/{commentId}/reactions": { "post": { "summary": "Add reaction to comment", "description": "Add an emoji reaction to a work order comment", "operationId": "Works.AddCommentReaction", "tags": [ "Works" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "workOrderId", "description": "Work Order ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "commentId", "description": "Comment (Activity) ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "emoji": { "type": "string", "description": "Emoji character(s) to react with" } }, "required": [ "emoji" ] }, "example": {}, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "activity": { "type": "object", "properties": {}, "required": [], "description": "The updated comment activity with reactions" } }, "required": [ "activity" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/work-requests/{workRequestId}/cancel": { "put": { "summary": "Cancel Work Request", "description": "Cancel work request", "operationId": "Works.CancelWorkRequest", "tags": [ "Works" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "workRequestId", "description": "The ID of work request.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "organizationId": { "type": "string" }, "assetIds": { "type": "array", "items": { "type": "string" } }, "locationId": { "type": "string" }, "isTemplate": { "type": "boolean" }, "subject": { "type": "string" }, "description": { "type": "string" }, "workflowId": { "type": "string" }, "images": { "type": "array", "items": { "type": "string" } }, "priority": { "type": "string" }, "reason": { "type": "string" }, "status": { "type": "string" }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" } }, "required": [ "id", "organizationId", "assetIds", "locationId", "isTemplate", "subject", "description", "workflowId", "images", "priority", "reason", "status", "createdAtDateString", "createdAt" ], "description": "Data of the work request." } }, "required": [ "data" ] }, "example": { "data": { "id": "wr-workRequestId", "organizationId": "o-organizationId", "assetIds": [ "a-24e124535b312345" ], "locationId": "l-locationId", "isTemplate": false, "subject": "Work Request", "description": "Cancel Wokr Request", "workflowId": "er_eventRuleId", "images": [], "priority": "None", "reason": "test", "status": "Cancel", "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/work-orders": { "post": { "summary": "Create Work Order", "description": "Create work order", "operationId": "Works.CreateWorkOrder", "tags": [ "Works" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "type": { "type": "string", "description": "The type of work order(Normal, Template)." }, "subject": { "type": "string", "description": "The subject of work order." }, "description": { "type": "string", "description": "The description of work order." }, "expiredAt": { "type": "number", "description": "The expired time of work order(Must be a multiple of 15 minutes)." }, "workTime": { "type": "number", "description": "The workTime of work order, when type is template." }, "startDate": { "type": "number", "description": "The scheduled start date/time (optional, must be multiple of 15 minutes)." }, "estimatedDuration": { "type": "number", "description": "The estimated work duration in milliseconds (optional, 15 min - 14 days)." }, "scheduleType": { "type": "string", "description": "The schedule type of work order." }, "daysOfWeek": { "type": "array", "items": { "type": "boolean" }, "description": "Days of week, ex: [false, true, false, false, false, true, false] is monday and friday of week." }, "everyWeeks": { "type": "number", "description": "How many weeks interval, ex: 1 is every week, 2 is interval of one week." }, "dayOfMonth": { "type": "number", "description": "Day of month, ex: 22 is 22th day of every month." }, "everyMonths": { "type": "number", "description": "How many months interval, ex: 1 is every month, 2 is interval of one month(1/22, 3/22, 5/22 etc...)." }, "everyYears": { "type": "number", "description": "How many years interval, ex: 1 is every year, 2 is interval of one year(2023/01/22, 2025/01/22, 2027/01/22 etc...)." }, "aheadOfTime": { "type": "number", "description": "Ahead of time(seconds) to available in the list." }, "assignee": { "type": "object", "properties": {}, "required": [], "description": "The assignee of work order." }, "priority": { "type": "string", "description": "The priority of work order." }, "workRequestId": { "type": "string", "description": "The ID of work request." }, "locationId": { "type": "string", "description": "The location ID of work order." }, "procedures": { "type": "string", "description": "The procedures of work order." }, "images": { "type": "array", "items": { "type": "string" }, "description": "The images of work order." }, "files": { "type": "array", "items": { "type": "string" }, "description": "The files of work order." }, "partIds": { "type": "array", "items": { "type": "string" }, "description": "The ID list of part." }, "assetIds": { "type": "array", "items": { "type": "string" }, "description": "The ID list of asset." }, "enableNotify": { "type": "boolean", "description": "Enable/Disable notification." }, "timeTracking": { "type": "object", "properties": { "display": { "type": "boolean" }, "type": { "type": "string" } }, "required": [ "display", "type" ], "description": "The time tracking in work order." }, "formId": { "type": "string", "description": "SOP form ID to attach during creation (only WorkOrderSOP forms)." } }, "required": [ "type", "subject", "expiredAt", "priority", "timeTracking" ] }, "example": { "subject": "IDT-WorkOrder", "description": "IDT-WorkOrder-Description", "locationId": "l-locationId", "type": "Normal", "priority": "Low", "scheduleType": "Daily", "aheadOfTime": 3600, "enableNotify": true, "files": [ "Infodeck-Bot-0001.pdf" ], "images": [ "Asset-Image.png" ], "assignee": [ { "type": "Team", "id": "6d708f0e-xxxx-xxxx-xxxx-f0d9c59488ef" }, { "type": "User", "id": "593b34c0-xxxx-xxxx-xxxx-a454c6f9f50d" } ], "expiredAt": 1704067200000, "timeTracking": { "display": true, "type": "automatic" } }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "organizationId": { "type": "string" }, "type": { "type": "string" }, "subject": { "type": "string" }, "description": { "type": "string" }, "expiredAt": { "type": "string" }, "workTime": { "type": "number" }, "scheduleType": { "type": "string" }, "daysOfWeek": { "type": "array", "items": { "type": "boolean" } }, "everyWeeks": { "type": "number" }, "dayOfMonth": { "type": "number" }, "everyMonths": { "type": "number" }, "everyYears": { "type": "number" }, "locationId": { "type": "string" }, "aheadOfTime": { "type": "number" }, "assignee": { "type": "object", "properties": {}, "required": [] }, "priority": { "type": "string" }, "workRequestId": { "type": "string" }, "procedures": { "type": "string" }, "images": { "type": "array", "items": { "type": "string" } }, "files": { "type": "array", "items": { "type": "string" } }, "partIds": { "type": "array", "items": { "type": "string" } }, "assetIds": { "type": "array", "items": { "type": "string" } }, "enableNotify": { "type": "boolean" }, "status": { "type": "string" }, "timeTracking": { "type": "object", "properties": { "display": { "type": "boolean" }, "type": { "type": "string" } }, "required": [ "display", "type" ] }, "createdBy": { "type": "string" }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" }, "slaTemplateId": { "type": "string" }, "slaResponseDeadline": { "type": "string" }, "slaResolutionDeadline": { "type": "string" }, "slaResponseBreached": { "type": "boolean" }, "slaResolutionBreached": { "type": "boolean" } }, "required": [ "id", "organizationId", "type", "subject", "description", "expiredAt", "workTime", "scheduleType", "daysOfWeek", "everyWeeks", "dayOfMonth", "everyMonths", "everyYears", "locationId", "aheadOfTime", "assignee", "priority", "workRequestId", "procedures", "images", "files", "partIds", "assetIds", "enableNotify", "status", "timeTracking", "createdBy", "createdAtDateString", "createdAt" ], "description": "Data of the work order." } }, "required": [ "data" ] }, "example": { "data": { "id": "o-organizationId-wo-workOrderId", "organizationId": "o-organizationId", "type": "Normal", "subject": "IDT-WorkOrder", "description": "IDT-WorkOrder-Description", "expiredAt": "2024-02-01T00:00:00.000Z", "workTime": 3600000, "scheduleType": "Daily", "daysOfWeek": "", "everyWeeks": "", "dayOfMonth": "", "everyMonths": "", "everyYears": "", "locationId": "l-locationId", "aheadOfTime": 3600, "assignee": [ { "type": "Team", "id": "6d708f0e-xxxx-xxxx-xxxx-f0d9c59488ef" }, { "type": "User", "id": "593b34c0-xxxx-xxxx-xxxx-a454c6f9f50d" } ], "priority": "Low", "workRequestId": "wr-workRequestId", "procedures": [], "images": [ "Asset-Image.png" ], "files": [ "Infodeck-Bot-0001.pdf" ], "partIds": [], "assetIds": [], "enableNotify": false, "status": "Open", "timeTracking": { "display": true, "type": "automatic" }, "createdBy": "d6b0e137-xxxx-xxxx-xxxx-c944cc12a5f4", "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "List Work Orders", "description": "List work orders", "operationId": "Works.ListWorkOrders", "tags": [ "Works" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "type", "description": "The type of work order.", "in": "query", "schema": { "type": "string", "enum": [ "Normal", "Template" ] }, "required": true }, { "name": "assetId", "description": "The Id of asset.", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "startDate", "description": "The start date number of timestamp. (Default: 1700000000000)", "in": "query", "schema": { "type": "number" }, "required": false }, { "name": "endDate", "description": "The end date number of timestamp. (Default: 1700000000000)", "in": "query", "schema": { "type": "number" }, "required": false }, { "name": "maxResults", "description": "The maximum number of results to return.", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "nextToken", "description": "To retrieve the next set of results.", "in": "query", "schema": { "type": "string" }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "type": { "type": "string" }, "subject": { "type": "string" }, "description": { "type": "string" }, "expiredAt": { "type": "string" }, "workTime": { "type": "number" }, "scheduleType": { "type": "string" }, "daysOfWeek": { "type": "array", "items": { "type": "boolean" } }, "everyWeeks": { "type": "number" }, "dayOfMonth": { "type": "number" }, "everyMonths": { "type": "number" }, "everyYears": { "type": "number" }, "aheadOfTime": { "type": "number" }, "assignee": { "type": "object", "properties": {}, "required": [] }, "priority": { "type": "string" }, "workRequestId": { "type": "string" }, "locationId": { "type": "string" }, "procedures": { "type": "string" }, "images": { "type": "array", "items": { "type": "string" } }, "files": { "type": "array", "items": { "type": "string" } }, "partIds": { "type": "array", "items": { "type": "string" } }, "assetIds": { "type": "array", "items": { "type": "string" } }, "enableNotify": { "type": "boolean" }, "status": { "type": "string" }, "timeTracking": { "type": "object", "properties": { "display": { "type": "boolean" }, "type": { "type": "string" } }, "required": [ "display", "type" ] }, "createdBy": { "type": "string" }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "type", "subject", "description", "expiredAt", "workTime", "scheduleType", "daysOfWeek", "everyWeeks", "dayOfMonth", "everyMonths", "everyYears", "aheadOfTime", "assignee", "priority", "workRequestId", "locationId", "procedures", "images", "files", "partIds", "assetIds", "enableNotify", "status", "timeTracking", "createdBy", "createdAtDateString", "createdAt", "updatedAtDateString", "updatedAt" ], "description": "Data of the work order." }, "nextToken": { "description": "To retrieve the next set of results." } }, "required": [ "data", "nextToken" ] }, "example": { "data": [ { "subject": "IDT-WorkOrder", "description": "IDT-WorkOrder-Description", "locationId": "l-locationId", "type": "Normal", "priority": "Low", "scheduleType": "Daily", "aheadOfTime": 3600, "enableNotify": true, "files": [ "Infodeck-Bot-0001.pdf" ], "images": [ "Asset-Image.png" ], "assignee": [ { "type": "Team", "id": "6d708f0e-xxxx-xxxx-xxxx-f0d9c59488ef" }, { "type": "User", "id": "593b34c0-xxxx-xxxx-xxxx-a454c6f9f50d" } ], "expiredAt": "2024-02-01T00:00:00.000Z", "status": "Open", "timeTracking": { "display": true, "type": "automatic" }, "createdBy": "d6b0e137-xxxx-xxxx-xxxx-c944cc12a5f4", "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000, "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1706659200000 } ] }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/work-orders/{workOrderId}/comments": { "post": { "summary": "Create Work Order Comment", "description": "Add a comment to a work order with optional photo attachments", "operationId": "Works.CreateWorkOrderComment", "tags": [ "Works" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "workOrderId", "description": "Work Order ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "content": { "type": "string", "description": "Comment text (1-5000 characters)" }, "attachments": { "type": "array", "items": { "type": "string" }, "description": "Array of S3 keys from prior uploads" } }, "required": [ "content" ] }, "example": {}, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "activity": { "type": "object", "properties": {}, "required": [], "description": "The created comment activity" } }, "required": [ "activity" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/work-orders/{workOrderId}/statuses": { "post": { "summary": "Update Work Order Statuses", "description": "Update Work Order Statuses", "operationId": "Works.UpdateWorkOrderStatuses", "tags": [ "Works" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "workOrderId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "originalStartDate": { "type": "number", "description": "The original start date in milliseconds since epoch." }, "originalEndDate": { "type": "number", "description": "The original end date in milliseconds since epoch." }, "startDate": { "type": "number", "description": "The start date in milliseconds since epoch." }, "endDate": { "type": "number", "description": "The end date in milliseconds since epoch." }, "status": { "type": "string", "description": "The status of the work order (OnHold, InProgress, Completed)." }, "triggerType": { "type": "string", "description": "The trigger type for the status update (manual, automatic)." } }, "required": [ "originalStartDate", "originalEndDate", "startDate", "endDate", "status", "triggerType" ] }, "example": { "originalStartDate": "1704067200000", "originalEndDate": "1706659200000", "startDate": "1704067200000", "endDate": "1706659200000", "status": "OnHold", "triggerType": "manual" }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "workOrderId": { "type": "string" }, "organizationId": { "type": "string" }, "manualId": { "type": "string" }, "status": { "type": "string" }, "triggerType": { "type": "string" }, "createdBy": { "type": "string" }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" }, "slaTemplateId": { "type": "string" }, "slaResponseDeadline": { "type": "string" }, "slaResolutionDeadline": { "type": "string" }, "slaResponseBreached": { "type": "boolean" }, "slaResolutionBreached": { "type": "boolean" } }, "required": [ "id", "workOrderId", "organizationId", "manualId", "status", "triggerType", "createdBy", "createdAtDateString", "createdAt" ] }, "description": "Data of the work order." } }, "required": [ "data" ] }, "example": { "data": [ { "id": "wo-workOrderId", "workOrderId": "wo-workOrderId", "organizationId": "o-organizationId", "manualId": "uuid", "status": "InProgress", "triggerType": "manual", "createdBy": "d6b0e137-xxxx-xxxx-xxxx-c944cc12a5f4", "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000 }, { "id": "wo-workOrderId", "workOrderId": "wo-workOrderId", "organizationId": "o-organizationId", "manualId": "uuid", "status": "OnHold", "triggerType": "manual", "createdBy": "d6b0e137-xxxx-xxxx-xxxx-c944cc12a5f4", "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000 } ] }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "delete": { "summary": "Delete Work Order Statuses", "description": "Delete work order statuses", "operationId": "Works.DeleteWorkOrderStatuses", "tags": [ "Works" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "workOrderId", "description": "The ID of work order.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "startDate", "description": "The start date in milliseconds since epoch.", "in": "query", "schema": { "type": "number" }, "required": true }, { "name": "endDate", "description": "The end date in milliseconds since epoch.", "in": "query", "schema": { "type": "number" }, "required": true } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": {}, "required": [], "description": "Data of the work order statuses." } }, "required": [ "data" ] }, "example": { "data": {} }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "List Work Order Statuses", "description": "List work order statuses", "operationId": "Works.ListWorkOrderStatuses", "tags": [ "Works" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "workOrderId", "description": "The Id of work order.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "triggerType", "description": "The trigger type for the status update (manual, automatic).", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "maxResults", "description": "The maximum number of results to return.", "in": "query", "schema": { "type": "number", "minimum": 10, "maximum": 100 }, "required": false }, { "name": "nextToken", "description": "To retrieve the next set of results.", "in": "query", "schema": { "type": "string" }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "workOrderId": { "type": "string" }, "organizationId": { "type": "string" }, "status": { "type": "string" }, "manualId": { "type": "string" }, "triggerType": { "type": "string" }, "createdBy": { "type": "string" }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" } }, "required": [ "id", "workOrderId", "organizationId", "status", "manualId", "triggerType", "createdBy", "createdAtDateString", "createdAt" ] }, "description": "Array of work order statuses." } }, "required": [ "data" ] }, "example": { "data": [ { "id": "wo-workOrderId", "workOrderId": "wo-workOrderId", "organizationId": "o-organizationId", "status": "Inprogress", "manualId": "uuid", "triggerType": "manual", "createdBy": "d6b0e137-xxxx-xxxx-xxxx-c944cc12a5f4", "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000 } ] }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/work-requests": { "post": { "summary": "Create Work Request", "description": "Create work request", "operationId": "Works.CreateWorkRequest", "tags": [ "Works" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "isTemplate": { "type": "boolean", "description": "The work request is template." }, "subject": { "type": "string", "description": "The subject of work request." }, "description": { "type": "string", "description": "The description of work request." }, "locationId": { "type": "string", "description": "The location ID of work order." }, "images": { "type": "array", "items": { "type": "string" }, "description": "The images of work request." }, "files": { "type": "array", "items": { "type": "string" }, "description": "The files of work request." }, "assetId": { "type": "array", "items": { "type": "string" }, "description": "The assetId of work request." }, "priority": { "type": "string", "description": "The priority of work order." } }, "required": [ "subject", "priority" ] }, "example": { "subject": "IDT-WorkRequest", "description": "IDT-WorkRequest-Description", "locationId": "l-locationId", "priority": "Medium", "isTemplate": false, "assetIds": [ "a-assetId" ], "images": [ "Asset-Image.png" ], "files": [ "Infodeck-Bot-0001.pdf" ] }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "organizationId": { "type": "string" }, "isTemplate": { "type": "boolean" }, "subject": { "type": "string" }, "description": { "type": "string" }, "images": { "type": "array", "items": { "type": "string" } }, "assetIds": { "type": "array", "items": { "type": "string" } }, "reason": { "type": "string" }, "status": { "type": "string" }, "priority": { "type": "string" }, "locationId": { "type": "string" }, "createdBy": { "type": "string" }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" } }, "required": [ "id", "organizationId", "isTemplate", "subject", "description", "images", "assetIds", "reason", "status", "priority", "locationId", "createdBy", "createdAtDateString", "createdAt" ], "description": "Data of the newly created work request." } }, "required": [ "data" ] }, "example": { "data": { "id": "wr-workOrderId", "organizationId": "o-organizationId", "isTemplate": false, "subject": "IDT-WorkRequest", "description": "IDT-WorkRequest-Description", "images": [ "Asset-Image.png" ], "assetIds": [ "a-assetId" ], "reason": "reason", "status": "Pending", "priority": "Medium", "locationId": "l-locationId", "createdBy": "d6b0e137-xxxx-xxxx-xxxx-c944cc12a5f4", "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "List Work Requests", "description": "List work requests", "operationId": "Works.ListWorkRequests", "tags": [ "Works" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "isTemplate", "description": "Retuen templates of work request.", "in": "query", "schema": { "type": "string", "enum": [ "true", "false" ] }, "required": false }, { "name": "templateKind", "description": "Filter reusable templates by logical kind.", "in": "query", "schema": { "type": "string", "enum": [ "GENERAL", "PARTS_REPLENISHMENT", "INCIDENT" ] }, "required": false }, { "name": "assetId", "description": "The Id of asset.", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "startDate", "description": "The start date number of query.", "in": "query", "schema": { "type": "number" }, "required": false }, { "name": "endDate", "description": "The end date number of query.", "in": "query", "schema": { "type": "number" }, "required": false }, { "name": "maxResults", "description": "The maximum number of results to return.", "in": "query", "schema": { "type": "number" }, "required": false }, { "name": "nextToken", "description": "To retrieve the next set of results.", "in": "query", "schema": { "type": "string" }, "required": false } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "reason": { "type": "string", "description": "The reason of reject work request." } }, "required": [ "reason" ] }, "example": {}, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "organizationId": { "type": "string" }, "assetIds": { "type": "string" }, "locationId": { "type": "string" }, "workflowId": {}, "subject": { "type": "string" }, "description": { "type": "string" }, "images": { "type": "array", "items": { "type": "string" } }, "isTemplate": { "type": "boolean" }, "reason": { "type": "string" }, "status": { "type": "string" }, "priority": { "type": "string" }, "createdBy": { "type": "string" }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "id", "organizationId", "assetIds", "locationId", "workflowId", "subject", "description", "images", "isTemplate", "reason", "status", "priority", "createdBy", "createdAtDateString", "createdAt", "updatedAtDateString", "updatedAt" ], "description": "Data of the work request." } }, "required": [ "data" ] }, "example": { "data": [ { "id": "wr-workRequestId", "organizationId": "o-organizationId", "assetIds": "a-assetId", "locationId": "l-locationId", "workflowId": "er_eventRuleId", "subject": "IDT-WorkRequest", "description": "IDT-WorkRequest-Description", "images": [ "Asset-Image.png" ], "isTemplate": false, "reason": "test", "status": "Reject", "priority": "Medium", "createdBy": "d6b0e137-xxxx-xxxx-xxxx-c944cc12a5f4", "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000, "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1706659200000 } ] }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/work-orders/{workOrderId}": { "delete": { "summary": "Delete Work Order", "description": "Delete work order", "operationId": "Works.DeleteWorkOrder", "tags": [ "Works" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "workOrderId", "description": "The ID of work order.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": {}, "required": [], "description": "Data of the work order." } }, "required": [ "data" ] }, "example": { "data": {} }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "Get Work Order", "description": "Get work order", "operationId": "Works.GetWorkOrder", "tags": [ "Works" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "workOrderId", "description": "The ID of work order.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "type": { "type": "string" }, "subject": { "type": "string" }, "description": { "type": "string" }, "expiredAt": { "type": "string" }, "workTime": { "type": "number" }, "scheduleType": { "type": "string" }, "daysOfWeek": { "type": "array", "items": { "type": "boolean" } }, "everyWeeks": { "type": "number" }, "dayOfMonth": { "type": "number" }, "everyMonths": { "type": "number" }, "everyYears": { "type": "number" }, "aheadOfTime": { "type": "number" }, "assignee": { "type": "object", "properties": {}, "required": [] }, "priority": { "type": "string" }, "workRequestId": { "type": "string" }, "locationId": { "type": "string" }, "procedures": { "type": "string" }, "images": { "type": "array", "items": { "type": "string" } }, "files": { "type": "array", "items": { "type": "string" } }, "partIds": { "type": "array", "items": { "type": "string" } }, "assetIds": { "type": "array", "items": { "type": "string" } }, "enableNotify": { "type": "boolean" }, "status": { "type": "string" }, "timeTracking": { "type": "object", "properties": { "display": { "type": "boolean" }, "type": { "type": "string" } }, "required": [ "display", "type" ] }, "createdBy": { "type": "string" }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "type", "subject", "description", "expiredAt", "workTime", "scheduleType", "daysOfWeek", "everyWeeks", "dayOfMonth", "everyMonths", "everyYears", "aheadOfTime", "assignee", "priority", "workRequestId", "locationId", "procedures", "images", "files", "partIds", "assetIds", "enableNotify", "status", "timeTracking", "createdBy", "createdAtDateString", "createdAt", "updatedAtDateString", "updatedAt" ], "description": "Data of the work order." } }, "required": [ "data" ] }, "example": { "data": { "subject": "IDT-WorkOrder", "description": "IDT-WorkOrder-Description", "locationId": "l-locationId", "type": "Normal", "priority": "Low", "scheduleType": "Daily", "aheadOfTime": 3600, "enableNotify": true, "files": [ "Infodeck-Bot-0001.pdf" ], "images": [ "Asset-Image.png" ], "assignee": [ { "type": "Team", "id": "6d708f0e-xxxx-xxxx-xxxx-f0d9c59488ef" }, { "type": "User", "id": "593b34c0-xxxx-xxxx-xxxx-a454c6f9f50d" } ], "expiredAt": "2024-02-01T00:00:00.000Z", "status": "Open", "timeTracking": { "display": true, "type": "automatic" }, "createdBy": "d6b0e137-xxxx-xxxx-xxxx-c944cc12a5f4", "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000, "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1706659200000 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "put": { "summary": "Update Work Order", "description": "Update work order", "operationId": "Works.UpdateWorkOrder", "tags": [ "Works" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "workOrderId", "description": "The ID of work order.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "subject": { "type": "string", "description": "The subject of work order." }, "description": { "type": "string", "description": "The description of work order." }, "expiredAt": { "type": "number", "description": "The expired time of work order." }, "workTime": { "type": "number", "description": "The workTime of work order, when type is template." }, "startDate": { "type": "number", "description": "The scheduled start date/time (optional, must be multiple of 15 minutes)." }, "estimatedDuration": { "type": "number", "description": "The estimated work duration in milliseconds (optional, 15 min - 14 days)." }, "scheduleType": { "type": "string", "description": "The schedule type of work order." }, "daysOfWeek": { "type": "array", "items": { "type": "boolean" }, "description": "Days of week, ex: [false, true, false, false, false, true, false] is monday and friday of week." }, "everyWeeks": { "type": "number", "description": "How many weeks interval, ex: 1 is every week, 2 is interval of one week." }, "dayOfMonth": { "type": "number", "description": "Day of month, ex: 22 is 22th day of every month." }, "everyMonths": { "type": "number", "description": "How many months interval, ex: 1 is every month, 2 is interval of one month(1/22, 3/22, 5/22 etc...)." }, "everyYears": { "type": "number", "description": "How many years interval, ex: 1 is every year, 2 is interval of one year(2023/01/22, 2025/01/22, 2027/01/22 etc...)." }, "aheadOfTime": { "type": "number", "description": "Ahead of time(seconds) to available in the list." }, "assignee": { "type": "object", "properties": {}, "required": [], "description": "The assignee of work order." }, "priority": { "type": "string", "description": "The priority of work order." }, "workRequestId": { "type": "string", "description": "The ID of work request." }, "locationId": { "type": "string", "description": "The location ID of work order." }, "procedures": { "type": "string", "description": "The procedures of work order." }, "images": { "type": "array", "items": { "type": "string" }, "description": "The images of work order." }, "files": { "type": "array", "items": { "type": "string" }, "description": "The files of work order." }, "partIds": { "type": "array", "items": { "type": "string" }, "description": "The ID list of part." }, "assetIds": { "type": "array", "items": { "type": "string" }, "description": "The ID list of asset." }, "enableNotify": { "type": "boolean", "description": "Enable/Disable notification." }, "timeTracking": { "type": "object", "properties": { "display": { "type": "boolean" }, "type": { "type": "string" } }, "required": [ "display", "type" ], "description": "The time tracking in work order." }, "formId": { "type": "string", "description": "SOP form ID to attach or change (only WorkOrderSOP forms, null to detach)." } }, "required": [ "timeTracking" ] }, "example": { "subject": "IDT-WorkOrder", "description": "IDT-WorkOrder-Description", "locationId": "l-locationId", "type": "Normal", "priority": "Low", "scheduleType": "Daily", "aheadOfTime": 3600, "enableNotify": true, "files": [ "Infodeck-Bot-0001.pdf" ], "images": [ "Asset-Image.png" ], "assignee": [ { "type": "Team", "id": "6d708f0e-xxxx-xxxx-xxxx-f0d9c59488ef" }, { "type": "User", "id": "593b34c0-xxxx-xxxx-xxxx-a454c6f9f50d" } ], "expiredAt": 1704067200000, "timeTracking": { "display": true, "type": "automatic" } }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "type": { "type": "string" }, "subject": { "type": "string" }, "description": { "type": "string" }, "expiredAt": { "type": "string" }, "workTime": { "type": "number" }, "scheduleType": { "type": "string" }, "daysOfWeek": { "type": "array", "items": { "type": "boolean" } }, "everyWeeks": { "type": "number" }, "dayOfMonth": { "type": "number" }, "everyMonths": { "type": "number" }, "everyYears": { "type": "number" }, "aheadOfTime": { "type": "number" }, "assignee": { "type": "object", "properties": {}, "required": [] }, "priority": { "type": "string" }, "workRequestId": { "type": "string" }, "locationId": { "type": "string" }, "procedures": { "type": "string" }, "images": { "type": "array", "items": { "type": "string" } }, "files": { "type": "array", "items": { "type": "string" } }, "partIds": { "type": "array", "items": { "type": "string" } }, "assetIds": { "type": "array", "items": { "type": "string" } }, "enableNotify": { "type": "boolean" }, "status": { "type": "string" }, "timeTracking": { "type": "object", "properties": { "display": { "type": "boolean" }, "type": { "type": "string" } }, "required": [ "display", "type" ] }, "createdBy": { "type": "string" }, "createdAtDateString": { "type": "number" }, "createdAt": { "type": "number" } }, "required": [ "type", "subject", "expiredAt", "priority", "status", "timeTracking", "createdBy", "createdAtDateString", "createdAt" ], "description": "Data of the work order." } }, "required": [ "data" ] }, "example": { "data": { "subject": "IDT-WorkOrder", "description": "IDT-WorkOrder-Description", "locationId": "l-locationId", "type": "Normal", "priority": "Low", "scheduleType": "Daily", "aheadOfTime": 3600, "enableNotify": true, "files": [ "Infodeck-Bot-0001.pdf" ], "images": [ "Asset-Image.png" ], "assignee": [ { "type": "Team", "id": "6d708f0e-xxxx-xxxx-xxxx-f0d9c59488ef" }, { "type": "User", "id": "593b34c0-xxxx-xxxx-xxxx-a454c6f9f50d" } ], "expiredAt": "2024-02-01T00:00:00.000Z", "status": "Open", "timeTracking": { "display": true, "type": "automatic" }, "createdBy": "d6b0e137-xxxx-xxxx-xxxx-c944cc12a5f4", "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/work-orders/{workOrderId}/comments/{commentId}": { "delete": { "summary": "Delete Work Order Comment", "description": "Soft delete a comment on a work order. Users can only delete their own comments.", "operationId": "Works.DeleteWorkOrderComment", "tags": [ "Works" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "workOrderId", "description": "Work Order ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "commentId", "description": "Comment (Activity) ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "description": "True if deletion was successful" }, "message": { "type": "string", "description": "Success message" } }, "required": [ "success", "message" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "put": { "summary": "Update Work Order Comment", "description": "Update an existing comment on a work order. Users can only edit their own comments.", "operationId": "Works.UpdateWorkOrderComment", "tags": [ "Works" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "workOrderId", "description": "Work Order ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "commentId", "description": "Comment (Activity) ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "content": { "type": "string", "description": "Updated comment text (1-5000 characters)" }, "attachments": { "type": "array", "items": { "type": "string" }, "description": "Updated array of S3 keys" } }, "required": [ "content" ] }, "example": {}, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "activity": { "type": "object", "properties": {}, "required": [], "description": "The updated comment activity" } }, "required": [ "activity" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/work-requests/{workRequestId}": { "delete": { "summary": "Delete Work Request", "description": "Delete work request", "operationId": "Works.DeleteWorkRequest", "tags": [ "Works" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "workRequestId", "description": "The ID of work request.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": {}, "required": [], "description": "Data of the work request." } }, "required": [ "data" ] }, "example": { "data": {} }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "get": { "summary": "Get Work Request", "description": "Get work request", "operationId": "Works.GetWorkRequest", "tags": [ "Works" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "workRequestId", "description": "The ID of work request.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "subject": { "type": "string" }, "description": { "type": "string" }, "locationId": { "type": "string" }, "priority": { "type": "string" }, "isTemplate": { "type": "boolean" }, "assetIds": { "type": "array", "items": { "type": "string" } }, "images": { "type": "array", "items": { "type": "string" } }, "files": { "type": "array", "items": { "type": "string" } }, "createdBy": { "type": "string" }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "subject", "description", "locationId", "priority", "isTemplate", "assetIds", "images", "files", "createdBy", "createdAtDateString", "createdAt", "updatedAtDateString", "updatedAt" ], "description": "Data of the work request." } }, "required": [ "data" ] }, "example": { "data": { "subject": "IDT-WorkRequest", "description": "IDT-WorkRequest-Description", "locationId": "l-locationId", "priority": "Medium", "isTemplate": false, "assetIds": [ "a-assetId" ], "images": [ "Asset-Image.png" ], "files": [ "Infodeck-Bot-0001.pdf" ], "createdBy": "d6b0e137-xxxx-xxxx-xxxx-c944cc12a5f4", "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000, "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1706659200000 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] }, "put": { "summary": "Update Work Request", "description": "Update work request", "operationId": "Works.UpdateWorkRequest", "tags": [ "Works" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "workRequestId", "description": "The ID of work request.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "isTemplate": { "type": "boolean", "description": "The work request is template." }, "subject": { "type": "string", "description": "The subject of work request." }, "description": { "type": "string", "description": "The description of work request." }, "locationId": { "type": "string", "description": "The location ID of work order." }, "images": { "type": "array", "items": { "type": "string" }, "description": "The images of work request." }, "priority": { "type": "string", "description": "The priority of work order." } }, "required": [] }, "example": { "subject": "IDT-WorkRequest", "description": "IDT-WorkRequest-Description", "locationId": "l-locationId", "priority": "Medium", "isTemplate": false, "images": [ "Asset-Image.png" ] }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "subject": { "type": "string" }, "description": { "type": "string" }, "locationId": { "type": "string" }, "priority": { "type": "string" }, "isTemplate": { "type": "boolean" }, "assetIds": { "type": "array", "items": { "type": "string" } }, "images": { "type": "array", "items": { "type": "string" } }, "files": { "type": "array", "items": { "type": "string" } }, "createdBy": { "type": "string" }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "string" } }, "required": [ "subject", "description", "locationId", "priority", "isTemplate", "assetIds", "images", "files", "createdBy", "createdAtDateString", "createdAt" ], "description": "Data of the updated work request." } }, "required": [ "data" ] }, "example": { "data": { "subject": "IDT-WorkRequest", "description": "IDT-WorkRequest-Description", "locationId": "l-locationId", "priority": "Medium", "isTemplate": false, "assetIds": [ "a-assetId" ], "images": [ "Asset-Image.png" ], "files": [ "Infodeck-Bot-0001.pdf" ], "createdBy": "d6b0e137-xxxx-xxxx-xxxx-c944cc12a5f4", "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/work-orders/{workOrderId}/activities": { "get": { "summary": "Get Work Order Activities", "description": "Get all activities for a work order", "operationId": "Works.GetWorkOrderActivities", "tags": [ "Works" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "workOrderId", "description": "Work Order ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "limit", "description": "Number of activities to return", "in": "path", "required": false, "schema": { "type": "number", "default": 50 } }, { "name": "lastEvaluatedKey", "description": "Pagination token", "in": "path", "required": false, "schema": { "type": "string" } }, { "name": "activityType", "description": "Filter by activity type (e.g., 'comment')", "in": "path", "required": false, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "activities": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "workOrderId": { "type": "string" }, "type": { "type": "string" }, "content": { "type": "string" }, "metadata": { "type": "object", "properties": {}, "required": [] }, "author": { "type": "object", "properties": {}, "required": [] }, "createdAt": { "type": "number" } }, "required": [ "id", "workOrderId", "type", "content", "metadata", "author", "createdAt" ] }, "description": "List of activities" }, "lastEvaluatedKey": { "type": "string", "description": "Next page token" } }, "required": [ "activities" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/activities/{activityId}": { "get": { "summary": "Get Work Order Activity", "description": "Get a specific work order activity by ID", "operationId": "Works.GetWorkOrderActivity", "tags": [ "Works" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "activityId", "description": "Activity ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "activity": { "type": "object", "properties": { "id": { "type": "string" }, "workOrderId": { "type": "string" }, "type": { "type": "string" }, "content": { "type": "string" }, "metadata": { "type": "object", "properties": {}, "required": [] }, "author": { "type": "object", "properties": {}, "required": [] }, "createdAt": { "type": "number" } }, "required": [ "id", "workOrderId", "type", "content", "author", "createdAt" ], "description": "The activity details" } }, "required": [ "activity" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/work-orders/{workOrderId}/attachments/upload-url": { "post": { "summary": "Get Comment Attachment Upload URL", "description": "Get a pre-signed URL for uploading work order COMMENT attachments.\nNOTE: General work order attachments use AWS Amplify Storage directly from frontend.", "operationId": "Works.GetWorkOrderCommentAttachmentUploadUrl", "tags": [ "Works" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "workOrderId", "description": "Work Order ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "filename": { "type": "string", "description": "Name of the file to upload" }, "contentType": { "type": "string", "description": "MIME type of the file" }, "size": { "type": "number", "description": "Size of the file in bytes" } }, "required": [ "filename", "contentType", "size" ] }, "example": {}, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "uploadUrl": { "type": "string", "description": "Pre-signed URL for upload" }, "key": { "type": "string", "description": "S3 key of the file" }, "expiresIn": { "type": "number", "description": "URL expiration time in seconds" } }, "required": [ "uploadUrl", "key", "expiresIn" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/users/{userId}/work-orders/all": { "get": { "summary": "Get Work Orders By User", "description": "Get work orders by user", "operationId": "Works.GetWorkOrdersByUser", "tags": [ "Works" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "userId", "description": "The ID of user.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "startDate", "description": "The start date number of timestamp. (Default: 1700000000000)", "in": "query", "schema": { "type": "number" }, "required": true }, { "name": "endDate", "description": "The end date number of timestamp. (Default: 1700000000000)", "in": "query", "schema": { "type": "number" }, "required": true }, { "name": "filterStatus", "description": "The status of work order. (Default: optional ; Options: Open, Accept, InProgress, OnHold, Complete, Close)", "in": "query", "schema": { "type": "array", "items": { "type": "string" } }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "type": { "type": "string" }, "subject": { "type": "string" }, "description": { "type": "string" }, "expiredAt": { "type": "string" }, "workTime": { "type": "number" }, "scheduleType": { "type": "string" }, "daysOfWeek": { "type": "array", "items": { "type": "boolean" } }, "everyWeeks": { "type": "number" }, "dayOfMonth": { "type": "number" }, "everyMonths": { "type": "number" }, "everyYears": { "type": "number" }, "aheadOfTime": { "type": "number" }, "assignee": { "type": "object", "properties": {}, "required": [] }, "priority": { "type": "string" }, "workRequestId": { "type": "string" }, "locationId": { "type": "string" }, "procedures": { "type": "string" }, "images": { "type": "array", "items": { "type": "string" } }, "files": { "type": "array", "items": { "type": "string" } }, "partIds": { "type": "array", "items": { "type": "string" } }, "assetIds": { "type": "array", "items": { "type": "string" } }, "enableNotify": { "type": "boolean" }, "status": { "type": "string" }, "timeTracking": { "type": "object", "properties": { "display": { "type": "boolean" }, "type": { "type": "string" } }, "required": [ "display", "type" ] }, "createdBy": { "type": "string" }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "type", "subject", "description", "expiredAt", "workTime", "scheduleType", "daysOfWeek", "everyWeeks", "dayOfMonth", "everyMonths", "everyYears", "aheadOfTime", "assignee", "priority", "workRequestId", "locationId", "procedures", "images", "files", "partIds", "assetIds", "enableNotify", "status", "timeTracking", "createdBy", "createdAtDateString", "createdAt", "updatedAtDateString", "updatedAt" ], "description": "Data of the work order." } }, "required": [ "data" ] }, "example": { "data": { "subject": "IDT-WorkOrder", "description": "IDT-WorkOrder-Description", "locationId": "l-locationId", "type": "Normal", "priority": "Low", "scheduleType": "Daily", "aheadOfTime": 3600, "enableNotify": true, "files": [ "Infodeck-Bot-0001.pdf" ], "images": [ "Asset-Image.png" ], "assignee": [ { "type": "Team", "id": "6d708f0e-xxxx-xxxx-xxxx-f0d9c59488ef" }, { "type": "User", "id": "593b34c0-xxxx-xxxx-xxxx-a454c6f9f50d" } ], "expiredAt": "2024-02-01T00:00:00.000Z", "status": "Open", "timeTracking": { "display": true, "type": "automatic" }, "createdBy": "d6b0e137-xxxx-xxxx-xxxx-c944cc12a5f4", "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000, "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1706659200000 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/users/{userId}/work-requests/all": { "get": { "summary": "Get Work Requests By User", "description": "Get work requests by user", "operationId": "Works.GetWorkRequestsByUser", "tags": [ "Works" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "userId", "description": "The ID of user.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "startDate", "description": "The start date number of timestamp", "in": "query", "schema": { "type": "string" }, "required": true }, { "name": "endDate", "description": "The end date number of timestamp", "in": "query", "schema": { "type": "string" }, "required": true } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "subject": { "type": "string" }, "description": { "type": "string" }, "locationId": { "type": "string" }, "priority": { "type": "string" }, "isTemplate": { "type": "boolean" }, "assetIds": { "type": "array", "items": { "type": "string" } }, "images": { "type": "array", "items": { "type": "string" } }, "files": { "type": "array", "items": { "type": "string" } }, "createdBy": { "type": "string" }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "subject", "description", "locationId", "priority", "isTemplate", "assetIds", "images", "files", "createdBy", "createdAtDateString", "createdAt", "updatedAtDateString", "updatedAt" ], "description": "Data of the work request." } }, "required": [ "data" ] }, "example": { "data": { "subject": "IDT-WorkRequest", "description": "IDT-WorkRequest-Description", "locationId": "l-locationId", "priority": "Medium", "isTemplate": false, "assetIds": [ "a-assetId" ], "images": [ "Asset-Image.png" ], "files": [ "Infodeck-Bot-0001.pdf" ], "createdBy": "d6b0e137-xxxx-xxxx-xxxx-c944cc12a5f4", "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000, "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1706659200000 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/locations/{locationId}/work-orders": { "get": { "summary": "List Work Orders By Location Id", "description": "List Work Orders By Location Id", "operationId": "Works.ListWorkOrdersByLocationId", "tags": [ "Works" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "locationId", "description": "The ID of location.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "startDate", "description": "The start date number of timestamp. (Default: 1700000000000)", "in": "query", "schema": { "type": "number" }, "required": true }, { "name": "endDate", "description": "The end date number of timestamp. (Default: 1700000000000)", "in": "query", "schema": { "type": "number" }, "required": true }, { "name": "statuses", "description": "The status of work order. (Default: optional ; Options: Open, Accept, InProgress, OnHold, Complete, Close)", "in": "query", "schema": { "type": "array", "items": { "type": "string" } }, "required": false }, { "name": "priorities", "description": "The status of work order. (Default: optional ; Options: Low, Medium, High, None)", "in": "query", "schema": { "type": "array", "items": { "type": "string" } }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "workOrderId": { "type": "string" }, "workRequestId": { "type": "string" }, "organizationId": { "type": "string" }, "locationId": { "type": "string" }, "subject": { "type": "string" }, "description": { "type": "string" }, "type": { "type": "string" }, "priority": { "type": "string" }, "scheduleType": { "type": "string" }, "assignee": { "type": "object", "properties": {}, "required": [] }, "images": { "type": "array", "items": { "type": "string" } }, "files": { "type": "array", "items": { "type": "string" } }, "status": { "type": "string" }, "timeTracking": { "type": "object", "properties": { "display": { "type": "boolean" }, "type": { "type": "string" } }, "required": [ "display", "type" ] }, "createdBy": { "type": "string" }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "workOrderId", "workRequestId", "organizationId", "locationId", "subject", "description", "type", "priority", "scheduleType", "assignee", "images", "files", "status", "timeTracking", "createdBy", "createdAtDateString", "createdAt", "updatedAtDateString", "updatedAt" ], "description": "Data of the work order." }, "nextToken": { "description": "To retrieve the next set of results." } }, "required": [ "data", "nextToken" ] }, "example": { "data": [ { "workOrderId": "wo-workOrderId", "workRequestId": "wr-workRequestId", "organizationId": "o-organizationId", "locationId": "l-locationId", "subject": "IDT-WorkOrder", "description": "IDT-WorkOrder-Description", "type": "Normal", "priority": "Low", "scheduleType": "Daily", "assignee": [ { "type": "Team", "id": "6d708f0e-xxxx-xxxx-xxxx-f0d9c59488ef" }, { "type": "User", "id": "593b34c0-xxxx-xxxx-xxxx-a454c6f9f50d" } ], "images": [ "Asset-Image.png" ], "files": [ "Infodeck-Bot-0001.pdf" ], "status": "Open", "timeTracking": { "display": true, "type": "automatic" }, "createdBy": "d6b0e137-xxxx-xxxx-xxxx-c944cc12a5f4", "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000, "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1706659200000 } ] }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/users/{userId}/work-orders": { "get": { "summary": "List Work Orders By User", "description": "List work orders by user", "operationId": "Works.ListWorkOrdersByUser", "tags": [ "Works" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "userId", "description": "The ID of user.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "teamId", "description": "The id of team.", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "maxResults", "description": "The maximum number of results to return.", "in": "query", "schema": { "type": "number" }, "required": false }, { "name": "nextToken", "description": "To retrieve the next set of results.", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "filterStatus", "description": "The status of work order. (Default: optional ; Options: Open, Accept, InProgress, OnHold, Complete, Close)", "in": "query", "schema": { "type": "array", "items": { "type": "string" } }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "type": { "type": "string" }, "subject": { "type": "string" }, "description": { "type": "string" }, "expiredAt": { "type": "string" }, "workTime": { "type": "number" }, "scheduleType": { "type": "string" }, "daysOfWeek": { "type": "array", "items": { "type": "boolean" } }, "everyWeeks": { "type": "number" }, "dayOfMonth": { "type": "number" }, "everyMonths": { "type": "number" }, "everyYears": { "type": "number" }, "aheadOfTime": { "type": "number" }, "assignee": { "type": "object", "properties": {}, "required": [] }, "priority": { "type": "string" }, "workRequestId": { "type": "string" }, "locationId": { "type": "string" }, "procedures": { "type": "string" }, "images": { "type": "array", "items": { "type": "string" } }, "files": { "type": "array", "items": { "type": "string" } }, "partIds": { "type": "array", "items": { "type": "string" } }, "assetIds": { "type": "array", "items": { "type": "string" } }, "enableNotify": { "type": "boolean" }, "status": { "type": "string" }, "timeTracking": { "type": "object", "properties": { "display": { "type": "boolean" }, "type": { "type": "string" } }, "required": [ "display", "type" ] }, "createdBy": { "type": "string" }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "type", "subject", "description", "expiredAt", "workTime", "scheduleType", "daysOfWeek", "everyWeeks", "dayOfMonth", "everyMonths", "everyYears", "aheadOfTime", "assignee", "priority", "workRequestId", "locationId", "procedures", "images", "files", "partIds", "assetIds", "enableNotify", "status", "timeTracking", "createdBy", "createdAtDateString", "createdAt", "updatedAtDateString", "updatedAt" ], "description": "Data of the work order." }, "nextToken": { "description": "To retrieve the next set of results." } }, "required": [ "data", "nextToken" ] }, "example": { "data": [ { "subject": "IDT-WorkOrder", "description": "IDT-WorkOrder-Description", "locationId": "l-locationId", "type": "Normal", "priority": "Low", "scheduleType": "Daily", "aheadOfTime": 3600, "enableNotify": true, "files": [ "Infodeck-Bot-0001.pdf" ], "images": [ "Asset-Image.png" ], "assignee": [ { "type": "Team", "id": "6d708f0e-xxxx-xxxx-xxxx-f0d9c59488ef" }, { "type": "User", "id": "593b34c0-xxxx-xxxx-xxxx-a454c6f9f50d" } ], "expiredAt": "2024-02-01T00:00:00.000Z", "status": "Open", "timeTracking": { "display": true, "type": "automatic" }, "createdBy": "d6b0e137-xxxx-xxxx-xxxx-c944cc12a5f4", "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000, "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1706659200000 } ] }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/locations/{locationId}/work-requests": { "get": { "summary": "List Work Requests By Location Id", "description": "List Work Requests By Location Id", "operationId": "Works.ListWorkRequestsByLocationId", "tags": [ "Works" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "locationId", "description": "The ID of location.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "startDate", "description": "The start date number of timestamp. (Default: 1700000000000)", "in": "query", "schema": { "type": "number" }, "required": true }, { "name": "endDate", "description": "The end date number of timestamp. (Default: 1700000000000)", "in": "query", "schema": { "type": "number" }, "required": true }, { "name": "statuses", "description": "The status of work request. (Default: optional ; Options: Pending, Accept, InProgress, Done, Reject, Cancel)", "in": "query", "schema": { "type": "array", "items": { "type": "string" } }, "required": false }, { "name": "priorities", "description": "The status of work request. (Default: optional ; Options: Low, Medium, High, None)", "in": "query", "schema": { "type": "array", "items": { "type": "string" } }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "organizationId": { "type": "string" }, "assetIds": { "type": "string" }, "locationId": { "type": "string" }, "workflowId": {}, "subject": { "type": "string" }, "description": { "type": "string" }, "images": { "type": "array", "items": { "type": "string" } }, "isTemplate": { "type": "boolean" }, "reason": { "type": "string" }, "status": { "type": "string" }, "priority": { "type": "string" }, "createdBy": { "type": "string" }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "id", "organizationId", "assetIds", "locationId", "workflowId", "subject", "description", "images", "isTemplate", "reason", "status", "priority", "createdBy", "createdAtDateString", "createdAt", "updatedAtDateString", "updatedAt" ], "description": "Data of the work request." } }, "required": [ "data" ] }, "example": { "data": [ { "id": "wr-workRequestId", "organizationId": "o-organizationId", "assetIds": "a-assetId", "locationId": "l-locationId", "workflowId": "er_eventRuleId", "subject": "IDT-WorkRequest", "description": "IDT-WorkRequest-Description", "images": [ "Asset-Image.png" ], "isTemplate": false, "reason": "test", "status": "Reject", "priority": "Medium", "createdBy": "d6b0e137-xxxx-xxxx-xxxx-c944cc12a5f4", "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000, "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1706659200000 } ] }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/users/{userId}/work-requests": { "get": { "summary": "List Work Requests By User", "description": "List work requests by user", "operationId": "Works.ListWorkRequestsByUser", "tags": [ "Works" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "userId", "description": "The ID of user.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "filterStatus", "description": "The status of work order. (Default: optional ; Options: Open, Accept, InProgress, OnHold, Complete, Close)", "in": "query", "schema": { "type": "array", "items": { "type": "string" } }, "required": false }, { "name": "maxResults", "description": "The maximum number of results to return.", "in": "query", "schema": { "type": "number" }, "required": false }, { "name": "nextToken", "description": "To retrieve the next set of results.", "in": "query", "schema": { "type": "string" }, "required": false } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "organizationId": { "type": "string" }, "assetIds": { "type": "string" }, "locationId": { "type": "string" }, "workflowId": {}, "subject": { "type": "string" }, "description": { "type": "string" }, "images": { "type": "array", "items": { "type": "string" } }, "isTemplate": { "type": "boolean" }, "reason": { "type": "string" }, "status": { "type": "string" }, "priority": { "type": "string" }, "createdBy": { "type": "string" }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" }, "updatedAtDateString": { "type": "string" }, "updatedAt": { "type": "number" } }, "required": [ "id", "organizationId", "assetIds", "locationId", "workflowId", "subject", "description", "images", "isTemplate", "reason", "status", "priority", "createdBy", "createdAtDateString", "createdAt", "updatedAtDateString", "updatedAt" ], "description": "Data of the work request." } }, "required": [ "data" ] }, "example": { "data": [ { "id": "wr-workRequestId", "organizationId": "o-organizationId", "assetIds": "a-assetId", "locationId": "l-locationId", "workflowId": "er_eventRuleId", "subject": "IDT-WorkRequest", "description": "IDT-WorkRequest-Description", "images": [ "Asset-Image.png" ], "isTemplate": false, "reason": "test", "status": "Reject", "priority": "Medium", "createdBy": "d6b0e137-xxxx-xxxx-xxxx-c944cc12a5f4", "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000, "updatedAtDateString": "2024-01-31T00:00:00.000Z", "updatedAt": 1706659200000 } ] }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/tickets/lookup": { "get": { "summary": "Lookup Ticket By Tracking Number", "description": "Resolve a requester-facing tracking number to its canonical work request.", "operationId": "Works.LookupTicketByTrackingNumber", "tags": [ "Works" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "trackingNumber", "description": "Exact requester-facing tracking number.", "in": "query", "schema": { "type": "string" }, "required": true } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "trackingNumber": { "type": "string" }, "subject": { "type": "string" }, "status": { "type": "string" }, "journeyId": { "type": "string" }, "locationId": { "type": "string" }, "workRequest": { "type": "object", "properties": {}, "required": [] }, "workOrder": { "type": "object", "properties": {}, "required": [] } }, "required": [ "trackingNumber", "subject", "status", "workRequest" ], "description": "Lookup result." } }, "required": [ "data" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/work-requests/{workRequestId}/reject": { "put": { "summary": "Reject Work Request", "description": "Reject work request", "operationId": "Works.RejectWorkRequest", "tags": [ "Works" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "workRequestId", "description": "The ID of work request.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "reason": { "type": "string", "description": "The reason of reject work request." } }, "required": [ "reason" ] }, "example": { "reason": "IDT-Reject-Reason" }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "organizationId": { "type": "string" }, "assetIds": { "type": "array", "items": { "type": "string" } }, "locationId": { "type": "string" }, "isTemplate": { "type": "boolean" }, "subject": { "type": "string" }, "description": { "type": "string" }, "workflowId": { "type": "string" }, "images": { "type": "array", "items": { "type": "string" } }, "priority": { "type": "string" }, "reason": { "type": "string" }, "status": { "type": "string" }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "string" } }, "required": [ "id", "organizationId", "assetIds", "locationId", "isTemplate", "subject", "description", "workflowId", "images", "priority", "reason", "status", "createdAtDateString", "createdAt" ], "description": "Data of the work request." } }, "required": [ "data" ] }, "example": { "data": { "id": "wr-workRequestId", "organizationId": "o-organizationId", "assetIds": [ "a-24e124535b312345" ], "locationId": "l-locationId", "isTemplate": false, "subject": "Work Request", "description": "Reject Work Request", "workflowId": "er_eventRuleId", "images": [], "priority": "None", "reason": "test", "status": "Reject", "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/work-orders/{workOrderId}/comments/{commentId}/reactions/{emoji}": { "delete": { "summary": "Remove reaction from comment", "description": "Remove an emoji reaction from a work order comment", "operationId": "Works.RemoveCommentReaction", "tags": [ "Works" ], "parameters": [ { "name": "organizationId", "description": "Organization ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "workOrderId", "description": "Work Order ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "commentId", "description": "Comment (Activity) ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "emoji", "description": "Emoji to remove (URL encoded)", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": {}, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "activity": { "type": "object", "properties": {}, "required": [], "description": "The updated comment activity" } }, "required": [ "activity" ] }, "example": {}, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } } }, "security": [ { "user": [] } ] } }, "/organizations/{organizationId}/work-orders/{workOrderId}/status": { "put": { "summary": "Update Work Order status", "description": "Update work order", "operationId": "Works.UpdateWorkOrderStatus", "tags": [ "Works" ], "parameters": [ { "name": "organizationId", "description": "The ID of organization.", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "workOrderId", "description": "The ID of work order.", "in": "path", "required": true, "schema": { "type": "string" } } ], "success": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "description": "The status of work order." }, "reason": { "type": "string", "description": "The reason for status change (required for Skipped/Cancelled)." }, "attachments": { "type": "array", "items": { "type": "string" }, "description": "Supporting attachments for status change." }, "responses": { "type": "object", "properties": {}, "required": [], "description": "Optional SOP form responses (only when completing with SOP)." }, "startedAt": { "type": "number", "description": "Timestamp when form was started." }, "deviceInfo": { "type": "object", "properties": {}, "required": [], "description": "Device information for submission." }, "completionMaterialIssues": { "type": "array", "items": { "type": "object", "properties": {}, "required": [] }, "description": "Material issues to record atomically during completion." } }, "required": [ "status" ] }, "example": { "status": "InProgress" }, "description": "" } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "organizationId": { "type": "string" }, "locationId": { "type": "string" }, "location": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" } }, "required": [ "id", "name", "description" ] }, "workRequestId": { "type": "string" }, "type": { "type": "string" }, "subject": { "type": "string" }, "description": { "type": "string" }, "workTime": { "type": "number" }, "scheduleType": { "type": "string" }, "aheadOfTime": { "type": "number" }, "assignee": { "type": "object", "properties": {}, "required": [] }, "priority": { "type": "string" }, "procedures": { "type": "string" }, "files": { "type": "array", "items": { "type": "string" } }, "partIds": { "type": "array", "items": { "type": "string" } }, "assetIds": { "type": "array", "items": { "type": "string" } }, "status": { "type": "string" }, "timeTracking": { "type": "object", "properties": { "display": { "type": "boolean" }, "type": { "type": "string" } }, "required": [ "display", "type" ] }, "enableNotify": { "type": "boolean" }, "images": { "type": "array", "items": { "type": "string" } }, "notifiedAt": { "type": "string" }, "expiredAt": { "type": "string" }, "createdBy": { "type": "string" }, "createdAtDateString": { "type": "string" }, "createdAt": { "type": "number" } }, "required": [ "id", "organizationId", "locationId", "location", "workRequestId", "type", "subject", "description", "workTime", "scheduleType", "aheadOfTime", "assignee", "priority", "procedures", "files", "partIds", "assetIds", "status", "timeTracking", "enableNotify", "images", "notifiedAt", "expiredAt", "createdBy", "createdAtDateString", "createdAt" ], "description": "Data of the work order." } }, "required": [ "data" ] }, "example": { "data": { "id": "o-organizationId-wo-workOrderId", "organizationId": "o-organizationId", "locationId": "l-locationId", "location": { "id": "l-locationId", "name": "Location ", "description": "Location-Description" }, "workRequestId": "wr-workRequestId", "type": "Normal", "subject": "IDT-WorkOrder", "description": "IDT-WorkOrder-Description", "workTime": 3600000, "scheduleType": "Daily", "aheadOfTime": 3600, "assignee": [ { "type": "Team", "id": "6d708f0e-xxxx-xxxx-xxxx-f0d9c59488ef" }, { "type": "User", "id": "593b34c0-xxxx-xxxx-xxxx-a454c6f9f50d" } ], "priority": "Low", "procedures": [], "files": [ "Infodeck-Bot-0001.pdf" ], "partIds": [], "assets": [], "assetIds": [], "status": "InProgress", "timeTracking": { "display": true, "type": "automatic" }, "enableNotify": true, "images": [ "Asset-Image.png" ], "notifiedAt": "2024-01-30T00:00:00.000Z", "expiredAt": "2024-02-01T00:00:00.000Z", "createdBy": "d6b0e137-xxxx-xxxx-xxxx-c944cc12a5f4", "createdAtDateString": "2024-01-01T00:00:00.000Z", "createdAt": 1704067200000 } }, "description": "" } } }, "401": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Unauthenticated", "message": "Authentication is required and has failed or has not yet been provided." }, "description": "" } } }, "403": { "description": "The request has not permission.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The request has not permission." }, "message": { "type": "string", "description": "The request has not permission message." } }, "required": [ "error", "message" ] }, "example": { "error": "Forbidden", "message": "Access to the requested resource is forbidden." }, "description": "" } } }, "404": { "description": "The resource hasn't found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The resource hasn't found." }, "message": { "type": "string", "description": "The resource hasn't found message." } }, "required": [ "error", "message" ] }, "example": { "error": "ResourceNotFound", "message": "The requested resource could not be found." }, "description": "" } } }, "422": { "description": "The input data has invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "The input data has invalid." }, "message": { "type": "string", "description": "The input data has invalid message." } }, "required": [ "error", "message" ] }, "example": { "error": "ValidationError", "message": "Input data validation failed." }, "description": "" } } } }, "security": [ { "user": [] } ] } } }, "components": { "securitySchemes": { "user": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Get your API token via POST /authentications/tokens" }, "apiKey": { "type": "apiKey", "in": "header", "name": "X-API-Key", "description": "API Key for external access (Pro/Enterprise plans). Format: idt_live_[32 characters]. Generate keys at Settings > API Keys. Rate limited to 1000 requests/minute." } } }, "security": [ { "user": [] }, { "apiKey": [] } ], "tags": [ { "name": "ApiKey" }, { "name": "ApprovalDelegation" }, { "name": "ApprovalPack" }, { "name": "ApprovalPool" }, { "name": "ApprovalRule" }, { "name": "ApprovalRuntime" }, { "name": "Asset" }, { "name": "Authentication" }, { "name": "Deck" }, { "name": "Edge Gateways" }, { "name": "Feedback" }, { "name": "Integration" }, { "name": "LNS Application" }, { "name": "LNS Device" }, { "name": "LNS Device Profile" }, { "name": "LNS Gateway" }, { "name": "Location" }, { "name": "Notification" }, { "name": "Organization" }, { "name": "Organization Addons" }, { "name": "Organization Entitlements" }, { "name": "Organization Stripe" }, { "name": "Organization Team" }, { "name": "Permissions" }, { "name": "ReservablePolicy" }, { "name": "ReservableResource" }, { "name": "Reservation" }, { "name": "Role" }, { "name": "SLATemplate" }, { "name": "SLA Metrics" }, { "name": "SLA Templates" }, { "name": "Statistics" }, { "name": "Thing" }, { "name": "TwoFactorAuth" }, { "name": "Usage" }, { "name": "User Notification" }, { "name": "Webhook" }, { "name": "Workflows" }, { "name": "Works" } ] }