# AssetFolders

Assets are files that can be stored in the system and referenced on products, variants, categories and global list values. Assets uploaded to the system are assigned a URL based on the assets file name. Each image asset can be auto-scaled, cropped and formatted by adding parameters to the URL of the asset. Thus, you should only upload an image once in the highest quality you will need it and the system will take care of any scaling automatically. Assets are organized in folders, which can be nested within each other.

## GET /v1/assetfolders/{folderUid}

> Get an asset folder by its uid

```json
{"openapi":"3.0.1","info":{"title":"Struct PIM Public API","version":"1.0"},"tags":[{"name":"AssetFolders","description":"Assets are files that can be stored in the system and referenced on products, variants, categories and global list values. Assets uploaded to the system are assigned a URL based on the assets file name.\r\nEach image asset can be auto-scaled, cropped and formatted by adding parameters to the URL of the asset. Thus, you should only upload an image once in the highest quality you will need it and the system will take care of any scaling automatically.\r\nAssets are organized in folders, which can be nested within each other."}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"","name":"Authorization","in":"header"}},"schemas":{"Struct.App.Api.Models.Asset.AssetFolderModel":{"type":"object","properties":{"Uid":{"type":"string","description":"Unique identifier of the folder","format":"uuid"},"Name":{"type":"string","description":"Name of the folder","nullable":true},"ParentUid":{"type":"string","description":"Unique identifier of the parent folder","format":"uuid","nullable":true},"IsPrivate":{"type":"boolean","description":"Indicates whether files in this folder can only be accessed by authenticated users and not via public urls"},"ViewPermission":{"type":"string","description":"Unique identifier of permission required to view files in this folder","format":"uuid","nullable":true},"CreatePermission":{"type":"string","description":"Unique identifier of permission required to create files in this folder","format":"uuid","nullable":true},"DeletePermission":{"type":"string","description":"Unique identifier of permission required to Delete files in this folder","format":"uuid","nullable":true},"Path":{"type":"array","items":{"$ref":"#/components/schemas/Struct.App.Api.Models.Asset.AssetFolderPath"},"description":"The path to the folder","nullable":true},"CreateBy":{"type":"string","description":"The user who created the folder","nullable":true},"LastModifiedBy":{"type":"string","description":"The user who last modified the folder","nullable":true},"Created":{"type":"string","description":"The timestamp when the folder was created","format":"date-time"},"LastModified":{"type":"string","description":"The timestamp when the folder was last modified","format":"date-time"}},"additionalProperties":false,"description":"Represents a folder in the mediabank"},"Struct.App.Api.Models.Asset.AssetFolderPath":{"type":"object","properties":{"Uid":{"type":"string","description":"Unique id of folder","format":"uuid"},"ParentUid":{"type":"string","description":"Unique id of parent folder","format":"uuid","nullable":true},"Name":{"type":"string","description":"Presented name of folder","nullable":true}},"additionalProperties":false,"description":"Represents a folder path in the asset system"},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"Type":{"type":"string","nullable":true},"Title":{"type":"string","nullable":true},"Status":{"type":"integer","format":"int32","nullable":true},"Detail":{"type":"string","nullable":true},"Instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/v1/assetfolders/{folderUid}":{"get":{"tags":["AssetFolders"],"summary":"Get an asset folder by its uid","parameters":[{"name":"folderUid","in":"path","description":"Uid of folder","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Struct.App.Api.Models.Asset.AssetFolderModel"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## DELETE /v1/assetfolders/{folderUid}

> Delete an asset folder by its uid

```json
{"openapi":"3.0.1","info":{"title":"Struct PIM Public API","version":"1.0"},"tags":[{"name":"AssetFolders","description":"Assets are files that can be stored in the system and referenced on products, variants, categories and global list values. Assets uploaded to the system are assigned a URL based on the assets file name.\r\nEach image asset can be auto-scaled, cropped and formatted by adding parameters to the URL of the asset. Thus, you should only upload an image once in the highest quality you will need it and the system will take care of any scaling automatically.\r\nAssets are organized in folders, which can be nested within each other."}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"","name":"Authorization","in":"header"}},"schemas":{"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"Type":{"type":"string","nullable":true},"Title":{"type":"string","nullable":true},"Status":{"type":"integer","format":"int32","nullable":true},"Detail":{"type":"string","nullable":true},"Instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/v1/assetfolders/{folderUid}":{"delete":{"tags":["AssetFolders"],"summary":"Delete an asset folder by its uid","parameters":[{"name":"folderUid","in":"path","description":"Uid of folder to delete","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## GET /v1/assetfolders/{folderUid}/children

> Get all child folders of a folder. Use empty Guid to get root folders (00000000-0000-0000-0000-000000000000).

```json
{"openapi":"3.0.1","info":{"title":"Struct PIM Public API","version":"1.0"},"tags":[{"name":"AssetFolders","description":"Assets are files that can be stored in the system and referenced on products, variants, categories and global list values. Assets uploaded to the system are assigned a URL based on the assets file name.\r\nEach image asset can be auto-scaled, cropped and formatted by adding parameters to the URL of the asset. Thus, you should only upload an image once in the highest quality you will need it and the system will take care of any scaling automatically.\r\nAssets are organized in folders, which can be nested within each other."}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"","name":"Authorization","in":"header"}},"schemas":{"Struct.App.Api.Models.Asset.AssetFolderModel":{"type":"object","properties":{"Uid":{"type":"string","description":"Unique identifier of the folder","format":"uuid"},"Name":{"type":"string","description":"Name of the folder","nullable":true},"ParentUid":{"type":"string","description":"Unique identifier of the parent folder","format":"uuid","nullable":true},"IsPrivate":{"type":"boolean","description":"Indicates whether files in this folder can only be accessed by authenticated users and not via public urls"},"ViewPermission":{"type":"string","description":"Unique identifier of permission required to view files in this folder","format":"uuid","nullable":true},"CreatePermission":{"type":"string","description":"Unique identifier of permission required to create files in this folder","format":"uuid","nullable":true},"DeletePermission":{"type":"string","description":"Unique identifier of permission required to Delete files in this folder","format":"uuid","nullable":true},"Path":{"type":"array","items":{"$ref":"#/components/schemas/Struct.App.Api.Models.Asset.AssetFolderPath"},"description":"The path to the folder","nullable":true},"CreateBy":{"type":"string","description":"The user who created the folder","nullable":true},"LastModifiedBy":{"type":"string","description":"The user who last modified the folder","nullable":true},"Created":{"type":"string","description":"The timestamp when the folder was created","format":"date-time"},"LastModified":{"type":"string","description":"The timestamp when the folder was last modified","format":"date-time"}},"additionalProperties":false,"description":"Represents a folder in the mediabank"},"Struct.App.Api.Models.Asset.AssetFolderPath":{"type":"object","properties":{"Uid":{"type":"string","description":"Unique id of folder","format":"uuid"},"ParentUid":{"type":"string","description":"Unique id of parent folder","format":"uuid","nullable":true},"Name":{"type":"string","description":"Presented name of folder","nullable":true}},"additionalProperties":false,"description":"Represents a folder path in the asset system"},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"Type":{"type":"string","nullable":true},"Title":{"type":"string","nullable":true},"Status":{"type":"integer","format":"int32","nullable":true},"Detail":{"type":"string","nullable":true},"Instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/v1/assetfolders/{folderUid}/children":{"get":{"tags":["AssetFolders"],"summary":"Get all child folders of a folder. Use empty Guid to get root folders (00000000-0000-0000-0000-000000000000).","parameters":[{"name":"folderUid","in":"path","description":"","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Struct.App.Api.Models.Asset.AssetFolderModel"}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## POST /v1/assetfolders/batch

> Get a list of asset folders by their uids

```json
{"openapi":"3.0.1","info":{"title":"Struct PIM Public API","version":"1.0"},"tags":[{"name":"AssetFolders","description":"Assets are files that can be stored in the system and referenced on products, variants, categories and global list values. Assets uploaded to the system are assigned a URL based on the assets file name.\r\nEach image asset can be auto-scaled, cropped and formatted by adding parameters to the URL of the asset. Thus, you should only upload an image once in the highest quality you will need it and the system will take care of any scaling automatically.\r\nAssets are organized in folders, which can be nested within each other."}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"","name":"Authorization","in":"header"}},"schemas":{"Struct.App.Api.Models.Asset.AssetFolderModel":{"type":"object","properties":{"Uid":{"type":"string","description":"Unique identifier of the folder","format":"uuid"},"Name":{"type":"string","description":"Name of the folder","nullable":true},"ParentUid":{"type":"string","description":"Unique identifier of the parent folder","format":"uuid","nullable":true},"IsPrivate":{"type":"boolean","description":"Indicates whether files in this folder can only be accessed by authenticated users and not via public urls"},"ViewPermission":{"type":"string","description":"Unique identifier of permission required to view files in this folder","format":"uuid","nullable":true},"CreatePermission":{"type":"string","description":"Unique identifier of permission required to create files in this folder","format":"uuid","nullable":true},"DeletePermission":{"type":"string","description":"Unique identifier of permission required to Delete files in this folder","format":"uuid","nullable":true},"Path":{"type":"array","items":{"$ref":"#/components/schemas/Struct.App.Api.Models.Asset.AssetFolderPath"},"description":"The path to the folder","nullable":true},"CreateBy":{"type":"string","description":"The user who created the folder","nullable":true},"LastModifiedBy":{"type":"string","description":"The user who last modified the folder","nullable":true},"Created":{"type":"string","description":"The timestamp when the folder was created","format":"date-time"},"LastModified":{"type":"string","description":"The timestamp when the folder was last modified","format":"date-time"}},"additionalProperties":false,"description":"Represents a folder in the mediabank"},"Struct.App.Api.Models.Asset.AssetFolderPath":{"type":"object","properties":{"Uid":{"type":"string","description":"Unique id of folder","format":"uuid"},"ParentUid":{"type":"string","description":"Unique id of parent folder","format":"uuid","nullable":true},"Name":{"type":"string","description":"Presented name of folder","nullable":true}},"additionalProperties":false,"description":"Represents a folder path in the asset system"},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"Type":{"type":"string","nullable":true},"Title":{"type":"string","nullable":true},"Status":{"type":"integer","format":"int32","nullable":true},"Detail":{"type":"string","nullable":true},"Instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/v1/assetfolders/batch":{"post":{"tags":["AssetFolders"],"summary":"Get a list of asset folders by their uids","requestBody":{"description":"Uids of folders","content":{"application/json":{"schema":{"type":"array","items":{"type":"string","format":"uuid"}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Struct.App.Api.Models.Asset.AssetFolderModel"}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## POST /v1/assetfolders

> Create a new asset folder

```json
{"openapi":"3.0.1","info":{"title":"Struct PIM Public API","version":"1.0"},"tags":[{"name":"AssetFolders","description":"Assets are files that can be stored in the system and referenced on products, variants, categories and global list values. Assets uploaded to the system are assigned a URL based on the assets file name.\r\nEach image asset can be auto-scaled, cropped and formatted by adding parameters to the URL of the asset. Thus, you should only upload an image once in the highest quality you will need it and the system will take care of any scaling automatically.\r\nAssets are organized in folders, which can be nested within each other."}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"","name":"Authorization","in":"header"}},"schemas":{"Struct.App.Api.Models.Asset.CreateAssetFolderModel":{"type":"object","properties":{"Uid":{"type":"string","description":"Uid of the folder","format":"uuid"},"Name":{"type":"string","description":"Name of the folder","nullable":true},"ParentUid":{"type":"string","description":"Uid of the parent folder","format":"uuid","nullable":true},"IsPrivate":{"type":"boolean","description":"Indicates whether files in this folder can only be accessed by authenticated users and not via public urls"},"ViewPermission":{"type":"string","description":"Uid of permission required to view files in this folder","format":"uuid","nullable":true},"CreatePermission":{"type":"string","description":"Uid of permission required to create files in this folder","format":"uuid","nullable":true},"DeletePermission":{"type":"string","description":"Uid of permission required to Delete files in this folder","format":"uuid","nullable":true}},"additionalProperties":false,"description":"Folder information for creating a new folder"},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"Type":{"type":"string","nullable":true},"Title":{"type":"string","nullable":true},"Status":{"type":"integer","format":"int32","nullable":true},"Detail":{"type":"string","nullable":true},"Instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/v1/assetfolders":{"post":{"tags":["AssetFolders"],"summary":"Create a new asset folder","requestBody":{"description":"Model for new folder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Struct.App.Api.Models.Asset.CreateAssetFolderModel"}}}},"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## PUT /v1/assetfolders

> Update an existing asset folder

```json
{"openapi":"3.0.1","info":{"title":"Struct PIM Public API","version":"1.0"},"tags":[{"name":"AssetFolders","description":"Assets are files that can be stored in the system and referenced on products, variants, categories and global list values. Assets uploaded to the system are assigned a URL based on the assets file name.\r\nEach image asset can be auto-scaled, cropped and formatted by adding parameters to the URL of the asset. Thus, you should only upload an image once in the highest quality you will need it and the system will take care of any scaling automatically.\r\nAssets are organized in folders, which can be nested within each other."}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"","name":"Authorization","in":"header"}},"schemas":{"Struct.App.Api.Models.Asset.UpdateAssetFolderModel":{"type":"object","properties":{"Uid":{"type":"string","description":"Unique id of folder","format":"uuid"},"Name":{"type":"string","description":"Name of folder","nullable":true},"ParentUid":{"type":"string","description":"Unique id of parent folder","format":"uuid","nullable":true},"IsPrivate":{"type":"boolean","description":"Indicates whether files in this folder can only be accessed by authenticated users and not via public urls"},"ViewPermission":{"type":"string","description":"Unique id of permission required to view files in this folder","format":"uuid","nullable":true},"CreatePermission":{"type":"string","description":"Unique id of permission required to create files in this folder","format":"uuid","nullable":true},"DeletePermission":{"type":"string","description":"Unique id of permission required to Delete files in this folder","format":"uuid","nullable":true}},"additionalProperties":false,"description":"Model for updating an existing folder"},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"Type":{"type":"string","nullable":true},"Title":{"type":"string","nullable":true},"Status":{"type":"integer","format":"int32","nullable":true},"Detail":{"type":"string","nullable":true},"Instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/v1/assetfolders":{"put":{"tags":["AssetFolders"],"summary":"Update an existing asset folder","requestBody":{"description":"Model for folder update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Struct.App.Api.Models.Asset.UpdateAssetFolderModel"}}}},"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```
