{"type":"api","title":"Deploy New Pipeline","meta":{"id":"/apps/pubhub/media/cisco-edge-intelligence-2-2-0-api/2d8524cb89cd60e1e2e66bcc438913d05fdc9eff/262737b2-b3c2-32cd-b07b-fdbdcd23918f","info":{"title":"Edge Intelligence Local Manager API Documentation","description":"This API enables management of data policies within the Cisco Edge Intelligence IOx Application.\n\n**Key Features**:\n- User Authentication\n- Data Policy Management\n- Agent Management\n\n**Versioning**:\n- Current version: v2\n- Access pattern: `/api/v{version_number}/edge-intelligence`\n\n**Security**:\n- All endpoints secured with JWT Bearer token authentication\n- Tokens expire after 5 mins\n- Refresh tokens using the `/token` endpoint\n","version":"2.2.0"},"tags":[{"name":"Authentication","description":"User authentication and token management"},{"name":"Policy Management","description":"Data policy management"},{"name":"Agent Management","description":"Edge Intelligence Agent management"},{"name":"Metrics","description":"Edge Intelligence Metrics"}],"x-parser-conf":{"overview":{"markdownPath":"reference/overview.md"}},"openapi":"3.0.1","servers":[{"url":"https://localhost/api/v2/edge-intelligence","description":"Local development server"}],"securitySchemes":{"Bearer":{"type":"apiKey","description":"JWT Authorization header using the Bearer scheme.\nExample: \"Authorization: Bearer {token}\"\n","name":"Authorization","in":"header"}}},"spec":{"tags":["Policy Management"],"summary":"Deploy New Pipeline","description":"Deploys a new data pipeline within the application","operationId":"deployPipeline","requestBody":{"description":"Pipeline configuration","required":true,"content":{"application/json":{"schema":{"type":"object","description":"Pipeline Config object","properties":{"configStatus":{"type":"object","description":"config status object","properties":{"dataSources":{"type":"object","description":"Source of data for the pipeline","properties":{"input":{"type":"object","description":"details of source data","properties":{"assetId":{"type":"string","description":"asset Id"},"dataSourceConfiguration":{"type":"object","description":"details of source data and configuration","properties":{"assetId":{"type":"string","description":"asset Id"},"assetTypeId":{"type":"string","description":"assetTypeId"},"clientId":{"type":"string","description":"client Id"},"deviceName":{"type":"string","description":"Name of device"},"endpoints":{"type":"array","description":"list of endpoints","items":{"type":"object","description":"list of items in endpoint","properties":{"clientId":{"type":"string","description":"client Id"},"metrics":{"type":"object","description":"metrics","properties":{"humidity":{"type":"object","description":"humidity","properties":{"datatype":{"type":"string","description":"datatype"},"label":{"type":"string","description":"label"},"topic":{"type":"string","description":"topic"}}}}},"name":{"type":"string","description":"name"},"port":{"type":"string","description":"port"},"secure":{"type":"boolean","description":"secure"},"credentials":{"type":"array","description":"credentials","items":{"type":"string","description":"items in array of credentials"}}}}},"name":{"type":"string","description":"name"},"port":{"type":"string","description":"port"},"secure":{"type":"boolean","description":"secure"},"useWebSockets":{"type":"boolean","description":"useWebSockets"}}},"fields":{"type":"array","description":"fields","items":{"type":"object","description":"items in array of fields","properties":{"key":{"type":"string","description":"key"},"source":{"type":"string","description":"source"},"type":{"type":"string","description":"type"}}}},"type":{"type":"string","description":"type"}}}},"$$ref":"#/components/schemas/DataSource"},"dataTarget":{"type":"object","description":"DataTarget","properties":{"dataTargetConfiguration":{"type":"object","description":"destination configuration of data","properties":{"connectors":{"type":"array","description":"details of connectors","items":{"type":"object","description":"items in array of connectors","properties":{"cleanSession":{"type":"boolean","description":"cleanSession"},"clientId":{"type":"string","description":"clientId"},"host":{"type":"string","description":"host or IP address"},"mqttQoS":{"type":"integer","description":"mqttQoS"},"port":{"type":"integer","description":"port number on which MQTT broker is running"},"publish":{"type":"object","description":"publish","properties":{"resultPath":{"type":"string","description":"resultPath"},"mqttQoS":{"type":"integer","description":"mqttQoS"},"mqttRetain":{"type":"boolean","description":"mqttRetain"},"mqttTopic":{"type":"string","description":"mqtt topic name"}}},"secure":{"type":"boolean","description":"secure"},"username":{"type":"string","description":"username"}}}}}},"type":{"type":"string","description":"type"}},"$$ref":"#/components/schemas/DataTarget"},"outputModel":{"type":"object","description":"OutputModel","properties":{"value":{"type":"object","description":"value","properties":{"addTimestamp":{"description":"addTimestamp","type":"boolean"},"emit":{"type":"boolean","description":"emit"},"targetPath":{"type":"string","description":"targetPath"},"type":{"type":"string","description":"type"}}}},"$$ref":"#/components/schemas/OutputModel"},"scriptedDataLogic":{"type":"object","description":"ScriptedDataLogic","properties":{"enableCloudCommands":{"type":"boolean","description":"enableCloudCommands"},"invokeEvery":{"type":"integer","description":"invokeEvery"},"parameters":{"type":"object","description":"parameters","properties":{}},"productive":{"type":"boolean","description":"productive"},"script":{"type":"string","description":"script"}},"$$ref":"#/components/schemas/ScriptedDataLogic"}}},"name":{"type":"string","description":"name of pipeline","example":"policy-1"},"pipelineStatus":{"type":"string","description":"status of pipeline","example":"Running"}},"$$ref":"#/components/schemas/PipelineConfig"}}}},"responses":{"201":{"description":"Pipeline deployed successfully","content":{"application/json":{"schema":{"description":"PipelineConfigDeploymentSuccess","properties":{"success":{"type":"boolean","description":"boolean value indicating success or failure","example":true},"data":{"type":"object","description":"data","properties":{"id":{"type":"string","description":"id of pipeline","example":"e2d47c95-2eef-4f5c-b3a9-8137a98acc66_72919765-1665-49bc-b210-fda06ca6d46e"},"status":{"type":"string","description":"status of pipeline","example":"[[SUCCESS]]"}}},"message":{"type":"string","description":"message describing success or failure","example":"Operation Successful"}},"$$ref":"#/components/schemas/PipelineConfigDeploymentSuccess"}}}},"400":{"description":"Issue in pipeline deployment","content":{"application/json":{"schema":{"type":"object","description":"PipelineConfigDeploymentBadRequest","properties":{"success":{"type":"boolean","description":"boolean value indicating success or failure"},"error":{"type":"object","description":"error message","properties":{"code":{"type":"string","description":"error code of failure"},"message":{"type":"string","description":"detailed error message"}}}},"$$ref":"#/components/schemas/PipelineConfigDeploymentBadRequest","example":{"success":false,"error":{"code":"INVALID_REQUEST","message":"Pipeline already exists"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","description":"Error response object","properties":{"success":{"type":"boolean","description":"boolean value indicating success or failure"},"error":{"type":"object","description":"error message","properties":{"code":{"type":"string","description":"error code of failure"},"message":{"type":"string","description":"detailed error message"}}}},"$$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":{"code":"INVALID_TOKEN","message":"Invalid token"}}}},"$$ref":"#/components/responses/Unauthorized"},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","description":"Error response object","properties":{"success":{"type":"boolean","description":"boolean value indicating success or failure"},"error":{"type":"object","description":"error message","properties":{"code":{"type":"string","description":"error code of failure"},"message":{"type":"string","description":"detailed error message"}}}},"$$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":{"code":"FORBIDDEN","message":"Unauthorised operation performed"}}}},"$$ref":"#/components/responses/Forbidden"},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","description":"Error response object","properties":{"success":{"type":"boolean","description":"boolean value indicating success or failure"},"error":{"type":"object","description":"error message","properties":{"code":{"type":"string","description":"error code of failure"},"message":{"type":"string","description":"detailed error message"}}}},"$$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"error":{"code":"INTERNAL_SERVER_ERROR","message":"Internal server error"}}}},"$$ref":"#/components/responses/InternalServerError"}},"security":[{"Bearer":[]}],"__originalOperationId":"deployPipeline","method":"post","path":"/pipelines"}}