Phasio Customer Project Controller API

Endpoints for managing customer projects

OpenAPI Specification

phasio-customer-project-controller-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Phasio Activity Internal Customer Project Controller API
  description: This is the API documentation for the Phasio application.
  version: '1.0'
servers:
- url: https://m-api.eu.phas.io
  description: Generated server url
security:
- Phasio API Bearer Token: []
tags:
- name: Customer Project Controller
  description: Endpoints for managing customer projects
paths:
  /api/customer/v1/project:
    get:
      tags:
      - Customer Project Controller
      summary: Get projects
      description: Retrieves projects for the current customer with optional filtering and pagination
      operationId: get_10
      parameters:
      - name: page
        in: query
        description: Zero-based page index (0..N)
        required: false
        schema:
          type: integer
          default: 0
          minimum: 0
      - name: size
        in: query
        description: The size of the page to be returned
        required: false
        schema:
          type: integer
          default: 20
          minimum: 1
      - name: sort
        in: query
        description: 'Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.'
        required: false
        schema:
          type: array
          default:
          - createdAt,DESC
          items:
            type: string
      responses:
        '200':
          description: Successfully retrieved projects
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ProjectDto'
        '401':
          description: Unauthorized - missing or invalid authentication
    post:
      tags:
      - Customer Project Controller
      summary: Create project
      description: Creates a new project for the current customer
      operationId: create_19
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateProjectDto'
        required: true
      responses:
        '200':
          description: Project successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectDto'
        '400':
          description: Invalid project data
        '401':
          description: Unauthorized - missing or invalid authentication
  /api/customer/v1/project/{projectId}:
    get:
      tags:
      - Customer Project Controller
      summary: Get project by ID
      description: Retrieves a specific project by its unique identifier
      operationId: getById_11
      parameters:
      - name: projectId
        in: path
        description: ID of the project to retrieve
        required: true
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Successfully retrieved project
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectDto'
        '401':
          description: Unauthorized - missing or invalid authentication
        '404':
          description: Project not found
  /api/customer/v1/project/count:
    get:
      tags:
      - Customer Project Controller
      summary: Get project count
      description: Retrieves the count of projects for the current customer with optional filtering
      operationId: getCount_1
      parameters:
      - name: status
        in: query
        description: List of project statuses to filter by
        required: false
        schema:
          type: array
          items:
            type: string
      responses:
        '200':
          description: Successfully retrieved project count
          content:
            application/json:
              schema:
                type: integer
                format: int64
        '401':
          description: Unauthorized - missing or invalid authentication
components:
  schemas:
    ProjectDto:
      type: object
      properties:
        id:
          type: integer
          format: int64
        name:
          type: string
        description:
          type: string
        lastActivityTime:
          type: string
          format: date-time
        status:
          type: string
        filesCount:
          type: integer
        createdAt:
          type: string
          format: date-time
        subscribedCustomerIds:
          type: array
          items:
            type: integer
            format: int64
          uniqueItems: true
      required:
      - createdAt
      - filesCount
      - id
      - lastActivityTime
      - name
      - status
      - subscribedCustomerIds
    CreateProjectDto:
      allOf:
      - $ref: '#/components/schemas/CreateThreadDto'
      - type: object
        properties:
          name:
            type: string
          description:
            type: string
          status:
            type: string
          estimatedCost:
            type: number
          estimatedIterations:
            type: integer
            format: int64
          notificationsEnabled:
            type: boolean
          subscribedCustomerIds:
            type: array
            items:
              type: integer
              format: int64
      description: Project data to create
      required:
      - customerOrganisationId
      - notificationsEnabled
      - status
      - type
    CreateThreadDto:
      type: object
      discriminator:
        propertyName: type
      properties:
        type:
          type: string
        customerOrganisationId:
          type: integer
          format: int64
      required:
      - customerOrganisationId
      - type
  securitySchemes:
    Phasio API Bearer Token:
      type: http
      name: Authorization
      in: header
      scheme: bearer
      bearerFormat: JWT