openapi: 3.2.0 info: title: Operations Hub Planning.service Orders API version: 0.1.1 description: '' servers: [] tags: - name: planning.service-orders paths: /api/planning/v1/service-orders: get: operationId: list_serviceorders summary: List ServiceOrders parameters: - in: query name: search schema: anyOf: - type: string - type: 'null' title: Search required: false - in: query name: sort schema: anyOf: - type: string - type: 'null' title: Sort required: false - in: query name: status schema: anyOf: - type: string - type: 'null' title: Status required: false - in: query name: customer_id schema: anyOf: - type: integer - type: 'null' title: Customer Id required: false - in: query name: project_id schema: anyOf: - type: integer - type: 'null' title: Project Id required: false - in: query name: service_id schema: anyOf: - type: integer - type: 'null' title: Service Id required: false - in: query name: vendor_id schema: anyOf: - type: integer - type: 'null' title: Vendor Id required: false - in: query name: paginate schema: default: true description: Enable pagination (false returns all results) title: Paginate type: boolean required: false description: Enable pagination (false returns all results) - in: query name: page schema: default: 1 description: Page number minimum: 1 title: Page type: integer required: false description: Page number - in: query name: page_size schema: default: 50 description: Number of items per page maximum: 1000 minimum: 1 title: Page Size type: integer required: false description: Number of items per page responses: '200': description: OK content: application/json: schema: items: $ref: '#/components/schemas/PlanningServiceOrderResponse' title: Response type: array '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' description: List all items with optional search, sorting, and pagination. tags: - planning.service-orders security: - APIKeyAuth: [] - CookieAuth: [] post: operationId: create_serviceorder summary: Create ServiceOrder parameters: [] responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/PlanningServiceOrderResponse' description: Create a new item. tags: - planning.service-orders requestBody: content: application/json: schema: $ref: '#/components/schemas/PlanningServiceOrderCreate' required: true security: - APIKeyAuth: [] - CookieAuth: [] /api/planning/v1/service-orders/{id}: get: operationId: get_serviceorder summary: Get ServiceOrder 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: Get a single item by ID. tags: - planning.service-orders security: - APIKeyAuth: [] - CookieAuth: [] patch: operationId: update_serviceorder summary: Update ServiceOrder 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: Update an item. tags: - planning.service-orders requestBody: content: application/json: schema: $ref: '#/components/schemas/PlanningServiceOrderUpdate' required: true security: - APIKeyAuth: [] - CookieAuth: [] delete: operationId: delete_serviceorder summary: Delete ServiceOrder parameters: - in: path name: id schema: title: Id type: integer required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Success' description: Soft delete an item. tags: - planning.service-orders security: - APIKeyAuth: [] - CookieAuth: [] components: schemas: PlanningServiceOrderUpdate: properties: project_id: anyOf: - type: integer - type: 'null' title: Project Id service_id: anyOf: - type: integer - type: 'null' title: Service Id vendor_id: anyOf: - type: integer - type: 'null' title: Vendor Id 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_ids: anyOf: - items: type: integer type: array - type: 'null' title: Anomaly Ids number: anyOf: - type: string - type: 'null' title: Number status: anyOf: - type: string - type: 'null' title: Status 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 title: PlanningServiceOrderUpdate type: object 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 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 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 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 Error: additionalProperties: false description: Error response schema. properties: code: $ref: '#/components/schemas/ErrorCode' message: title: Message type: string required: - code - message title: Error type: object PlanningServiceOrderCreate: additionalProperties: false properties: customer_id: title: Customer Id type: integer project_id: anyOf: - type: integer - type: 'null' title: Project Id service_id: title: Service Id type: integer vendor_id: anyOf: - type: integer - type: 'null' title: Vendor Id 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_ids: anyOf: - items: type: integer type: array - type: 'null' title: Anomaly Ids number: anyOf: - type: string - type: 'null' title: Number status: anyOf: - type: string - type: 'null' default: PLANNED title: Status 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 required: - customer_id - service_id title: PlanningServiceOrderCreate type: object Success: additionalProperties: false description: 'Schema returned for successful operations. The `success` field is always ``true`` in this schema. Failed operations are represented by the :class:`Error` schema instead, so a ``false`` value does not occur in practice. The field is included for consistency across responses and to make the contract explicit for clients.' properties: success: default: true description: Always true for this schema. Errors are represented by a separate Error schema, so false is never returned. title: Success type: boolean title: Success type: object ErrorCode: description: Error codes for API errors. enum: - validation - server - auth - unknown - external - generic title: ErrorCode type: string securitySchemes: APIKeyAuth: type: http scheme: bearer CookieAuth: type: apiKey in: cookie name: opshub_prod_sessionid AuthBearer: type: http scheme: bearer