openapi: 3.2.0 info: title: Operations Hub Vis.inspections API version: 0.1.1 description: '' servers: [] tags: - name: vis.inspections paths: /api/vis/v1/inspections/{sol_id}/: get: operationId: vis_api_get_inspection summary: Fetch inspection data for a given service order line ID parameters: - in: path name: sol_id schema: title: Sol Id type: integer required: true - in: query name: component_name schema: anyOf: - items: type: string type: array - type: 'null' description: Filter by component name (exact match). title: Component Name required: false description: Filter by component name (exact match). - in: query name: component_id schema: anyOf: - items: type: integer type: array - type: 'null' description: Filter by turbine component id (exact match). title: Component Id required: false description: Filter by turbine component id (exact match). - in: query name: section_name schema: anyOf: - items: type: string type: array - type: 'null' description: Filter sections by name (exact match). title: Section Name required: false description: Filter sections by name (exact match). - in: query name: return_sections schema: default: true description: Include component sections in the response. title: Return Sections type: boolean required: false description: Include component sections in the response. - in: query name: return_data schema: default: true description: Include all media data. title: Return Data type: boolean required: false description: Include all media data. - in: query name: return_urls schema: default: true description: Include signed URLs for media data. title: Return Urls type: boolean required: false description: Include signed URLs for media data. - in: query name: root_photo_ordering schema: examples: No ordering: description: No specific ordering applied, default order is used. value: '' Ordering by specific fields: description: Fields can be prefixed with '-' for descending order. value: distance,name,file_name,angle title: Root Photo Ordering type: string required: false examples: No ordering: description: No specific ordering applied, default order is used. value: '' Ordering by specific fields: description: Fields can be prefixed with '-' for descending order. value: distance,name,file_name,angle - in: query name: poi_photo_ordering schema: examples: No ordering: description: No specific ordering applied, default order is used. value: '' Ordering by specific fields: description: Fields can be prefixed with '-' for descending order. value: distance,name,file_name,angle title: Poi Photo Ordering type: string required: false examples: No ordering: description: No specific ordering applied, default order is used. value: '' Ordering by specific fields: description: Fields can be prefixed with '-' for descending order. value: distance,name,file_name,angle - in: query name: external_photo_ordering schema: examples: No ordering: description: No specific ordering applied, default order is used. value: '' Ordering by specific fields: description: Fields can be prefixed with '-' for descending order. value: name,file_name title: External Photo Ordering type: string required: false examples: No ordering: description: No specific ordering applied, default order is used. value: '' Ordering by specific fields: description: Fields can be prefixed with '-' for descending order. value: name,file_name - in: query name: ler_photo_ordering schema: examples: No ordering: description: No specific ordering applied, default order is used. value: '' Ordering by specific fields: description: Fields can be prefixed with '-' for descending order. value: name,file_name title: Ler Photo Ordering type: string required: false examples: No ordering: description: No specific ordering applied, default order is used. value: '' Ordering by specific fields: description: Fields can be prefixed with '-' for descending order. value: name,file_name responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/InspectionSchema' description: Fetch inspection data for a given service order line ID. tags: - vis.inspections security: - APIKeyAuth: [] - CookieAuth: [] /api/vis/v1/inspections/{sol_id}/components/: get: operationId: vis_api_get_inspection_components summary: Fetch components for a given inspection service order line ID parameters: - in: path name: sol_id schema: title: Sol Id type: integer required: true responses: '200': description: OK content: application/json: schema: items: $ref: '#/components/schemas/ComponentSchema' title: Response type: array description: Fetch components for a given inspection service order line ID. tags: - vis.inspections security: - APIKeyAuth: [] - CookieAuth: [] /api/vis/v1/inspections/{sol_id}/components/links/: post: operationId: vis_api_post_inspection_component_links summary: Create component links for a given inspection service order line ID parameters: - in: path name: sol_id schema: title: Sol Id type: integer required: true responses: '200': description: OK content: application/json: schema: items: $ref: '#/components/schemas/ComponentSchema' title: Response type: array description: Create component links for a given inspection service order line ID. tags: - vis.inspections requestBody: content: application/json: schema: items: $ref: '#/components/schemas/PostComponentLinkSchema' title: Body type: array required: true security: - APIKeyAuth: [] - CookieAuth: [] delete: operationId: vis_api_delete_inspection_component_links summary: Delete component links for a given inspection service order line ID parameters: - in: path name: sol_id schema: title: Sol Id type: integer required: true responses: '200': description: OK description: Delete component links for a given inspection service order line ID. tags: - vis.inspections security: - APIKeyAuth: [] - CookieAuth: [] /api/vis/v1/inspections/{sol_id}/authorize-media: post: operationId: vis_api_authorize_inspection_media summary: Authorize Inspection Media parameters: - in: path name: sol_id schema: title: Sol Id type: integer required: true responses: '200': description: OK description: Sets the cookies to access the CDN for a given inspection service order line ID. tags: - vis.inspections security: - APIKeyAuth: [] - CookieAuth: [] components: schemas: ExternalPhotoSchema: properties: name: title: Name type: string rotation: title: Rotation type: integer sort_order: anyOf: - type: integer - type: 'null' title: Sort Order distance: anyOf: - type: number - type: 'null' title: Distance side: anyOf: - $ref: '#/components/schemas/ImageSide' - type: 'null' index: anyOf: - type: integer - type: 'null' title: Index angle: anyOf: - type: integer - type: 'null' title: Angle orientation: anyOf: - $ref: '#/components/schemas/ImageOrientation' - type: 'null' normalized_angle: anyOf: - type: integer - type: 'null' title: Normalized Angle url: anyOf: - type: string - type: 'null' title: Url id: title: Id type: integer is_root_photo: title: Is Root Photo type: boolean pixel_distance: anyOf: - type: number - type: 'null' title: Pixel Distance status: $ref: '#/components/schemas/ExternalImageStatus' cdn_base_url: anyOf: - type: string - type: 'null' title: Cdn Base Url tiles: anyOf: - items: $ref: '#/components/schemas/ExternalPhotoTileSchema' type: array - type: 'null' title: Tiles thumbnail: anyOf: - $ref: '#/components/schemas/ExternalPhotoThumbnailSchema' - type: 'null' lowres: anyOf: - $ref: '#/components/schemas/ExternalPhotoLowResSchema' - type: 'null' distance_to_centre: anyOf: - type: number - type: 'null' title: Distance To Centre required: - name - rotation - id - is_root_photo - status title: ExternalPhotoSchema type: object ImageOrientation: enum: - PS_DOWN - SS_DOWN - LE_DOWN - DW_DOWN - UW_DOWN title: ImageOrientation type: string ManufacturerComponentModelObject: additionalProperties: false description: Nested manufacturer component model object for responses. properties: id: title: Id type: integer name: title: Name type: string required: - id - name title: ManufacturerComponentModelObject type: object TurbineComponentResponse: additionalProperties: false description: Schema for TurbineComponent response. properties: updated_at: description: Last update timestamp format: date-time title: Updated At type: string id: description: Turbine component ID title: Id type: integer component_type: $ref: '#/components/schemas/ComponentTypeObject' description: Component type information serial_number: description: Serial number title: Serial Number type: string manufacturer_serial_number: anyOf: - type: string - type: 'null' description: Manufacturer serial number title: Manufacturer Serial Number manufacturer: anyOf: - $ref: '#/components/schemas/ManufacturerObject' - type: 'null' description: Manufacturer information model: anyOf: - $ref: '#/components/schemas/ManufacturerComponentModelObject' - type: 'null' description: Component model information turbine: $ref: '#/components/schemas/TurbineObject' description: Turbine information parent_turbine_component_id: anyOf: - type: integer - type: 'null' description: Parent turbine component ID title: Parent Turbine Component Id length: anyOf: - type: number - type: 'null' description: Component length in meters title: Length radius: anyOf: - type: number - type: 'null' description: Component radius in meters title: Radius blade_tip: description: Whether this is a blade tip component title: Blade Tip type: boolean position: anyOf: - $ref: '#/components/schemas/PositionEnum' - type: 'null' description: Component position (A, B, or C) pair_index: anyOf: - enum: - 1 - 2 type: integer - type: 'null' description: 1 or 2 for paired receptors; NULL for non-paired components. title: Pair Index additional_information: anyOf: - type: object - type: 'null' description: Additional information as JSON title: Additional Information required: - updated_at - id - component_type - serial_number - turbine - blade_tip title: TurbineComponentResponse type: object LERImageStatus: enum: - NEW - ANOMALIES_FLAGGED - ACCEPTED title: LERImageStatus type: string InspectionSchema: properties: id: title: Id type: integer service_order_line_id: title: Service Order Line Id type: integer components: anyOf: - items: $ref: '#/components/schemas/ComponentSchema' type: array - type: 'null' title: Components required: - id - service_order_line_id title: InspectionSchema type: object ExternalPhotoTileSchema: properties: url: anyOf: - type: string - type: 'null' title: Url id: title: Id type: integer x: title: X type: integer y: title: Y type: integer required: - id - x - y title: ExternalPhotoTileSchema type: object LERInspectionStatus: description: Review status of a single LER inspection step run. enum: - NOT_STARTED - IN_PROGRESS - COMPLETED - FLAGGED title: LERInspectionStatus type: string ComponentTypeObject: additionalProperties: false description: Nested component type object for responses. properties: id: title: Id type: integer name: title: Name type: string field_list: anyOf: - items: type: string type: array - type: 'null' title: Field List required: - id - name title: ComponentTypeObject type: object ManufacturerObject: additionalProperties: false description: Nested manufacturer object for responses. properties: id: title: Id type: integer name: title: Name type: string required: - id - name title: ManufacturerObject type: object RootPhotoThumbnailSchema: properties: url: anyOf: - type: string - type: 'null' title: Url id: title: Id type: integer required: - id title: RootPhotoThumbnailSchema type: object LERPhotoSchema: properties: url: anyOf: - type: string - type: 'null' title: Url id: title: Id type: integer name: title: Name type: string sol_id: title: Sol Id type: integer date: format: date title: Date type: string blade: title: Blade type: string step: title: Step type: string side: anyOf: - type: string - type: 'null' title: Side photo_index: anyOf: - type: integer - type: 'null' title: Photo Index sort_order: anyOf: - type: integer - type: 'null' title: Sort Order status: $ref: '#/components/schemas/LERImageStatus' include_in_report: default: false title: Include In Report type: boolean distance_to_centre: anyOf: - type: number - type: 'null' title: Distance To Centre cdn_base_url: anyOf: - type: string - type: 'null' title: Cdn Base Url tiles: anyOf: - items: $ref: '#/components/schemas/LERPhotoTileSchema' type: array - type: 'null' title: Tiles thumbnail: anyOf: - $ref: '#/components/schemas/LERPhotoThumbnailSchema' - type: 'null' lowres: anyOf: - $ref: '#/components/schemas/LERPhotoLowResSchema' - type: 'null' required: - id - name - sol_id - date - blade - step - status title: LERPhotoSchema type: object RootPhotoLowResSchema: properties: url: anyOf: - type: string - type: 'null' title: Url id: title: Id type: integer required: - id title: RootPhotoLowResSchema type: object LERPhotoLowResSchema: properties: url: anyOf: - type: string - type: 'null' title: Url id: title: Id type: integer required: - id title: LERPhotoLowResSchema type: object VideoSnapshotSchema: properties: url: anyOf: - type: string - type: 'null' title: Url timestamp: title: Timestamp type: number distance: anyOf: - type: number - type: 'null' title: Distance distance_to_hub_centre: anyOf: - type: number - type: 'null' description: distance + the turbine model's center_to_root_offset (OH-4169), additive on top of the unchanged root-based `distance`. None when the turbine's model has no offset configured — never falls back to a root-based number under this key. title: Distance To Hub Centre required: - timestamp title: VideoSnapshotSchema type: object LERPhotoThumbnailSchema: properties: url: anyOf: - type: string - type: 'null' title: Url id: title: Id type: integer required: - id title: LERPhotoThumbnailSchema type: object PositionEnum: description: Enum for turbine component positions. enum: - A - B - C title: PositionEnum type: string VideoFileBlobSchema: properties: url: anyOf: - type: string - type: 'null' title: Url id: title: Id type: integer kind: $ref: '#/components/schemas/VideoFileBlobKind' required: - id - kind title: VideoFileBlobSchema type: object POIPhotoSchema: properties: name: title: Name type: string rotation: title: Rotation type: integer sort_order: anyOf: - type: integer - type: 'null' title: Sort Order distance: anyOf: - type: number - type: 'null' title: Distance side: anyOf: - $ref: '#/components/schemas/ImageSide' - type: 'null' index: anyOf: - type: integer - type: 'null' title: Index angle: anyOf: - type: integer - type: 'null' title: Angle orientation: anyOf: - $ref: '#/components/schemas/ImageOrientation' - type: 'null' normalized_angle: anyOf: - type: integer - type: 'null' title: Normalized Angle url: anyOf: - type: string - type: 'null' title: Url id: title: Id type: integer cdn_base_url: anyOf: - type: string - type: 'null' title: Cdn Base Url tiles: anyOf: - items: $ref: '#/components/schemas/POIPhotoTileSchema' type: array - type: 'null' title: Tiles thumbnail: anyOf: - $ref: '#/components/schemas/POIPhotoThumbnailSchema' - type: 'null' lowres: anyOf: - $ref: '#/components/schemas/POIPhotoLowResSchema' - type: 'null' required: - name - rotation - id title: POIPhotoSchema type: object SectionSchema: properties: id: title: Id type: integer name: title: Name type: string run_index: title: Run Index type: integer status: $ref: '#/components/schemas/InspectionItemStatus' video_files: anyOf: - items: $ref: '#/components/schemas/VideoFileSchema' type: array - type: 'null' title: Video Files root_photos: anyOf: - items: $ref: '#/components/schemas/RootPhotoSchema' type: array - type: 'null' title: Root Photos poi_photos: anyOf: - items: $ref: '#/components/schemas/POIPhotoSchema' type: array - type: 'null' title: Poi Photos external_photos: anyOf: - items: $ref: '#/components/schemas/ExternalPhotoSchema' type: array - type: 'null' title: External Photos ler_photos: anyOf: - items: $ref: '#/components/schemas/LERPhotoGroupSchema' type: array - type: 'null' title: Ler Photos required: - id - name - run_index - status title: SectionSchema type: object ExternalPhotoLowResSchema: properties: url: anyOf: - type: string - type: 'null' title: Url id: title: Id type: integer required: - id title: ExternalPhotoLowResSchema type: object RootPhotoTileSchema: properties: url: anyOf: - type: string - type: 'null' title: Url id: title: Id type: integer x: title: X type: integer y: title: Y type: integer required: - id - x - y title: RootPhotoTileSchema type: object VideoFileBlobKind: const: QR_DETECTION enum: - QR_DETECTION title: VideoFileBlobKind type: string InspectionItemStatus: enum: - NOT_STARTED - IN_PROGRESS - AI_REVIEW - DETAILED_REVIEW - COMPLETED title: InspectionItemStatus type: string VideoFileSchema: properties: url: anyOf: - type: string - type: 'null' title: Url id: title: Id type: integer name: title: Name type: string extension: $ref: '#/components/schemas/VideoFileExtension' status: $ref: '#/components/schemas/InspectionItemStatus' recording_start_time: anyOf: - format: date-time type: string - type: 'null' title: Recording Start Time qr_position: anyOf: - type: string - type: 'null' title: Qr Position qr_detections: anyOf: - items: $ref: '#/components/schemas/VideoFileBlobSchema' type: array - type: 'null' title: Qr Detections hls_playlist_url: anyOf: - type: string - type: 'null' title: Hls Playlist Url vtt_file_url: anyOf: - type: string - type: 'null' title: Vtt File Url model_url: anyOf: - type: string - type: 'null' title: Model Url model_3d_exists: default: false title: Model 3D Exists type: boolean snapshots: items: $ref: '#/components/schemas/VideoSnapshotSchema' title: Snapshots type: array required: - id - name - extension - status title: VideoFileSchema type: object LERPhotoGroupSchema: properties: step: title: Step type: string runs: items: $ref: '#/components/schemas/LERPhotoRunSchema' title: Runs type: array required: - step - runs title: LERPhotoGroupSchema type: object ExternalImageStatus: description: 'Review status of a single external photo. Mirrors ``LERImageStatus`` but stays a separate enum: external photos have no step/run concept, so the two review flows are free to diverge.' enum: - NEW - ANOMALIES_FLAGGED - ACCEPTED title: ExternalImageStatus type: string POIPhotoThumbnailSchema: properties: url: anyOf: - type: string - type: 'null' title: Url id: title: Id type: integer required: - id title: POIPhotoThumbnailSchema type: object POIPhotoLowResSchema: properties: url: anyOf: - type: string - type: 'null' title: Url id: title: Id type: integer required: - id title: POIPhotoLowResSchema type: object TurbineObject: additionalProperties: false description: Nested turbine object for responses. properties: id: title: Id type: integer name: title: Name type: string required: - id - name title: TurbineObject type: object POIPhotoTileSchema: properties: url: anyOf: - type: string - type: 'null' title: Url id: title: Id type: integer x: title: X type: integer y: title: Y type: integer required: - id - x - y title: POIPhotoTileSchema type: object LERPhotoRunSchema: properties: id: anyOf: - type: integer - type: 'null' title: Id run_index: title: Run Index type: integer status: $ref: '#/components/schemas/LERInspectionStatus' photos: items: $ref: '#/components/schemas/LERPhotoSchema' title: Photos type: array required: - run_index - status - photos title: LERPhotoRunSchema type: object PostComponentLinkSchema: properties: component_id: title: Component Id type: integer turbine_component_id: anyOf: - type: integer - type: 'null' title: Turbine Component Id required: - component_id - turbine_component_id title: PostComponentLinkSchema type: object LERPhotoTileSchema: properties: url: anyOf: - type: string - type: 'null' title: Url id: title: Id type: integer x: title: X type: integer y: title: Y type: integer required: - id - x - y title: LERPhotoTileSchema type: object ComponentSchema: properties: id: title: Id type: integer name: title: Name type: string turbine_component: anyOf: - $ref: '#/components/schemas/TurbineComponentResponse' - type: 'null' sections: anyOf: - items: $ref: '#/components/schemas/SectionSchema' type: array - type: 'null' title: Sections required: - id - name title: ComponentSchema type: object VideoFileExtension: description: Expected video file formats from inspection data uploads. enum: - '360' - insv title: VideoFileExtension type: string ExternalPhotoThumbnailSchema: properties: url: anyOf: - type: string - type: 'null' title: Url id: title: Id type: integer required: - id title: ExternalPhotoThumbnailSchema type: object RootPhotoSchema: properties: name: title: Name type: string rotation: title: Rotation type: integer sort_order: anyOf: - type: integer - type: 'null' title: Sort Order distance: anyOf: - type: number - type: 'null' title: Distance side: anyOf: - $ref: '#/components/schemas/ImageSide' - type: 'null' index: anyOf: - type: integer - type: 'null' title: Index angle: anyOf: - type: integer - type: 'null' title: Angle orientation: anyOf: - $ref: '#/components/schemas/ImageOrientation' - type: 'null' normalized_angle: anyOf: - type: integer - type: 'null' title: Normalized Angle url: anyOf: - type: string - type: 'null' title: Url id: title: Id type: integer cdn_base_url: anyOf: - type: string - type: 'null' title: Cdn Base Url tiles: anyOf: - items: $ref: '#/components/schemas/RootPhotoTileSchema' type: array - type: 'null' title: Tiles thumbnail: anyOf: - $ref: '#/components/schemas/RootPhotoThumbnailSchema' - type: 'null' lowres: anyOf: - $ref: '#/components/schemas/RootPhotoLowResSchema' - type: 'null' required: - name - rotation - id title: RootPhotoSchema type: object ImageSide: description: Sides from which photos can be taken. enum: - L - R - T title: ImageSide type: string securitySchemes: APIKeyAuth: type: http scheme: bearer CookieAuth: type: apiKey in: cookie name: opshub_prod_sessionid AuthBearer: type: http scheme: bearer