Skip to content

High performance self-hosted photo and video management solution.

fix: clarify PUT to PATCH migration (#32010)

Daniel Dietzler989e7cf20360
diff --git a/open-api/immich-openapi-specs.json b/open-api/immich-openapi-specs.json
index a8578d8b71..3ed77af1d0 100644
--- a/open-api/immich-openapi-specs.json
+++ b/open-api/immich-openapi-specs.json
@@ -1635,7 +1635,6 @@
"x-immich-state": "Stable"
},
"put": {
- "deprecated": true,
"description": "Update an existing user.",
"operationId": "updateUserAdmin",
"parameters": [
@@ -1685,8 +1684,7 @@
],
"summary": "Update a user",
"tags": [
- "Users (admin)",
- "Deprecated"
+ "Users (admin)"
],
"x-immich-admin-only": true,
"x-immich-history": [
@@ -1703,13 +1701,13 @@
"state": "Stable"
},
{
- "version": "v3",
- "state": "Deprecated",
- "replacementId": "updateUserAdmin"
+ "version": "v3.0.0",
+ "state": "Updated",
+ "description": "This endpoint now also supports PATCH, in addition to PUT. PATCH will become the default in v4, and then PUT will be dropped in v5. Please migrate accordingly."
}
],
"x-immich-permission": "adminUser.update",
- "x-immich-state": "Deprecated"
+ "x-immich-state": "Stable"
}
},
"/admin/users/{id}/calendar-heatmap": {
@@ -1865,7 +1863,6 @@
"x-immich-state": "Stable"
},
"put": {
- "deprecated": true,
"description": "Update the preferences of a specific user.",
"operationId": "updateUserPreferencesAdmin",
"parameters": [
@@ -1915,8 +1912,7 @@
],
"summary": "Update user preferences",
"tags": [
- "Users (admin)",
- "Deprecated"
+ "Users (admin)"
],
"x-immich-admin-only": true,
"x-immich-history": [
@@ -1933,13 +1929,13 @@
"state": "Stable"
},
{
- "version": "v3",
- "state": "Deprecated",
- "replacementId": "updateUserPreferencesAdmin"
+ "version": "v3.0.0",
+ "state": "Updated",
+ "description": "This endpoint now also supports PATCH, in addition to PUT. PATCH will become the default in v4, and then PUT will be dropped in v5. Please migrate accordingly."
}
],
"x-immich-permission": "adminUser.update",
- "x-immich-state": "Deprecated"
+ "x-immich-state": "Stable"
}
},
"/admin/users/{id}/restore": {
@@ -3337,7 +3333,6 @@
"x-immich-state": "Stable"
},
"put": {
- "deprecated": true,
"description": "Updates the name and permissions of an API key by its ID. The current user must own this API key.",
"operationId": "updateApiKey",
"parameters": [
@@ -3387,8 +3382,7 @@
],
"summary": "Update an API key",
"tags": [
- "API keys",
- "Deprecated"
+ "API keys"
],
"x-immich-history": [
{
@@ -3404,13 +3398,13 @@
"state": "Stable"
},
{
- "version": "v3",
- "state": "Deprecated",
- "replacementId": "updateApiKey"
+ "version": "v3.0.0",
+ "state": "Updated",
+ "description": "This endpoint now also supports PATCH, in addition to PUT. PATCH will become the default in v4, and then PUT will be dropped in v5. Please migrate accordingly."
}
],
"x-immich-permission": "apiKey.update",
- "x-immich-state": "Deprecated"
+ "x-immich-state": "Stable"
}
},
"/api-keys/{id}/rotate": {
@@ -3873,7 +3867,6 @@
"x-immich-state": "Stable"
},
"put": {
- "deprecated": true,
"description": "Updates multiple assets at the same time.",
"operationId": "updateAssets",
"parameters": [],
@@ -3905,8 +3898,7 @@
],
"summary": "Update assets",
"tags": [
- "Assets",
- "Deprecated"
+ "Assets"
],
"x-immich-history": [
{
@@ -3922,13 +3914,13 @@
"state": "Stable"
},
{
- "version": "v3",
- "state": "Deprecated",
- "replacementId": "updateAssets"
+ "version": "v3.0.0",
+ "state": "Updated",
+ "description": "This endpoint now also supports PATCH, in addition to PUT. PATCH will become the default in v4, and then PUT will be dropped in v5. Please migrate accordingly."
}
],
"x-immich-permission": "asset.update",
- "x-immich-state": "Deprecated"
+ "x-immich-state": "Stable"
}
},
"/assets/bulk-upload-check": {
@@ -4357,7 +4349,6 @@
"x-immich-state": "Stable"
},
"put": {
- "deprecated": true,
"description": "Update information of a specific asset.",
"operationId": "updateAsset",
"parameters": [
@@ -4407,8 +4398,7 @@
],
"summary": "Update an asset",
"tags": [
- "Assets",
- "Deprecated"
+ "Assets"
],
"x-immich-history": [
{
@@ -4424,13 +4414,13 @@
"state": "Stable"
},
{
- "version": "v3",
- "state": "Deprecated",
- "replacementId": "updateAsset"
+ "version": "v3.0.0",
+ "state": "Updated",
+ "description": "This endpoint now also supports PATCH, in addition to PUT. PATCH will become the default in v4, and then PUT will be dropped in v5. Please migrate accordingly."
}
],
"x-immich-permission": "asset.update",
- "x-immich-state": "Deprecated"
+ "x-immich-state": "Stable"
}
},
"/assets/{id}/edits": {
@@ -7639,7 +7629,6 @@
"x-immich-state": "Stable"
},
"put": {
- "deprecated": true,
"description": "Update an existing external library.",
"operationId": "updateLibrary",
"parameters": [
@@ -7689,8 +7678,7 @@
],
"summary": "Update a library",
"tags": [
- "Libraries",
- "Deprecated"
+ "Libraries"
],
"x-immich-admin-only": true,
"x-immich-history": [
@@ -7707,13 +7695,13 @@
"state": "Stable"
},
{
- "version": "v3",
- "state": "Deprecated",
- "replacementId": "updateLibrary"
+ "version": "v3.0.0",
+ "state": "Updated",
+ "description": "This endpoint now also supports PATCH, in addition to PUT. PATCH will become the default in v4, and then PUT will be dropped in v5. Please migrate accordingly."
}
],
"x-immich-permission": "library.update",
- "x-immich-state": "Deprecated"
+ "x-immich-state": "Stable"
}
},
"/libraries/{id}/scan": {
@@ -8544,7 +8532,6 @@
"x-immich-state": "Stable"
},
"put": {
- "deprecated": true,
"description": "Update an existing memory by its ID.",
"operationId": "updateMemory",
"parameters": [
@@ -8594,8 +8581,7 @@
],
"summary": "Update a memory",
"tags": [
- "Memories",
- "Deprecated"
+ "Memories"
],
"x-immich-history": [
{
@@ -8611,13 +8597,13 @@
"state": "Stable"
},
{
- "version": "v3",
- "state": "Deprecated",
- "replacementId": "updateMemory"
+ "version": "v3.0.0",
+ "state": "Updated",
+ "description": "This endpoint now also supports PATCH, in addition to PUT. PATCH will become the default in v4, and then PUT will be dropped in v5. Please migrate accordingly."
}
],
"x-immich-permission": "memory.update",
- "x-immich-state": "Deprecated"
+ "x-immich-state": "Stable"
}
},
"/memories/{id}/assets": {
@@ -10397,7 +10383,6 @@
"x-immich-state": "Stable"
},
"put": {
- "deprecated": true,
"description": "Update an individual person.",
"operationId": "updatePerson",
"parameters": [
@@ -10447,8 +10432,7 @@
],
"summary": "Update person",
"tags": [
- "People",
- "Deprecated"
+ "People"
],
"x-immich-history": [
{
@@ -10464,13 +10448,13 @@
"state": "Stable"
},
{
- "version": "v3",
- "state": "Deprecated",
- "replacementId": "updatePerson"
+ "version": "v3.0.0",
+ "state": "Updated",
+ "description": "This endpoint now also supports PATCH, in addition to PUT. PATCH will become the default in v4, and then PUT will be dropped in v5. Please migrate accordingly."
}
],
"x-immich-permission": "person.update",
- "x-immich-state": "Deprecated"
+ "x-immich-state": "Stable"
}
},
"/people/{id}/merge": {
@@ -13773,7 +13757,6 @@
"x-immich-state": "Stable"
},
"put": {
- "deprecated": true,
"description": "Update a specific session identified by id.",
"operationId": "updateSession",
"parameters": [
@@ -13823,8 +13806,7 @@
],
"summary": "Update a session",
"tags": [
- "Sessions",
- "Deprecated"
+ "Sessions"
],
"x-immich-history": [
{
@@ -13840,13 +13822,13 @@
"state": "Stable"
},
{
- "version": "v3",
- "state": "Deprecated",
- "replacementId": "updateSession"
+ "version": "v3.0.0",
+ "state": "Updated",
+ "description": "This endpoint now also supports PATCH, in addition to PUT. PATCH will become the default in v4, and then PUT will be dropped in v5. Please migrate accordingly."
}
],
"x-immich-permission": "session.update",
- "x-immich-state": "Deprecated"
+ "x-immich-state": "Stable"
}
},
"/sessions/{id}/lock": {
@@ -14796,7 +14778,6 @@
"x-immich-state": "Stable"
},
"put": {
- "deprecated": true,
"description": "Update an existing stack by its ID.",
"operationId": "updateStack",
"parameters": [
@@ -14846,8 +14827,7 @@
],
"summary": "Update a stack",
"tags": [
- "Stacks",
- "Deprecated"
+ "Stacks"
],
"x-immich-history": [
{
@@ -14863,13 +14843,13 @@
"state": "Stable"
},
{
- "version": "v3",
- "state": "Deprecated",
- "replacementId": "updateStack"
+ "version": "v3.0.0",
+ "state": "Updated",
+ "description": "This endpoint now also supports PATCH, in addition to PUT. PATCH will become the default in v4, and then PUT will be dropped in v5. Please migrate accordingly."
}
],
"x-immich-permission": "stack.update",
- "x-immich-state": "Deprecated"
+ "x-immich-state": "Stable"
}
},
"/stacks/{id}/assets/{assetId}": {
@@ -15927,7 +15907,6 @@
"x-immich-state": "Stable"
},
"put": {
- "deprecated": true,
"description": "Update an existing tag identified by its ID.",
"operationId": "updateTag",
"parameters": [
@@ -15977,8 +15956,7 @@
],
"summary": "Update a tag",
"tags": [
- "Tags",
- "Deprecated"
+ "Tags"
],
"x-immich-history": [
{
@@ -15994,13 +15972,13 @@
"state": "Stable"
},
{
- "version": "v3",
- "state": "Deprecated",
- "replacementId": "updateTag"
+ "version": "v3.0.0",
+ "state": "Updated",
+ "description": "This endpoint now also supports PATCH, in addition to PUT. PATCH will become the default in v4, and then PUT will be dropped in v5. Please migrate accordingly."
}
],
"x-immich-permission": "tag.update",
- "x-immich-state": "Deprecated"
+ "x-immich-state": "Stable"
}
},
"/tags/{id}/assets": {
@@ -16803,7 +16781,6 @@
"x-immich-state": "Stable"
},
"put": {
- "deprecated": true,
"description": "Update the current user making the API request.",
"operationId": "updateMyUser",
"parameters": [],
@@ -16842,8 +16819,7 @@
],
"summary": "Update current user",
"tags": [
- "Users",
- "Deprecated"
+ "Users"
],
"x-immich-history": [
{
@@ -16859,13 +16835,13 @@
"state": "Stable"
},
{
- "version": "v3",
- "state": "Deprecated",
- "replacementId": "updateMyUser"
+ "version": "v3.0.0",
+ "state": "Updated",
+ "description": "This endpoint now also supports PATCH, in addition to PUT. PATCH will become the default in v4, and then PUT will be dropped in v5. Please migrate accordingly."
}
],
"x-immich-permission": "user.update",
- "x-immich-state": "Deprecated"
+ "x-immich-state": "Stable"
}
},
"/users/me/calendar-heatmap": {
@@ -17296,7 +17272,6 @@
"x-immich-state": "Stable"
},
"put": {
- "deprecated": true,
"description": "Update the preferences of the current user.",
"operationId": "updateMyPreferences",
"parameters": [],
@@ -17335,8 +17310,7 @@
],
"summary": "Update my preferences",
"tags": [
- "Users",
- "Deprecated"
+ "Users"
],
"x-immich-history": [
{
@@ -17352,13 +17326,13 @@
"state": "Stable"
},
{
- "version": "v3",
- "state": "Deprecated",
- "replacementId": "updateMyPreferences"
+ "version": "v3.0.0",
+ "state": "Updated",
+ "description": "This endpoint now also supports PATCH, in addition to PUT. PATCH will become the default in v4, and then PUT will be dropped in v5. Please migrate accordingly."
}
],
"x-immich-permission": "userPreference.update",
- "x-immich-state": "Deprecated"
+ "x-immich-state": "Stable"
}
},
"/users/profile-image": {
@@ -17989,7 +17963,6 @@
"x-immich-permission": "workflow.read"
},
"put": {
- "deprecated": true,
"description": "Update the information of a specific workflow by its ID. This endpoint can be used to update the workflow name, description, trigger type, filters and actions order, etc.",
"operationId": "updateWorkflow",
"parameters": [
@@ -18039,8 +18012,7 @@
],
"summary": "Update a workflow",
"tags": [
- "Workflows",
- "Deprecated"
+ "Workflows"
],
"x-immich-history": [
{
@@ -18048,13 +18020,12 @@
"state": "Added"
},
{
- "version": "v3",
- "state": "Deprecated",
- "replacementId": "updateWorkflow"
+ "version": "v3.0.0",
+ "state": "Updated",
+ "description": "This endpoint now also supports PATCH, in addition to PUT. PATCH will become the default in v4, and then PUT will be dropped in v5. Please migrate accordingly."
}
],
- "x-immich-permission": "workflow.update",
- "x-immich-state": "Deprecated"
+ "x-immich-permission": "workflow.update"
}
},
"/workflows/{id}/logs": {
diff --git a/server/src/controllers/api-key.controller.ts b/server/src/controllers/api-key.controller.ts
index 7c81104ac9..ef1e241846 100644
--- a/server/src/controllers/api-key.controller.ts
+++ b/server/src/controllers/api-key.controller.ts
@@ -62,11 +62,7 @@ export class ApiKeyController {
@Endpoint({
summary: 'Update an API key',
description: 'Updates the name and permissions of an API key by its ID. The current user must own this API key.',
- history: new HistoryBuilder()
- .added('v1')
- .beta('v1')
- .stable('v2')
- .deprecated('v3', { replacementId: 'updateApiKey' }),
+ history: new HistoryBuilder().added('v1').beta('v1').stable('v2').v3PatchMigration(),
})
updateApiKey(
@Auth() auth: AuthDto,
diff --git a/server/src/controllers/asset.controller.ts b/server/src/controllers/asset.controller.ts
index 5816de020c..e94214a11f 100644
--- a/server/src/controllers/asset.controller.ts
+++ b/server/src/controllers/asset.controller.ts
@@ -59,11 +59,7 @@ export class AssetController {
@Endpoint({
summary: 'Update assets',
description: 'Updates multiple assets at the same time.',
- history: new HistoryBuilder()
- .added('v1')
- .beta('v1')
- .stable('v2')
- .deprecated('v3', { replacementId: 'updateAssets' }),
+ history: new HistoryBuilder().added('v1').beta('v1').stable('v2').v3PatchMigration(),
})
updateAssets(@Auth() auth: AuthDto, @Body() dto: AssetBulkUpdateDto): Promise<void> {
return this.service.updateAll(auth, dto);
@@ -143,11 +139,7 @@ export class AssetController {
@Endpoint({
summary: 'Update an asset',
description: 'Update information of a specific asset.',
- history: new HistoryBuilder()
- .added('v1')
- .beta('v1')
- .stable('v2')
- .deprecated('v3', { replacementId: 'updateAsset' }),
+ history: new HistoryBuilder().added('v1').beta('v1').stable('v2').v3PatchMigration(),
})
updateAsset(
@Auth() auth: AuthDto,
diff --git a/server/src/controllers/library.controller.ts b/server/src/controllers/library.controller.ts
index f0a9fb696c..7a4992e6de 100644
--- a/server/src/controllers/library.controller.ts
+++ b/server/src/controllers/library.controller.ts
@@ -57,11 +57,7 @@ export class LibraryController {
@Endpoint({
summary: 'Update a library',
description: 'Update an existing external library.',
- history: new HistoryBuilder()
- .added('v1')
- .beta('v1')
- .stable('v2')
- .deprecated('v3', { replacementId: 'updateLibrary' }),
+ history: new HistoryBuilder().added('v1').beta('v1').stable('v2').v3PatchMigration(),
})
updateLibrary(@Param() { id }: UUIDParamDto, @Body() dto: UpdateLibraryDto): Promise<LibraryResponseDto> {
return this.service.update(id, dto);
diff --git a/server/src/controllers/memory.controller.ts b/server/src/controllers/memory.controller.ts
index e19a30461d..ce3841295b 100644
--- a/server/src/controllers/memory.controller.ts
+++ b/server/src/controllers/memory.controller.ts
@@ -71,11 +71,7 @@ export class MemoryController {
@Endpoint({
summary: 'Update a memory',
description: 'Update an existing memory by its ID.',
- history: new HistoryBuilder()
- .added('v1')
- .beta('v1')
- .stable('v2')
- .deprecated('v3', { replacementId: 'updateMemory' }),
+ history: new HistoryBuilder().added('v1').beta('v1').stable('v2').v3PatchMigration(),
})
updateMemory(
@Auth() auth: AuthDto,
diff --git a/server/src/controllers/person.controller.ts b/server/src/controllers/person.controller.ts
index a1ba336a1a..e0fcab739f 100644
--- a/server/src/controllers/person.controller.ts
+++ b/server/src/controllers/person.controller.ts
@@ -113,11 +113,7 @@ export class PersonController {
@Endpoint({
summary: 'Update person',
description: 'Update an individual person.',
- history: new HistoryBuilder()
- .added('v1')
- .beta('v1')
- .stable('v2')
- .deprecated('v3', { replacementId: 'updatePerson' }),
+ history: new HistoryBuilder().added('v1').beta('v1').stable('v2').v3PatchMigration(),
})
updatePerson(
@Auth() auth: AuthDto,
diff --git a/server/src/controllers/session.controller.ts b/server/src/controllers/session.controller.ts
index ae3e24a114..12e142fa1a 100644
--- a/server/src/controllers/session.controller.ts
+++ b/server/src/controllers/session.controller.ts
@@ -57,11 +57,7 @@ export class SessionController {
@Endpoint({
summary: 'Update a session',
description: 'Update a specific session identified by id.',
- history: new HistoryBuilder()
- .added('v1')
- .beta('v1')
- .stable('v2')
- .deprecated('v3', { replacementId: 'updateSession' }),
+ history: new HistoryBuilder().added('v1').beta('v1').stable('v2').v3PatchMigration(),
})
updateSession(
@Auth() auth: AuthDto,
diff --git a/server/src/controllers/stack.controller.ts b/server/src/controllers/stack.controller.ts
index 334934e0c2..5c52763d56 100644
--- a/server/src/controllers/stack.controller.ts
+++ b/server/src/controllers/stack.controller.ts
@@ -65,11 +65,7 @@ export class StackController {
@Endpoint({
summary: 'Update a stack',
description: 'Update an existing stack by its ID.',
- history: new HistoryBuilder()
- .added('v1')
- .beta('v1')
- .stable('v2')
- .deprecated('v3', { replacementId: 'updateStack' }),
+ history: new HistoryBuilder().added('v1').beta('v1').stable('v2').v3PatchMigration(),
})
updateStack(
@Auth() auth: AuthDto,
diff --git a/server/src/controllers/tag.controller.ts b/server/src/controllers/tag.controller.ts
index 7fd8069f24..66fac7dfbc 100644
--- a/server/src/controllers/tag.controller.ts
+++ b/server/src/controllers/tag.controller.ts
@@ -81,7 +81,7 @@ export class TagController {
@Endpoint({
summary: 'Update a tag',
description: 'Update an existing tag identified by its ID.',
- history: new HistoryBuilder().added('v1').beta('v1').stable('v2').deprecated('v3', { replacementId: 'updateTag' }),
+ history: new HistoryBuilder().added('v1').beta('v1').stable('v2').v3PatchMigration(),
})
updateTag(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @Body() dto: TagUpdateDto): Promise<TagResponseDto> {
return this.service.update(auth, id, dto);
diff --git a/server/src/controllers/user-admin.controller.ts b/server/src/controllers/user-admin.controller.ts
index 8011f31c5c..5b47d0de92 100644
--- a/server/src/controllers/user-admin.controller.ts
+++ b/server/src/controllers/user-admin.controller.ts
@@ -61,11 +61,7 @@ export class UserAdminController {
@Endpoint({
summary: 'Update a user',
description: 'Update an existing user.',
- history: new HistoryBuilder()
- .added('v1')
- .beta('v1')
- .stable('v2')
- .deprecated('v3', { replacementId: 'updateUserAdmin' }),
+ history: new HistoryBuilder().added('v1').beta('v1').stable('v2').v3PatchMigration(),
})
updateUserAdmin(
@Auth() auth: AuthDto,
@@ -158,11 +154,7 @@ export class UserAdminController {
@Endpoint({
summary: 'Update user preferences',
description: 'Update the preferences of a specific user.',
- history: new HistoryBuilder()
- .added('v1')
- .beta('v1')
- .stable('v2')
- .deprecated('v3', { replacementId: 'updateUserPreferencesAdmin' }),
+ history: new HistoryBuilder().added('v1').beta('v1').stable('v2').v3PatchMigration(),
})
updateUserPreferencesAdmin(
@Auth() auth: AuthDto,
diff --git a/server/src/controllers/user.controller.ts b/server/src/controllers/user.controller.ts
index 61e07fb279..037ea060d3 100644
--- a/server/src/controllers/user.controller.ts
+++ b/server/src/controllers/user.controller.ts
@@ -79,11 +79,7 @@ export class UserController {
@Endpoint({
summary: 'Update current user',
description: 'Update the current user making the API request.',
- history: new HistoryBuilder()
- .added('v1')
- .beta('v1')
- .stable('v2')
- .deprecated('v3', { replacementId: 'updateMyUser' }),
+ history: new HistoryBuilder().added('v1').beta('v1').stable('v2').v3PatchMigration(),
})
updateMyUser(@Auth() auth: AuthDto, @Body() dto: UserUpdateMeDto): Promise<UserAdminResponseDto> {
return this.service.updateMe(auth, dto);
@@ -112,11 +108,7 @@ export class UserController {
@Endpoint({
summary: 'Update my preferences',
description: 'Update the preferences of the current user.',
- history: new HistoryBuilder()
- .added('v1')
- .beta('v1')
- .stable('v2')
- .deprecated('v3', { replacementId: 'updateMyPreferences' }),
+ history: new HistoryBuilder().added('v1').beta('v1').stable('v2').v3PatchMigration(),
})
updateMyPreferences(
@Auth() auth: AuthDto,
diff --git a/server/src/controllers/workflow.controller.ts b/server/src/controllers/workflow.controller.ts
index 5bf21912fe..ed46178683 100644
--- a/server/src/controllers/workflow.controller.ts
+++ b/server/src/controllers/workflow.controller.ts
@@ -83,7 +83,7 @@ export class WorkflowController {
summary: 'Update a workflow',
description:
'Update the information of a specific workflow by its ID. This endpoint can be used to update the workflow name, description, trigger type, filters and actions order, etc.',
- history: new HistoryBuilder().added('v3.0.0').deprecated('v3', { replacementId: 'updateWorkflow' }),
+ history: new HistoryBuilder().added('v3.0.0').v3PatchMigration(),
})
updateWorkflow(
@Auth() auth: AuthDto,
diff --git a/server/src/decorators.ts b/server/src/decorators.ts
index fc08cb40c1..6d277bcc0c 100644
--- a/server/src/decorators.ts
+++ b/server/src/decorators.ts
@@ -238,6 +238,15 @@ export class HistoryBuilder {
return this.push({ version, state: ApiState.Deprecated, replacementId });
}
+ v3PatchMigration() {
+ return this.push({
+ version: 'v3.0.0',
+ state: 'Updated',
+ description:
+ 'This endpoint now also supports PATCH, in addition to PUT. PATCH will become the default in v4, and then PUT will be dropped in v5. Please migrate accordingly.',
+ });
+ }
+
isDeprecated(): boolean {
return this.hasDeprecated;
}