openapi: 3.2.0 info: title: Operations Hub Planning API version: 0.1.1 description: '' servers: [] tags: - name: Planning paths: /api/planning/v1/service-orders/{id}/anomalies: post: operationId: planning_endpoints_service_order_anomalies_link_anomalies summary: Link anomalies to a service order parameters: - in: path name: id schema: title: Id type: integer required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/PlanningServiceOrderResponse' description: 'Appends the given anomaly ids to the service order''s linked set. Idempotent: an anomaly already actively linked is left untouched (no duplicate row).' tags: - Planning requestBody: content: application/json: schema: $ref: '#/components/schemas/PlanningServiceOrderAnomalyLinkRequest' required: true security: - APIKeyAuth: [] - CookieAuth: [] /api/planning/v1/service-orders/{id}/anomalies/{anomaly_id}: delete: operationId: planning_endpoints_service_order_anomalies_unlink_anomaly summary: Unlink an anomaly from a service order parameters: - in: path name: id schema: title: Id type: integer required: true - in: path name: anomaly_id schema: title: Anomaly Id type: integer required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/PlanningServiceOrderResponse' description: Remove a single anomaly link from a service order. tags: - Planning security: - APIKeyAuth: [] - CookieAuth: [] components: schemas: PlanningNestedVendor: properties: id: title: Id type: integer display_name: title: Display Name type: string required: - id - display_name title: PlanningNestedVendor type: object PlanningNestedService: properties: id: title: Id type: integer code: title: Code type: string description: anyOf: - type: string - type: 'null' title: Description required: - id - code title: PlanningNestedService type: object PlanningNestedCustomerVendor: properties: id: title: Id type: integer vendor_id: title: Vendor Id type: integer vendor: anyOf: - $ref: '#/components/schemas/PlanningNestedVendor' - type: 'null' required: - id - vendor_id title: PlanningNestedCustomerVendor type: object PlanningServiceOrderResponse: properties: id: title: Id type: integer number: anyOf: - type: string - type: 'null' title: Number status: title: Status type: string priority: anyOf: - type: string - type: 'null' title: Priority description: anyOf: - type: string - type: 'null' title: Description notes: anyOf: - type: string - type: 'null' title: Notes planned_start_date: anyOf: - format: date type: string - type: 'null' title: Planned Start Date planned_end_date: anyOf: - format: date type: string - type: 'null' title: Planned End Date actual_start_date: anyOf: - format: date type: string - type: 'null' title: Actual Start Date actual_end_date: anyOf: - format: date type: string - type: 'null' title: Actual End Date planned_cost: anyOf: - type: number - type: string - type: 'null' title: Planned Cost actual_cost: anyOf: - type: number - type: string - type: 'null' title: Actual Cost customer_id: title: Customer Id type: integer customer: anyOf: - $ref: '#/components/schemas/PlanningNestedCustomer' - type: 'null' project_id: anyOf: - type: integer - type: 'null' title: Project Id project: anyOf: - $ref: '#/components/schemas/PlanningNestedProject' - type: 'null' service_id: title: Service Id type: integer service: anyOf: - $ref: '#/components/schemas/PlanningNestedService' - type: 'null' vendor_id: anyOf: - type: integer - type: 'null' title: Vendor Id vendor: anyOf: - $ref: '#/components/schemas/PlanningNestedCustomerVendor' - type: 'null' location_id: anyOf: - type: integer - type: 'null' title: Location Id turbine_id: anyOf: - type: integer - type: 'null' title: Turbine Id turbine_component_id: anyOf: - type: integer - type: 'null' title: Turbine Component Id anomaly_id: anyOf: - type: integer - type: 'null' title: Anomaly Id anomaly_ids: default: [] items: type: integer title: Anomaly Ids type: array created_at: format: date-time title: Created At type: string updated_at: format: date-time title: Updated At type: string required: - id - status - customer_id - service_id - created_at - updated_at title: PlanningServiceOrderResponse type: object PlanningServiceOrderAnomalyLinkRequest: additionalProperties: false properties: anomaly_ids: items: type: integer title: Anomaly Ids type: array required: - anomaly_ids title: PlanningServiceOrderAnomalyLinkRequest type: object PlanningNestedProject: properties: id: title: Id type: integer name: title: Name type: string required: - id - name title: PlanningNestedProject type: object PlanningNestedCustomer: properties: id: title: Id type: integer display_name: title: Display Name type: string required: - id - display_name title: PlanningNestedCustomer type: object securitySchemes: APIKeyAuth: type: http scheme: bearer CookieAuth: type: apiKey in: cookie name: opshub_prod_sessionid AuthBearer: type: http scheme: bearer