openapi: 3.2.0 info: title: Operations Hub Core.projects.planned Resource Sets API version: 0.1.1 description: '' servers: [] tags: - name: core.projects.planned-resource-sets paths: /api/core/v1/projects/{project_id}/planned-resource-sets: get: operationId: list_project_planned_resource_sets summary: List Planned Resource Sets for Project parameters: - in: path name: project_id schema: title: Project Id type: string 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: project_location_id schema: anyOf: - type: integer - type: 'null' description: Filter by project location ID title: Project Location Id required: false description: Filter by project location ID - 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: 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/ProjectPlannedResourceSetResponse' 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.projects.planned-resource-sets security: - APIKeyAuth: [] - CookieAuth: [] post: operationId: create_project_planned_resource_set summary: Create Planned Resource Set parameters: - in: path name: project_id schema: title: Project Id type: string required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ProjectPlannedResourceSetResponse' description: Create a new child item for the parent. tags: - core.projects.planned-resource-sets requestBody: content: application/json: schema: $ref: '#/components/schemas/ProjectPlannedResourceSetCreate' required: true security: - APIKeyAuth: [] - CookieAuth: [] /api/core/v1/projects/{project_id}/planned-resource-sets/{planned_resource_set_id}: get: operationId: get_project_planned_resource_set summary: Get Planned Resource Set parameters: - in: path name: project_id schema: title: Project Id type: string required: true - 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/ProjectPlannedResourceSetResponse' description: Get a single child item. tags: - core.projects.planned-resource-sets security: - APIKeyAuth: [] - CookieAuth: [] patch: operationId: update_project_planned_resource_set summary: Update Planned Resource Set parameters: - in: path name: project_id schema: title: Project Id type: string required: true - 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/ProjectPlannedResourceSetResponse' description: Update a child item. tags: - core.projects.planned-resource-sets requestBody: content: application/json: schema: $ref: '#/components/schemas/ProjectPlannedResourceSetUpdate' required: true security: - APIKeyAuth: [] - CookieAuth: [] delete: operationId: delete_project_planned_resource_set summary: Delete Planned Resource Set parameters: - in: path name: project_id schema: title: Project Id type: string required: true - 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/Success' description: Soft delete a child item. tags: - core.projects.planned-resource-sets security: - APIKeyAuth: [] - CookieAuth: [] components: schemas: ProjectPlannedResourceSetItemEmbeddedOutput: additionalProperties: false description: 'Embedded planned item: same shape as a PRS item plus approval status. ``resource_id`` widens to optional here and stays required on the roster base it inherits from: a *planned* leg can be an unassigned booking (the robot set is named later), while a materialized roster member always has its resource.' properties: id: description: ProjectResourceSetItem ID title: 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 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 status: $ref: '#/components/schemas/ProjectPlannedResourceSetStatus' description: Approval lifecycle status required: - id - resource_type - status title: ProjectPlannedResourceSetItemEmbeddedOutput type: object 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 NestedIdOnly: additionalProperties: false description: Generic nested object with just id (no timestamps). properties: id: title: Id type: integer required: - id title: NestedIdOnly type: object ProjectPlannedResourceSetCreate: additionalProperties: false description: Schema for creating a ProjectPlannedResourceSet. properties: name: description: Set name minLength: 1 title: Name type: string description: anyOf: - type: string - type: 'null' description: Set description title: Description project_location_id: anyOf: - type: integer - type: 'null' description: Project location ID title: Project Location Id status: allOf: - $ref: '#/components/schemas/ProjectPlannedResourceSetStatus' default: APPROVED description: Set-deployment status (defaults to APPROVED on create) required: - name title: ProjectPlannedResourceSetCreate type: object ProjectPlannedResourceSetUpdate: additionalProperties: false description: Schema for updating a ProjectPlannedResourceSet. properties: name: anyOf: - minLength: 1 type: string - type: 'null' description: Set name title: Name description: anyOf: - type: string - type: 'null' description: Set description title: Description project_location_id: anyOf: - type: integer - type: 'null' description: Project location ID title: Project Location Id status: anyOf: - $ref: '#/components/schemas/ProjectPlannedResourceSetStatus' - type: 'null' description: Approval lifecycle status title: ProjectPlannedResourceSetUpdate type: object ProjectPlannedResourceSetResponse: additionalProperties: false description: Schema for ProjectPlannedResourceSet response. properties: updated_at: description: Last update timestamp format: date-time title: Updated At type: string id: description: Planned resource set ID title: Id type: integer project: anyOf: - $ref: '#/components/schemas/ProjectObject' - type: 'null' description: Project information project_location: anyOf: - $ref: '#/components/schemas/NestedIdOnly' - type: 'null' description: Project location information name: description: Set name title: Name type: string description: anyOf: - type: string - type: 'null' description: Set description title: Description status: $ref: '#/components/schemas/ProjectPlannedResourceSetStatus' description: Approval lifecycle status set_items: description: Planned resource set items items: $ref: '#/components/schemas/ProjectPlannedResourceSetItemEmbeddedOutput' title: Set Items type: array planned_start_date: anyOf: - type: string - type: 'null' description: Earliest planned start across set items (min, NULL if none) title: Planned Start Date planned_end_date: anyOf: - type: string - type: 'null' description: Latest planned end across set items (max, NULL if none) title: Planned End Date required: - updated_at - id - name - status title: ProjectPlannedResourceSetResponse 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 ProjectObject: additionalProperties: false description: Nested project object for responses (no timestamps). properties: id: title: Id type: integer code: title: Code type: string required: - id - code title: ProjectObject 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