Move folder
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
Folder Id
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 user has sent too many requests in a given amount of time.
{ "error": { "code": "TooManyRequests", "message": "More requests were received than the subscription rate-limit allows." } }
Response headers
The number of requests exceeds the rate-limit for the client subscription.
links (item)
URLs for accessing users' details and parent folder.
link
Hyperlink container.
Hyperlink to the specific entity.
folder (response)
Retrieved folder response containing folder.
folder
Full representation of the folder.
Identification of the folder entity.
Unique Identifier of the folder.
Display name of the folder.
Description of the folder.
Absolute path to the folder.
Display name of the user who modified folder last.
Date when the folder was created.
Date when the folder was last time modified.
Unique Identifier of the parent folder.
item (move)
Model for moving file or folder.
Folder Id to which the item should be moved.
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.
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.