openapi: 3.2.0 info: title: Operations Hub Core.resources.service Positions API version: 0.1.1 description: '' servers: [] tags: - name: core.resources.service-positions paths: /api/core/v1/resources/{resource_id}/service-positions: get: operationId: list_resource_service_positions summary: List Service Positions for Resource parameters: - in: path name: resource_id schema: title: Resource Id type: integer required: true - in: query name: search schema: anyOf: - type: string - type: 'null' description: Search by name (case-insensitive) title: Search required: false description: Search by name (case-insensitive) - in: query name: sort schema: anyOf: - type: string - type: 'null' description: Sort by field (prefix with - for descending) title: Sort required: false description: Sort by field (prefix with - for descending) - 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/ResourceServicePositionResponse' title: Response type: array '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' description: List all child items for a parent with pagination, search, and sorting. tags: - core.resources.service-positions security: - APIKeyAuth: [] - CookieAuth: [] post: operationId: create_resource_service_position summary: Create Service Position parameters: - in: path name: resource_id schema: title: Resource Id type: integer required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ResourceServicePositionResponse' description: Create a new child item for the parent. tags: - core.resources.service-positions requestBody: content: application/json: schema: $ref: '#/components/schemas/ResourceServicePositionCreate' required: true security: - APIKeyAuth: [] - CookieAuth: [] /api/core/v1/resources/{resource_id}/service-positions/{position_id}: get: operationId: get_resource_service_position summary: Get Service Position parameters: - in: path name: resource_id schema: title: Resource Id type: integer required: true - in: path name: position_id schema: title: Position Id type: integer required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ResourceServicePositionResponse' description: Get a single child item. tags: - core.resources.service-positions security: - APIKeyAuth: [] - CookieAuth: [] patch: operationId: update_resource_service_position summary: Update Service Position parameters: - in: path name: resource_id schema: title: Resource Id type: integer required: true - in: path name: position_id schema: title: Position Id type: integer required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ResourceServicePositionResponse' description: Update a child item. tags: - core.resources.service-positions requestBody: content: application/json: schema: $ref: '#/components/schemas/ResourceServicePositionUpdate' required: true security: - APIKeyAuth: [] - CookieAuth: [] delete: operationId: delete_resource_service_position summary: Delete Service Position parameters: - in: path name: resource_id schema: title: Resource Id type: integer required: true - in: path name: position_id schema: title: Position Id type: integer required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Success' description: Soft delete a child item. tags: - core.resources.service-positions security: - APIKeyAuth: [] - CookieAuth: [] components: schemas: ResourceServicePositionCreate: additionalProperties: false description: Schema for creating a ResourceServicePosition. properties: service_id: description: Service ID title: Service Id type: integer position_id: description: Position ID title: Position Id type: integer from_date: description: Effective from date (YYYY-MM-DD) title: From Date type: string required: - service_id - position_id - from_date title: ResourceServicePositionCreate type: object ResourceServicePositionUpdate: additionalProperties: false description: Schema for updating a ResourceServicePosition. properties: service_id: anyOf: - type: integer - type: 'null' description: Service ID title: Service Id position_id: anyOf: - type: integer - type: 'null' description: Position ID title: Position Id from_date: anyOf: - type: string - type: 'null' description: Effective from date (YYYY-MM-DD) title: From Date title: ResourceServicePositionUpdate 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 PositionObject: additionalProperties: false description: Nested Position object (no timestamps). properties: id: title: Id type: integer name: title: Name type: string is_lead: title: Is Lead type: boolean required: - id - name - is_lead title: PositionObject 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 ResourceServicePositionResponse: additionalProperties: false description: Schema for ResourceServicePosition response. properties: updated_at: description: Last update timestamp format: date-time title: Updated At type: string id: description: ResourceServicePosition ID title: Id type: integer resource_id: description: Resource ID title: Resource Id type: integer service_id: description: Service ID title: Service Id type: integer position: $ref: '#/components/schemas/PositionObject' description: Position from_date: anyOf: - type: string - type: 'null' description: Effective from date title: From Date required: - updated_at - id - resource_id - service_id - position - from_date title: ResourceServicePositionResponse 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