openapi: 3.2.0 info: title: Operations Hub Core.positions API version: 0.1.1 description: '' servers: [] tags: - name: core.positions paths: /api/core/v1/positions: get: operationId: list_positions summary: List Positions parameters: - 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: is_lead schema: anyOf: - type: boolean - type: 'null' description: Filter by lead flag title: Is Lead required: false description: Filter by lead flag - 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/PositionResponse' 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: - core.positions security: - APIKeyAuth: [] - CookieAuth: [] post: operationId: create_position summary: Create Position parameters: [] responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/PositionResponse' description: Create a new item. tags: - core.positions requestBody: content: application/json: schema: $ref: '#/components/schemas/PositionCreate' required: true security: - APIKeyAuth: [] - CookieAuth: [] /api/core/v1/positions/{id}: get: operationId: get_position summary: Get Position parameters: - in: path name: id schema: title: Id type: integer required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/PositionResponse' description: Get a single item by ID. tags: - core.positions security: - APIKeyAuth: [] - CookieAuth: [] patch: operationId: update_position summary: Update Position parameters: - in: path name: id schema: title: Id type: integer required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/PositionResponse' description: Update an item. tags: - core.positions requestBody: content: application/json: schema: $ref: '#/components/schemas/PositionUpdate' required: true security: - APIKeyAuth: [] - CookieAuth: [] delete: operationId: delete_position summary: Delete Position 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: - core.positions security: - APIKeyAuth: [] - CookieAuth: [] components: schemas: PositionCreate: additionalProperties: false description: Schema for creating a Position. properties: name: description: Position name minLength: 1 title: Name type: string is_lead: default: false description: Whether this position is a lead role title: Is Lead type: boolean required: - name title: PositionCreate type: object PositionResponse: additionalProperties: false description: Schema for Position response. properties: updated_at: description: Last update timestamp format: date-time title: Updated At type: string id: description: Position ID title: Id type: integer name: description: Position name title: Name type: string is_lead: description: Whether this position is a lead role title: Is Lead type: boolean required: - updated_at - id - name - is_lead title: PositionResponse 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 PositionUpdate: additionalProperties: false description: Schema for updating a Position. properties: name: anyOf: - type: string - type: 'null' description: Position name title: Name is_lead: anyOf: - type: boolean - type: 'null' description: Whether this position is a lead role title: Is Lead title: PositionUpdate 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