From 1e70bed0a6a2d044bb93009994da1b6065a3a3aa Mon Sep 17 00:00:00 2001 From: Matus Backor Date: Thu, 1 Aug 2024 17:17:43 +0200 Subject: [PATCH] EN-207 Add codenames to asset folders --- js/management-api-v2/cm_api_v2_patch_asset_folders.js | 3 ++- js/management-api-v2/cm_api_v2_post_asset_folders.js | 2 ++ net/management-api-v2/cm_api_v2_patch_asset_folders.cs | 3 ++- net/management-api-v2/cm_api_v2_post_asset_folders.cs | 1 + rest/management-api-v2/cm_api_v2_patch_asset_folders.curl | 3 ++- rest/management-api-v2/cm_api_v2_post_asset_folders.curl | 1 + 6 files changed, 10 insertions(+), 3 deletions(-) diff --git a/js/management-api-v2/cm_api_v2_patch_asset_folders.js b/js/management-api-v2/cm_api_v2_patch_asset_folders.js index 126b2858..38cc54d3 100644 --- a/js/management-api-v2/cm_api_v2_patch_asset_folders.js +++ b/js/management-api-v2/cm_api_v2_patch_asset_folders.js @@ -14,6 +14,7 @@ const response = await client.modifyAssetFolders() op: "addinto", value: { external_id: "folder-with-shared-assets", + codename: "shared_assets", name: "Shared assets", folders: [] }, @@ -31,7 +32,7 @@ const response = await client.modifyAssetFolders() op: "rename", value: "Legal documents", reference: { - external_id: "folder-documents" + codename: "folder_documents" } } ] diff --git a/js/management-api-v2/cm_api_v2_post_asset_folders.js b/js/management-api-v2/cm_api_v2_post_asset_folders.js index dba9b104..5e57c027 100644 --- a/js/management-api-v2/cm_api_v2_post_asset_folders.js +++ b/js/management-api-v2/cm_api_v2_post_asset_folders.js @@ -14,11 +14,13 @@ const response = await client.addAssetFolders() { id: "958001d8-2228-4373-b966-5262b5b96f71", name: "Downloads", + codename: "downloads", external_id: "folder-with-downloadable-assets", folders: [ { id: "9ca927b6-6e4d-4d6b-81e3-ec5e8f7772a0", name: "Archives", + codename: "archives", external_id: "folder-with-downloadable-archives", folders: [] } diff --git a/net/management-api-v2/cm_api_v2_patch_asset_folders.cs b/net/management-api-v2/cm_api_v2_patch_asset_folders.cs index c415a1d7..00552604 100644 --- a/net/management-api-v2/cm_api_v2_patch_asset_folders.cs +++ b/net/management-api-v2/cm_api_v2_patch_asset_folders.cs @@ -16,6 +16,7 @@ { ExternalId = "folder-with-shared-assets", Name = "Shared assets", + Codename = "shared_assets", Folders = Enumerable.Empty(), }, Before = Reference.ByExternalId("folder-with-downloadable-assets") @@ -26,7 +27,7 @@ }, new AssetFolderRenameModel { - Reference = Reference.ByExternalId("folder-documents"), + Reference = Reference.ByCodename("folder_documents"), Value = "Legal documents" } }); diff --git a/net/management-api-v2/cm_api_v2_post_asset_folders.cs b/net/management-api-v2/cm_api_v2_post_asset_folders.cs index 78a0b591..a1dcd560 100644 --- a/net/management-api-v2/cm_api_v2_post_asset_folders.cs +++ b/net/management-api-v2/cm_api_v2_post_asset_folders.cs @@ -15,6 +15,7 @@ { Name = "Top level folder", ExternalId = "top-folder", + Codename = "top_folder", Folders = new [] { new AssetFolderHierarchy diff --git a/rest/management-api-v2/cm_api_v2_patch_asset_folders.curl b/rest/management-api-v2/cm_api_v2_patch_asset_folders.curl index 802f8630..92dad77f 100644 --- a/rest/management-api-v2/cm_api_v2_patch_asset_folders.curl +++ b/rest/management-api-v2/cm_api_v2_patch_asset_folders.curl @@ -9,6 +9,7 @@ curl --request PATCH \ "value": { "external_id": "another-folder", "name": "Another second level folder", + "codename": "another_second_level_folder", "folders": [] }, "reference" : { @@ -28,7 +29,7 @@ curl --request PATCH \ "op": "rename", "value":"A new name", "reference" : { - "external_id": "second-folder" + "codename": "second_folder" } } ]' diff --git a/rest/management-api-v2/cm_api_v2_post_asset_folders.curl b/rest/management-api-v2/cm_api_v2_post_asset_folders.curl index a1709cbd..bc0fee5c 100644 --- a/rest/management-api-v2/cm_api_v2_post_asset_folders.curl +++ b/rest/management-api-v2/cm_api_v2_post_asset_folders.curl @@ -11,6 +11,7 @@ curl --request POST \ "folders": [ { "name": "Second level folder", + "codename": "second_level_folder", "external_id": "second-folder", "folders": [] }