> ## Documentation Index
> Fetch the complete documentation index at: https://developers.projectcor.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Allocations By Project

> Gets information about user allocations for a given project. Returns all users allocated to the project along with their allocation details and allocations in other projects.



## OpenAPI

````yaml /api-reference/resource-allocation-openapi.json get /allocation/getAllocations/{projectId}
openapi: 3.1.0
info:
  title: COR Resource Allocation API
  description: >-
    The Resource Allocation API is a dedicated service for managing the capacity
    of users on the COR platform. This API uses the same authentication as the
    main COR API.
  version: 1.0.0
servers:
  - url: https://planner.svc.v2.projectcor.com
    description: Resource Allocation Service
security:
  - bearerAuth: []
paths:
  /allocation/getAllocations/{projectId}:
    get:
      tags:
        - Resource Allocation
      summary: Get Allocations By Project
      description: >-
        Gets information about user allocations for a given project. Returns all
        users allocated to the project along with their allocation details and
        allocations in other projects.
      parameters:
        - name: projectId
          in: path
          required: true
          schema:
            type: integer
          description: Project ID to get allocations for
          example: 12345
      responses:
        '200':
          description: List of user allocations for the project
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectAllocationsResponse'
              example:
                users:
                  - userId: 1234
                    firstName: John
                    lastName: Doe
                    positionName: Developer
                    categoryName: Engineering
                    categoryId: '10'
                    picture: ''
                    userPositionId: '5'
                    companyId: 41195
                    hidden: false
                    isDeleted: false
                    labelsByCategory: []
                    createdAt: '2024-01-15T10:00:00'
                    allocations:
                      - primaryKey: '00000001'
                        from: '2024-06-01T00:00:00'
                        to: '2024-08-31T00:00:00'
                        allocatedHours: 20
                        capacity: 160
                        availabilityLeft: 140
                        createdAt: '2024-05-20T14:30:00'
                        allocationUserAnotherProjects:
                          - projectId: 5678
                            projectName: Project Alpha
                            clientName: Client ABC
                            allocatedHours: 15
                          - projectId: 5679
                            projectName: Project Beta
                            clientName: Client XYZ
                            allocatedHours: 5
                    totalAllocatedHours: 20
components:
  schemas:
    ProjectAllocationsResponse:
      type: object
      properties:
        users:
          type: array
          description: List of users allocated to the project
          items:
            $ref: '#/components/schemas/AllocatedUser'
    AllocatedUser:
      type: object
      properties:
        userId:
          type: integer
          description: User ID
        firstName:
          type: string
          description: User's first name
        lastName:
          type: string
          description: User's last name
        positionName:
          type: string
          description: User's position name
        categoryName:
          type: string
          description: User's category name
        categoryId:
          type: string
          description: User's category ID
        picture:
          type: string
          description: URL to user's profile picture
        userPositionId:
          type: string
          description: User's position ID
        companyId:
          type: integer
          description: Company ID
        hidden:
          type: boolean
          description: Whether the user is hidden
        isDeleted:
          type: boolean
          description: Whether the user is deleted
        labelsByCategory:
          type: array
          description: Labels assigned to the user grouped by category
          items:
            type: object
        createdAt:
          type: string
          format: date-time
          description: When the user was created
        allocations:
          type: array
          description: User's allocations for this project
          items:
            $ref: '#/components/schemas/UserAllocation'
        totalAllocatedHours:
          type: number
          description: Total hours allocated to this user for the project
    UserAllocation:
      type: object
      properties:
        primaryKey:
          type: string
          description: Unique identifier for the allocation
        from:
          type: string
          format: date-time
          description: Start date of the allocation
        to:
          type: string
          format: date-time
          description: End date of the allocation
        allocatedHours:
          type: number
          description: Number of hours allocated
        capacity:
          type: number
          description: Total capacity in hours
        availabilityLeft:
          type: number
          description: Remaining availability (can be negative if overallocated)
        createdAt:
          type: string
          format: date-time
          description: When the allocation was created
        allocationUserAnotherProjects:
          type: array
          description: Other project allocations for this user in the same period
          items:
            type: object
            properties:
              projectId:
                type: integer
                description: Project ID
              projectName:
                type: string
                description: Name of the project
              clientName:
                type: string
                description: Name of the client
              allocatedHours:
                type: number
                description: Hours allocated to this project
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Uses the same authentication as the main COR API. Obtain a token from
        https://api.projectcor.com/v1/oauth/token

````