openapi: 3.2.0 info: version: v2.222.1 title: Corva Intervention Units API description: 'The Corva API is a powerful interface providing great flexibility and extensibility with Corva. Whether your needs are simple UI visualizations, data entry, replication/sync tasks, real-time stream processing, or complex machine learning CPU-intensive apps, the Corva API is the way to make it happen. Our concepts are split into three distinct silos: data apps, visualization apps, and a REST API' termsOfService: https://www.corva.ai/terms-and-conditions/ contact: name: Corva API Team email: support@corva.ai security: - api_key: [] tags: - name: InterventionUnits paths: /v2/intervention_units: get: summary: Get a list of Intervention Units tags: - InterventionUnits responses: '401': description: Authentication error content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' '403': description: Authorization error content: application/json: schema: $ref: '#/components/schemas/AuthorizationError' '404': description: Not found error content: application/json: schema: $ref: '#/components/schemas/NotFoundError' parameters: - in: query name: company description: Search by Company ID schema: type: integer - in: query name: program description: Search by Program ID schema: type: integer - in: query name: search description: Search by intervention name schema: type: string - in: query name: intervention_type description: Filter by intervention type schema: type: string - in: query name: per_page description: Number of intervention units per page schema: type: integer - in: query name: page description: Number of page schema: type: integer - in: query name: sort description: 'One or more fields to sort by. Prefix with a - for descending order. Ex: company,name' schema: type: string enum: - name - company - program - intervention_type - created_at default: name - in: query name: order description: A sorting direction schema: type: string enum: - asc - desc default: asc operationId: getV2InterventionUnits x-operation-id-source: derived post: summary: Create an Intervention Unit tags: - InterventionUnits responses: '401': description: Authentication error content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' '403': description: Authorization error content: application/json: schema: $ref: '#/components/schemas/AuthorizationError' '404': description: Not found error content: application/json: schema: $ref: '#/components/schemas/NotFoundError' '200': description: Created Intervention Unit content: application/json: schema: $ref: '#/components/schemas/InterventionUnit' requestBody: content: application/json: schema: $ref: '#/components/schemas/InterventionUnitPayload' description: Intervention Unit Payload required: true operationId: postV2InterventionUnits x-operation-id-source: derived /v2/intervention_units/{id}: patch: summary: Update Intervention Unit tags: - InterventionUnits responses: '401': description: Authentication error content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' '403': description: Authorization error content: application/json: schema: $ref: '#/components/schemas/AuthorizationError' '404': description: Not found error content: application/json: schema: $ref: '#/components/schemas/NotFoundError' '200': description: Updated Intervention Unit content: application/json: schema: $ref: '#/components/schemas/InterventionUnit' parameters: - in: path name: id description: Intervention ID schema: type: integer format: int64 required: true requestBody: content: application/json: schema: $ref: '#/components/schemas/InterventionUnitPayload' description: Intervention Payload required: true operationId: patchV2InterventionUnitsById x-operation-id-source: derived delete: summary: Delete Intervention Unit tags: - InterventionUnits responses: '401': description: Authentication error content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' '403': description: Authorization error content: application/json: schema: $ref: '#/components/schemas/AuthorizationError' '404': description: Not found error content: application/json: schema: $ref: '#/components/schemas/NotFoundError' '200': description: Deleted Intervention Unit content: application/json: schema: example: status: deleted parameters: - in: path name: id description: Intervention ID schema: type: integer format: int64 required: true operationId: deleteV2InterventionUnitsById x-operation-id-source: derived components: schemas: AuthorizationError: required: - code - message properties: code: type: integer format: int32 message: type: string example: code: 403 message: Access denied AuthenticationError: required: - code - message properties: code: type: integer format: int32 message: type: string example: code: 401 message: Missing authentication. Please try again. InterventionUnitPayload: properties: name: type: string intervention_type: type: string company_id: type: integer program_id: type: integer example: name: Intervention Unit intervention_type: wireline company_id: 111 program_id: 123 NotFoundError: required: - code - message properties: code: type: integer format: int32 message: type: string example: code: 404 message: Not found InterventionUnit: properties: id: type: integer format: int64 type: type: string attributes: type: object properties: intervention_type: type: string name: type: string created_at: type: string format: date-time updated_at: type: string format: date-time relationships: type: object properties: program: type: object properties: data: type: object properties: id: type: integer format: int64 type: type: string company: type: object properties: data: type: object properties: id: type: integer format: int64 type: type: string example: id: 111 type: intervention_unit attributes: name: Intervention intervention_type: workover created_at: '2010-01-01T00:00:00.000Z' updated_at: '2010-01-01T00:00:00.000Z' relationships: program: data: id: '333' type: program company: data: id: '222' type: company securitySchemes: api_key: type: apiKey name: authorization in: header