# /api/v3/projects/{id}/versions
---
get:
  parameters:
  - description: ID of the project whose versions will be listed
    example: '1'
    in: path
    name: id
    required: true
    schema:
      type: integer
  responses:
    '200':
      content:
        application/hal+json:
          examples:
            response:
              value:
                _embedded:
                  elements:
                  - _links:
                      availableInProjects:
                        href: "/api/v3/versions/11/projects"
                      definingProject:
                        href: "/api/v3/projects/11"
                      self:
                        href: "/api/v3/versions/11"
                    _type: Version
                    description:
                      format: plain
                      html: This version has a description
                      raw: This version has a description
                    endDate: 
                    id: 11
                    name: v3.0 Alpha
                    startDate: '2014-11-20'
                    status: Open
                  - _links:
                      availableInProjects:
                        href: "/api/v3/versions/12/projects"
                      definingProject:
                        href: "/api/v3/projects/11"
                      self:
                        href: "/api/v3/versions/12"
                    _type: Version
                    description:
                      format: plain
                      html: ''
                      raw: ''
                    endDate: 
                    id: 12
                    name: v2.0
                    startDate: 
                    status: Closed
                  - _links:
                      availableInProjects:
                        href: "/api/v3/versions/10/projects"
                      definingProject:
                        href: "/api/v3/projects/11"
                      self:
                        href: "/api/v3/versions/10"
                    _type: Version
                    description:
                      format: plain
                      html: ''
                      raw: ''
                    endDate: 
                    id: 10
                    name: v1.0
                    startDate: 
                    status: Open
                _links:
                  self:
                    href: "/api/v3/projects/11/versions"
                _type: Collection
                count: 3
                total: 3
          schema:
            "$ref": "../components/schemas/versions_by_project_model.yml"
      description: OK
      headers: {}
    '404':
      content:
        application/hal+json:
          schema:
            $ref: "../components/schemas/error_response.yml"
          examples:
            response:
              value:
                _type: Error
                errorIdentifier: urn:openproject-org:api:v3:errors:NotFound
                message: The specified project does not exist.
      description: |-
        Returned if the project does not exist or the client does not have sufficient permissions
        to see it.

        **Required permission:** view work packages **or** manage versions (on given project)

        *Note: A client without sufficient permissions shall not be able to test for the existence of a project.
        That's why a 404 is returned here, even if a 403 might be more appropriate.*
      headers: {}
  tags:
  - Versions
  description: |-
    This endpoint lists the versions that are *available* in a given project.
    Note that due to sharing this might be more than the versions *defined* by that project.
  operationId: List_versions_available_in_a_project
  summary: List versions available in a project
