Move the Folder.
The folderId
MUST be provided in the parameters.
As shown in the request section below, you MUST provide a parentFolderId
in the request body.
parentFolderId
is an id of the folder in which you want to move the folder with folderId
.
Parameters
folderId
– Id of the folder which you want to move.
Authentication
Requires Authorization
header with valid Bearer token for scope itwin-platform
.
For more documentation on authorization and how to get access token visit OAUTH2 Authorization page.
Authorization
User must be an Organization Administrator for the Organization that owns a given Project or have storage_write
permission assigned at the Project level.
An Organization Administrator must have at least one of the following roles assigned in User Management: Account Administrator, Co-Administrator, or CONNECT Services Administrator. For more information about User Management please visit our Bentley Communities Licensing, Cloud, and Web Services wiki page.
Request parameters
Id of the folder which you want to move
Request headers
OAuth access token with itwin-platform
scope
Setting to application/vnd.bentley.itwin-platform.v1+json
is recommended.
Request body
item (move)
Folder Id to which the item should be moved.
Example
{ "parentFolderId": "TYJsPN0xtkWId0yUrXkS5g0CIYaGZLxEozrWBCOcS_s" }
Response 200 OK
OK
{ "folder": { "type": "folder", "id": "l8XblXMv8E6ci6nWcIUbk_9_--aXutFezAGw4Deqvn8", "displayName": "Test", "description": "Test Folder", "path": "folderName/Test", "lastModifiedByDisplayName": "Bob User", "createdDateTime": "2024-01-31T02:29:57.5138179Z", "lastModifiedDateTime": "2024-02-07T03:29:41.0315077Z", "parentFolderId": "l8XblXMv8E6ci6nWcIUbkyhi-5rCl25MuI55ENLniR8", "_links": { "createdBy": { "href": "https://api.bentley.com/accesscontrol/itwins/95dbc597-2f73-4ef0-9c8b-a9d670851b93/members/4b751c94-4f79-4ec7-bf7e-bba4186b9c2f" }, "lastModifiedBy": { "href": "https://api.bentley.com/accesscontrol/itwins/95dbc597-2f73-4ef0-9c8b-a9d670851b93/members/4b751c94-4f79-4ec7-bf7e-bba4186b9c2f" }, "parentFolder": { "href": "https://api.bentley.com/storage/folders/l8XblXMv8E6ci6nWcIUbkyhi-5rCl25MuIe5ENLniR8" } } } }
Response 401 Unauthorized
This response indicates that request lacks valid authentication credentials. Access token might not been provided, issued by the wrong issuer, does not have required scopes or request headers were malformed.
{ "error": { "code": "HeaderNotFound", "message": "Header Authorization was not found in the request. Access denied." } }
Response 404 Not Found
Folder cannot be found.
{ "error": { "code": "FolderNotFound", "message": "Requested folder is not available." } }
Response 409 Conflict
Folder already exists.
{ "error": { "code": "DuplicateInstance", "message": "Folder already exists." } }
Response 422 Unprocessable Entity
Invalid request to move a folder. Make sure that a valid folder ID was passed in.
{ "error": { "code": "InvalidStorageRequest", "message": "Request payload is incorrect or malformed." } }
Response 429 Too many requests
This response indicates that the client sent more requests than allowed by this API for the current tier of the client.
{ "error": { "code": "RateLimitExceeded", "message": "The client sent more requests than allowed by this API for the current tier of the client." } }
Response headers
Number of seconds to wait until client is allowed to make more requests.
folder (response)
Retrieved folder response containing folder.
{ "description": "Retrieved folder response containing folder.", "title": "folder (response)", "type": "object", "properties": { "folder": { "description": "Full representation of the folder.", "$ref": "#/components/schemas/folder-details" } }, "additionalProperties": false }
folder-details type
Identification of the folder entity.
{ "description": "Identification of the folder entity.", "type": "string", "enum": [ "folder" ], "title": "folder-details type" }
folder-details
Full representation of the folder.
{ "description": "Full representation of the folder.", "type": "object", "allOf": [ { "$ref": "#/components/schemas/item-details" } ], "properties": { "type": { "description": "Identification of the folder entity.", "type": "string", "enum": [ "folder" ], "title": "folder-details type", "$ref": "#/components/schemas/folder-details-type" } }, "additionalProperties": true }
item (move)
Model for moving file or folder.
Folder Id to which the item should be moved.
{ "description": "Model for moving file or folder.", "title": "item (move)", "type": "object", "properties": { "parentFolderId": { "description": "Folder Id to which the item should be moved.", "type": "string" } }, "required": [ "parentFolderId" ], "additionalProperties": false }
Error
Contains error information.
One of a server-defined set of error codes.
A human-readable representation of the error.
The target of the error.
{ "type": "object", "description": "Contains error information.", "properties": { "code": { "type": "string", "description": "One of a server-defined set of error codes." }, "message": { "type": "string", "description": "A human-readable representation of the error." }, "target": { "type": "string", "description": "The target of the error.", "nullable": true } }, "required": [ "code", "message" ], "additionalProperties": true }
Error Response
Gives details for an error that occurred while handling the request. Note that clients MUST NOT assume that every failed request will produce an object of this schema, or that all of the properties in the response will be non-null, as the error may have prevented this response from being constructed.
{ "type": "object", "title": "Error Response", "description": "Gives details for an error that occurred while handling the request. Note that clients MUST NOT assume that every failed request will produce an object of this schema, or that all of the properties in the response will be non-null, as the error may have prevented this response from being constructed.", "properties": { "error": { "description": "Error information.", "$ref": "#/components/schemas/Error" } }, "required": [ "error" ], "additionalProperties": false }
Was this page helpful?