openapi: 3.2.0 info: title: Operations Hub Core.planned Resource Sets.items API version: 0.1.1 description: '' servers: [] tags: - name: core.planned-resource-sets.items paths: /api/core/v1/planned-resource-sets/{planned_resource_set_id}/items: get: operationId: list_planned_resource_set_items summary: List Items for Planned Resource Set parameters: - in: path name: planned_resource_set_id schema: title: Planned Resource Set Id type: integer required: true - 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: resource_type schema: anyOf: - type: string - type: 'null' description: Filter by resource type (ROBOT or TECHNICIAN) title: Resource Type required: false description: Filter by resource type (ROBOT or TECHNICIAN) - in: query name: status schema: anyOf: - $ref: '#/components/schemas/ProjectPlannedResourceSetStatus' - type: 'null' description: Filter by status required: false description: Filter by status - in: query name: is_lead schema: anyOf: - type: boolean - type: 'null' description: Filter by is_lead flag title: Is Lead required: false description: Filter by is_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/ProjectPlannedResourceSetItemResponse' 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.planned-resource-sets.items security: - APIKeyAuth: [] - CookieAuth: [] post: operationId: create_planned_resource_set_item summary: Create Item parameters: - in: path name: planned_resource_set_id schema: title: Planned Resource Set Id type: integer required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ProjectPlannedResourceSetItemResponse' description: Create a new child item for the parent. tags: - core.planned-resource-sets.items requestBody: content: application/json: schema: $ref: '#/components/schemas/ProjectPlannedResourceSetItemCreate' required: true security: - APIKeyAuth: [] - CookieAuth: [] /api/core/v1/planned-resource-sets/{planned_resource_set_id}/items/{item_id}: get: operationId: get_planned_resource_set_item summary: Get Item parameters: - in: path name: planned_resource_set_id schema: title: Planned Resource Set Id type: integer required: true - in: path name: item_id schema: title: Item Id type: integer required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ProjectPlannedResourceSetItemResponse' description: Get a single child item. tags: - core.planned-resource-sets.items security: - APIKeyAuth: [] - CookieAuth: [] patch: operationId: update_planned_resource_set_item summary: Update Item parameters: - in: path name: planned_resource_set_id schema: title: Planned Resource Set Id type: integer required: true - in: path name: item_id schema: title: Item Id type: integer required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ProjectPlannedResourceSetItemResponse' description: Update a child item. tags: - core.planned-resource-sets.items requestBody: content: application/json: schema: $ref: '#/components/schemas/ProjectPlannedResourceSetItemUpdate' required: true security: - APIKeyAuth: [] - CookieAuth: [] delete: operationId: delete_planned_resource_set_item summary: Delete Item parameters: - in: path name: planned_resource_set_id schema: title: Planned Resource Set Id type: integer required: true - in: path name: item_id schema: title: Item 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.planned-resource-sets.items security: - APIKeyAuth: [] - CookieAuth: [] components: schemas: ProjectPlannedResourceSetStatus: description: 'All planned-resource-set statuses (approval pipeline + deployment lifecycle). Mirrors ``core.models.projects.ProjectPlannedResourceSetStatus`` — keep both in sync.' enum: - PLANNED - SUGGESTED - APPROVED - PLANNING - EXECUTION - FIELD_COMPLETED - REJECTED title: ProjectPlannedResourceSetStatus type: string ProjectPlannedResourceSetItemCreate: additionalProperties: false description: Schema for creating a ProjectPlannedResourceSetItem. properties: resource_id: anyOf: - type: integer - type: 'null' description: Resource ID. Omit or send null to book an unassigned ROBOT leg (dates now, set chosen later); allowed only while the leg is PLANNED. title: Resource Id resource_type: description: Resource type (ROBOT or TECHNICIAN) title: Resource Type type: string is_lead: anyOf: - type: boolean - type: 'null' description: Is team lead title: Is Lead project_location_id: anyOf: - type: integer - type: 'null' description: Project location ID title: Project Location Id start_date: anyOf: - type: string - type: 'null' description: Start date title: Start Date end_date: anyOf: - type: string - type: 'null' description: End date title: End Date status: allOf: - $ref: '#/components/schemas/ProjectPlannedResourceSetStatus' default: PLANNED description: Approval lifecycle status required: - resource_type title: ProjectPlannedResourceSetItemCreate type: object ProjectPlannedResourceSetItemResponse: additionalProperties: false description: Schema for ProjectPlannedResourceSetItem response. properties: updated_at: description: Last update timestamp format: date-time title: Updated At type: string id: description: Planned resource set item ID title: Id type: integer project_planned_resource_set_id: description: Planned resource set ID title: Project Planned Resource Set Id type: integer resource_id: anyOf: - type: integer - type: 'null' description: Resource ID; null on an unassigned leg title: Resource Id resource_type: description: Resource type (ROBOT or TECHNICIAN) title: Resource Type type: string is_lead: anyOf: - type: boolean - type: 'null' description: Is team lead title: Is Lead project_location_id: anyOf: - type: integer - type: 'null' description: Project location ID title: Project Location Id start_date: anyOf: - type: string - type: 'null' description: Start date title: Start Date end_date: anyOf: - type: string - type: 'null' description: End date title: End Date status: $ref: '#/components/schemas/ProjectPlannedResourceSetStatus' description: Approval lifecycle status resource_full_name: anyOf: - type: string - type: 'null' description: Resource full name title: Resource Full Name resource_email: anyOf: - type: string - type: 'null' description: Resource email title: Resource Email required: - updated_at - id - project_planned_resource_set_id - resource_type - status title: ProjectPlannedResourceSetItemResponse 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 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 ProjectPlannedResourceSetItemUpdate: additionalProperties: false description: Schema for updating a ProjectPlannedResourceSetItem. properties: resource_id: anyOf: - type: integer - type: 'null' description: Resource ID title: Resource Id resource_type: anyOf: - type: string - type: 'null' description: Resource type (ROBOT or TECHNICIAN) title: Resource Type is_lead: anyOf: - type: boolean - type: 'null' description: Is team lead title: Is Lead project_location_id: anyOf: - type: integer - type: 'null' description: Project location ID title: Project Location Id start_date: anyOf: - type: string - type: 'null' description: Start date title: Start Date end_date: anyOf: - type: string - type: 'null' description: End date title: End Date status: anyOf: - $ref: '#/components/schemas/ProjectPlannedResourceSetStatus' - type: 'null' description: Approval lifecycle status title: ProjectPlannedResourceSetItemUpdate 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