{"swagger":"2.0","info":{"description":"This API provides external access to SCorp-io platform services.\n\nRealtime data exchanges are performed through MQTT. External partners broker receive lightweight messages containing only technical information such as scorpId, value and timestamp.\n\n**Example**\n\n```json\n{\n  \"scorpId\": \"c0f4c3a2-83af-4d9a-bb2f-6a77d56e9b42\",\n  \"value\": 21.5,\n  \"timestamp\": 1750074400000\n}\n```\n\nThe scorpId is a technical unique identifier. The API can then be used to translate this identifier into meaningful business information, retrieve historical data, or send commands.\n\n**Architecture overview**\n\n\n\n```java\nSensor <-------> SCorp-io -------> External MQTT Broker\n                     ^\n                     |\n                     |\n                    API\n   Variables / Historized Data / Commands\n```\n\n**Available endpoints**\n\n**Authentication**  \nAuthenticate external clients and retrieve an access token used to call protected API resources.\n\n**Variables**  \nRetrieve metadata associated with scorpIds, such as names, descriptions, data types, units, object hierarchy, paths, and alarm information.\nOnly variables explicitly configured with the `externalIntegration` parameter set to `true` are exposed through the External API and available for external integrations.\n\n**Historized Data**  \nRetrieve historical values stored by SCorp-io for reporting, analytics, dashboards, and long-term data processing.\n\n**Actions**  \nPublish actions from an external integration to SCorp-io.\n\n**Commands**  \nSend commands from external systems to SCorp-io and connected devices.\n\n**Internal Commands**  \nSend internal commands intended for SCorp-io-managed processing flows.\n\nThese endpoints are intended for third-party integrations, supervision platforms, analytics solutions, and external applications interacting with the SCorp-io ecosystem.\n\nTo become an external partner and gain access to these services, please contact SCorp-io teams, they will provide your .","version":"1.1","title":"Api Documentation","termsOfService":"urn:tos","contact":{},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0"}},"host":"gateway-prod.scorp-io.com","basePath":"/","consumes":["application/json"],"produces":["application/json"],"paths":{"/account/authentication/scorpio-api/login":{"post":{"tags":["Authentication end-point"],"summary":"Login to an existing account","operationId":"loginExternalUserUsingPOST","parameters":[{"in":"body","name":"loginExternalUserRequest","description":"loginExternalUserRequest","required":true,"schema":{"$ref":"#/definitions/LoginExternalUserRequest"}}],"responses":{"200":{"description":"Login success","schema":{"$ref":"#/definitions/ExternalUserLoginResponse"}},"404":{"description":"Account not found"}},"security":[]}},"/scorpio-api/configuration/external-partner/{external-partner}/project/{project-id}/variables":{"get":{"tags":["Configuration end-points"],"summary":"List variables for external partner endpoint","operationId":"list_31","produces":["application/json"],"parameters":[{"name":"external-partner","in":"path","required":true,"type":"string"},{"name":"project-id","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"Variables list loaded successfully","schema":{"$ref":"#/definitions/ScorpioApiVariableResponse"}}}}},"/scorpio-api/realtime/{externalIntegration}/actions":{"post":{"tags":["Command end-points"],"summary":"Action publishing endpoint","operationId":"sendEngagementUsingPOST","parameters":[{"in":"body","name":"actionSendRequest","description":"actionSendRequest","required":true,"schema":{"$ref":"#/definitions/ActionSendRequest"}},{"name":"externalIntegration","in":"path","description":"externalIntegration","required":true,"type":"string"}],"responses":{"204":{"description":"Action publishing successfully"}}}},"/scorpio-api/realtime/{externalIntegration}/commands":{"post":{"tags":["Command end-points"],"summary":"Command publishing endpoint","operationId":"sendCommandUsingPOST","parameters":[{"in":"body","name":"commandSendRequest","description":"commandSendRequest","required":true,"schema":{"$ref":"#/definitions/CommandSendRequest"}},{"name":"externalIntegration","in":"path","description":"externalIntegration","required":true,"type":"string"}],"responses":{"204":{"description":"Command publishing successfully"}}}},"/scorpio-api/realtime/{externalIntegration}/internal-commands":{"post":{"tags":["Command end-points"],"summary":"Internal command publishing endpoint","operationId":"sendInternalCommandUsingPOST","parameters":[{"in":"body","name":"internalCommandSendRequest","description":"internalCommandSendRequest","required":true,"schema":{"$ref":"#/definitions/InternalCommandSendRequest"}},{"name":"externalIntegration","in":"path","description":"externalIntegration","required":true,"type":"string"}],"responses":{"204":{"description":"Internal command publishing successfully"}}}},"/scorpio-api/historian/{externalIntegration}/data":{"get":{"tags":["Historized data end-points"],"summary":"List historized data endpoint","operationId":"listUsingGET_3","parameters":[{"name":"begin-date","in":"query","description":"begin-date","required":true,"type":"integer","format":"int64"},{"name":"end-date","in":"query","description":"end-date","required":true,"type":"integer","format":"int64"},{"name":"externalIntegration","in":"path","description":"externalIntegration","required":true,"type":"string"},{"name":"project-id","in":"query","description":"project-id","required":true,"type":"string"},{"name":"scorp-id","in":"query","description":"scorp-id","required":false,"type":"string"}],"responses":{"200":{"description":"Historized data list returned successfully","schema":{"type":"array","items":{"$ref":"#/definitions/HistorianDataListResponse"}}}}}}},"securityDefinitions":{"Bearer":{"type":"apiKey","name":"Authorization","in":"header"}},"security":[{"Bearer":[]}],"definitions":{"HistorianDataListResponse":{"type":"object","properties":{"attributeModelDataType":{"type":"string"},"attributeModelName":{"type":"string"},"attributeModelSubType":{"type":"string"},"description":{"type":"string"},"graphicObjectFileName":{"type":"string"},"notification":{"type":"boolean"},"objectInstanceName":{"type":"string"},"objectModelName":{"type":"string"},"scorpId":{"type":"string"},"timestamp":{"type":"integer","format":"int64"},"unit":{"type":"string"},"value":{"type":"object"}},"title":"HistorianDataListResponse"},"LoginExternalUserRequest":{"type":"object","properties":{"password":{"type":"string"},"userName":{"type":"string"}},"title":"LoginExternalUserRequest"},"ExternalUserLoginResponse":{"type":"object","properties":{"accessToken":{"type":"string"}},"title":"ExternalUserLoginResponse"},"ScorpioApiVariableResponse":{"type":"object","properties":{"inputs":{"type":"array","items":{"$ref":"#/definitions/ScorpioApiResponse"}},"outputs":{"type":"array","items":{"$ref":"#/definitions/ScorpioApiResponse"}},"customs":{"type":"array","items":{"$ref":"#/definitions/ScorpioApiCustomAttributeResponse"}},"internals":{"type":"array","items":{"$ref":"#/definitions/ScorpioApiInternalResponse"}}},"title":"ScorpioApiVariableResponse"},"ScorpioApiResponse":{"type":"object","properties":{"id":{"type":"string"},"topic":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"objectModelName":{"type":"string"},"objectInstanceName":{"type":"string"},"attributeModelName":{"type":"string"},"dataType":{"type":"string","enum":["UByte","UShort","UInteger","ULong","Byte","Short","Integer","Long","Float","Double","Binary","Boolean","String","WeeklySchedule"]},"unit":{"type":"string"},"isAlarm":{"type":"boolean"},"severity":{"type":"string","enum":["critical","medium","low"]},"paths":{"type":"array","items":{"type":"string"}}},"title":"ScorpioApiResponse"},"ScorpioApiCustomAttributeResponse":{"type":"object","properties":{"id":{"type":"string"},"description":{"type":"string"},"objectModelName":{"type":"string"},"objectInstanceName":{"type":"string"},"attributeModelName":{"type":"string"},"dataType":{"type":"string"},"unit":{"type":"string"},"isAlarm":{"type":"boolean"},"severity":{"type":"string"},"paths":{"type":"array","items":{"type":"string"}}},"title":"ScorpioApiCustomAttributeResponse"},"ScorpioApiInternalResponse":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"objectModelName":{"type":"string"},"objectInstanceName":{"type":"string"},"attributeModelName":{"type":"string"},"dataType":{"type":"string"},"unit":{"type":"string"},"paths":{"type":"array","items":{"type":"string"}},"value":{"type":"object"}},"title":"ScorpioApiInternalResponse"},"CommandSendRequest":{"type":"object","properties":{"broker":{"type":"string","enum":["MQTT_PRIVATE","MQTT_PUBLIC","NO_BROKER"]},"priority":{"type":"integer","format":"int32"},"projectId":{"type":"string"},"topic":{"type":"string"},"value":{"type":"object"},"variableDataType":{"type":"string","enum":["BINARY","BOOLEAN","BYTE","DOUBLE","FLOAT","INTEGER","LONG","SHORT","STRING","UBYTE","UINTEGER","ULONG","USHORT","WEEKLY_SCHEDULE"]},"variableName":{"type":"string"},"objectModelName":{"type":"string"},"objectModelScorpId":{"type":"string"},"objectInstanceName":{"type":"string"},"objectInstanceScorpId":{"type":"string"},"attributeModelName":{"type":"string"},"attributeModelScorpId":{"type":"string"},"alias":{"type":"integer","format":"int64"}},"title":"CommandSendRequest"},"InternalCommandSendRequest":{"type":"object","properties":{"projectId":{"type":"string"},"value":{"type":"object"},"variableDataType":{"type":"string","enum":["BINARY","BOOLEAN","BYTE","DOUBLE","FLOAT","INTEGER","LONG","SHORT","STRING","UBYTE","UINTEGER","ULONG","USHORT","WEEKLY_SCHEDULE"]},"variableName":{"type":"string"},"objectModelName":{"type":"string"},"objectModelScorpId":{"type":"string"},"objectInstanceName":{"type":"string"},"objectInstanceScorpId":{"type":"string"},"attributeModelName":{"type":"string"},"attributeModelScorpId":{"type":"string"}},"title":"InternalCommandSendRequest"},"ActionSendRequest":{"type":"object","properties":{"actionType":{"type":"string","enum":["DISENGAGEMENT","ENGAGEMENT"]},"projectId":{"type":"string"}},"title":"ActionSendRequest"}}}