---
updatedAt: 2026-04-27T16:09:54.000Z
agentTools:
  projectIndex: https://developer.deputy.com/llms.txt
---

# Get shift history

Get shift history.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Deputy V2 API",
    "version": "1.0",
    "description": "\n\nFiltered to publicly-authenticated routes only (APIAuthenticator). Scoped-OAuth routes and internal JWT routes are excluded — see the separate \"Deputy V2 Scoped API\" spec for scoped endpoints."
  },
  "servers": [
    {
      "url": "https://{subdomain}.{region}.deputy.com/api",
      "description": "Deputy tenant",
      "variables": {
        "subdomain": {
          "default": "your-subdomain",
          "description": "Your Deputy tenant subdomain"
        },
        "region": {
          "default": "deputy",
          "enum": [
            "au",
            "eu",
            "na",
            "deputy"
          ],
          "description": "Deputy region: au, eu, na, or deputy (AU default)"
        }
      }
    }
  ],
  "components": {
    "schemas": {
      "HistoryDataHistory": {
        "type": "object",
        "properties": {
          "creatorName": {
            "type": "string",
            "title": "who made the change"
          },
          "dtChanged": {
            "type": "string",
            "title": "human readable change date time"
          },
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HistoryEntry"
            },
            "title": "list of change history entries"
          },
          "updatedDateTime": {
            "type": "string",
            "title": "ISO date format of dtChanged"
          },
          "creatorPhoto": {
            "type": "string",
            "title": "the photo of made the change"
          }
        }
      },
      "HistoryEntry": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "title": "description"
          },
          "field": {
            "type": "string",
            "title": "changed filed"
          },
          "oldValue": {
            "type": "string",
            "title": "old value"
          },
          "newValue": {
            "type": "string",
            "title": "new value"
          }
        }
      },
      "ScheduleShiftHistoryResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "data": {
            "$ref": "#/components/schemas/modelHistoryData"
          }
        }
      },
      "modelHistoryData": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32",
            "title": "shift id"
          },
          "creatorName": {
            "type": "string",
            "title": "shift creator name"
          },
          "created": {
            "type": "string",
            "title": "human readable shift created date time string\nTODO: change to Datetime format when refactor getRosterHistory"
          },
          "history": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HistoryDataHistory"
            }
          },
          "createdDateTime": {
            "type": "string",
            "title": "ISO date format of created"
          },
          "creatorPhoto": {
            "type": "string",
            "title": "the creator's photo"
          }
        }
      }
    },
    "securitySchemes": {
      "ApiToken": {
        "type": "apiKey",
        "in": "header",
        "name": "OAuth"
      }
    }
  },
  "paths": {
    "/management/v2/shifts/{id}/history": {
      "get": {
        "summary": "Get shift history",
        "operationId": "ScheduleShiftV2Controller_history",
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleShiftHistoryResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "description": "The ID of the shift to retrieve.",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "expandMetadata",
            "description": "If true, includes additional metadata such as locations, areas, and employee profiles.",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "viewContext",
            "description": "Determines the context of the viewer, affecting what data is returned and permissions checked.\n\n - EMPLOYEE: Employee context - returns data visible as an employee.\n - MANAGER: Manager context - returns full manager-level data and permissions.",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "EMPLOYEE",
                "MANAGER"
              ],
              "default": "EMPLOYEE"
            }
          }
        ],
        "tags": [
          "Shifts"
        ],
        "description": "Get shift history."
      }
    }
  },
  "security": [
    {
      "ApiToken": []
    }
  ]
}
```