> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automaticrostering.visma.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Get the latest result



## OpenAPI

````yaml /openapi.yaml get /roster/result/{jobId}
openapi: 3.1.0
info:
  title: Automatic Rostering API
  version: 2.0.0
  description: >-
    Automatic Rostering acts as the modern intelligence layer for your workforce
    management product.
  license:
    name: Proprietary
servers:
  - url: https://api-stage.automaticrostering.visma.net
    description: Stage environment
  - url: https://api.automaticrostering.visma.net
    description: Production environment
security:
  - vismaConnectBearer: []
tags:
  - name: Roster
    description: Submit, monitor, stop, and fetch roster jobs.
  - name: Reason
    description: Configure integrator context used by Reasoning Engine capabilities.
paths:
  /roster/result/{jobId}:
    get:
      tags:
        - Roster
      summary: Get the latest result
      operationId: getRosterResult
      parameters:
        - $ref: '#/components/parameters/jobId'
      responses:
        '200':
          $ref: '#/components/responses/RosterResult'
        '202':
          $ref: '#/components/responses/RosterResultPending'
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  parameters:
    jobId:
      name: jobId
      in: path
      required: true
      description: Unique identifier for the roster job.
      schema:
        type: string
        format: uuid
  responses:
    RosterResult:
      description: Response containing the latest roster result.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RosterResultResponse'
    RosterResultPending:
      description: >-
        Response indicating that the roster job is still processing and the
        result is not yet available.
      content:
        application/json:
          schema:
            type: object
            additionalProperties: false
            required:
              - message
              - jobId
            properties:
              message:
                type: string
              jobId:
                type: string
                format: uuid
    BadRequest:
      description: Request was invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: Authenticated user is not allowed to access the resource.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalServerError:
      description: Server failed to process the request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    RosterResultResponse:
      type: object
      required:
        - roster
      additionalProperties: false
      description: Schedule response body containing all information about the result
      properties:
        roster:
          $ref: '#/components/schemas/Roster'
    Error:
      type: object
      additionalProperties: false
      required:
        - code
        - message
      properties:
        code:
          type: string
        message:
          type: string
    Roster:
      type: object
      required:
        - demandFulfillment
        - employeeRosters
      additionalProperties: false
      description: >-
        The created roster, including relevant information on the demand
        fulfillment and employee assignments.
      properties:
        demandFulfillment:
          $ref: '#/components/schemas/DemandFulfillment'
        employeeRosters:
          type: array
          description: List of rosters for each employee in the created roster.
          items:
            $ref: '#/components/schemas/EmployeeRoster'
    DemandFulfillment:
      type: object
      additionalProperties: false
      description: Information on the demand fulfillment in the created roster.
      properties:
        shiftDemand:
          $ref: '#/components/schemas/ShiftDemandFulfillment'
        timeDemand:
          $ref: '#/components/schemas/TimeDemandFulfillment'
    EmployeeRoster:
      type: object
      required:
        - employeeId
        - summary
        - assignments
      additionalProperties: false
      properties:
        employeeId:
          description: Identifier of the employee.
          type: string
        summary:
          $ref: '#/components/schemas/EmployeeSummary'
          description: Aggregated information on the assigned shifts for this employee.
        assignments:
          type: array
          description: List of assignments for the employee in the created roster.
          items:
            $ref: '#/components/schemas/Assignment'
    ShiftDemandFulfillment:
      type: object
      additionalProperties: false
      description: Information on the demand fulfillment for shift-based demand.
      properties:
        min:
          $ref: '#/components/schemas/ShiftDemandLevelFulfillment'
          description: The demand and assigned shifts for the minimum demand level.
        ideal:
          $ref: '#/components/schemas/ShiftDemandLevelFulfillment'
          description: The demand and assigned shifts for the ideal demand level.
        max:
          $ref: '#/components/schemas/ShiftDemandLevelFulfillment'
          description: The demand and assigned shifts for the maximum demand level.
    TimeDemandFulfillment:
      type: object
      additionalProperties: false
      description: Information on the demand fulfillment for time-based demand.
      properties:
        min:
          $ref: '#/components/schemas/TimeDemandLevelFulfillment'
          description: The demand and assigned hours for the minimum demand level.
        ideal:
          $ref: '#/components/schemas/TimeDemandLevelFulfillment'
          description: The demand and assigned hours for the ideal demand level.
        max:
          $ref: '#/components/schemas/TimeDemandLevelFulfillment'
          description: The demand and assigned hours for the maximum demand level.
    EmployeeSummary:
      type: object
      additionalProperties: false
      properties:
        hoursAssigned:
          type: number
          description: Number of hours assigned to this employee.
        hoursEffective:
          type: number
          description: >-
            Effective number of hours assigned to this employee (adjusted for
            workload factors, breaks, etc.).
    Assignment:
      type: object
      required:
        - day
        - shiftId
      additionalProperties: false
      properties:
        day:
          $ref: '#/components/schemas/Day'
          description: Day on which the assignment takes place.
        shiftId:
          description: Identifier of the shift the employee is assigned to.
          type: string
        roleId:
          description: Identifier of the role used by the employee to work the shift.
          type: string
        assignmentType:
          description: >-
            Describes how the assignment was created. Only present if the
            assignment was not assigned by us.
          type: string
          enum:
            - LOCKED
            - PREASSIGNED
    ShiftDemandLevelFulfillment:
      type: object
      additionalProperties: false
      properties:
        demand:
          type: integer
          description: Total demand in number of shifts for the planning period.
        assigned:
          type: integer
          description: >-
            Total assigned shifts for the planning period. Counts all
            assignments up to the demand level.
    TimeDemandLevelFulfillment:
      type: object
      additionalProperties: false
      properties:
        demand:
          type: number
          description: Total demand in hours for the planning period.
        assigned:
          type: number
          description: >-
            Total assigned hours for the planning period. Counts all hours up to
            the demand level.
    Day:
      description: Describes one day in the schedule.
      type: object
      additionalProperties: false
      minProperties: 1
      maxProperties: 1
      properties:
        date:
          $ref: '#/components/schemas/Date'
        dayIndex:
          $ref: '#/components/schemas/DayIndex'
    Date:
      type: string
      format: date
      description: >-
        Date specified in ISO8601 format (YYYY-MM-DD). Only available in
        CALENDAR schedules.
    DayIndex:
      type: integer
      description: >-
        Day index relative to the horizon start day (starts at 0). Only
        available in RECURRING schedules.
      minimum: 0
  securitySchemes:
    vismaConnectBearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Include the access token in the Authorization header using the Bearer
        scheme.

````