Table of contents
Storage
Download API definition:
This operation is a Technical Preview and is available for testing purposes only. Do not use in production.
POST https://api.bentley.com/storage/folders/{folderId}/move

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

Name
Required?
Description
folderId
Yes

Folder Id

Request headers

Name
Required?
Description
Authorization
Yes

OAuth access token with itwin-platform scope

Accept
Yes

Setting to application/vnd.bentley.itwin-platform.v1+json is recommended.

Request body

item (move)

Name
Type
Required?
Description
parentFolderId
String
Yes

Folder Id to which the item should be moved.

Example

json
{
    "parentFolderId": "TYJsPN0xtkWId0yUrXkS5g0CIYaGZLxEozrWBCOcS_s"
}

Response 200 OK

OK

json
{
    "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.

json
{
    "error": {
        "code": "HeaderNotFound",
        "message": "Header Authorization was not found in the request. Access denied."
    }
}

Response 404 Not Found

Folder cannot be found.

json
{
    "error": {
        "code": "FolderNotFound",
        "message": "Requested folder is not available."
    }
}

Response 409 Conflict

Folder already exists.

json
{
    "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.

json
{
    "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.

json
{
    "error": {
        "code": "TooManyRequests",
        "message": "More requests were received than the subscription rate-limit allows."
    }
}

Response headers

Name
Description
retry-after

The number of requests exceeds the rate-limit for the client subscription.

links (item)

URLs for accessing users' details and parent folder.

Name
Type
Description
createdBy

URL for getting user's details who created item.

lastModifiedBy

URL for getting user's details who last modified item.

parentFolder

URL for getting the parent folder.

link

Hyperlink container.

Name
Type
Description
href
String

Hyperlink to the specific entity.

folder (response)

Retrieved folder response containing folder.

Name
Type
Description
folder

Full representation of the folder.

folder

Full representation of the folder.

Name
Type
Description
type
String

Identification of the folder entity.

id
String

Unique Identifier of the folder.

displayName
String

Display name of the folder.

description
String

Description of the folder.

path
String

Absolute path to the folder.

lastModifiedByDisplayName
String

Display name of the user who modified folder last.

createdDateTime
Date-time

Date when the folder was created.

lastModifiedDateTime
Date-time

Date when the folder was last time modified.

parentFolderId
String

Unique Identifier of the parent folder.

_links

Contains the hyperlinks to users' details and parent folder.

item (move)

Model for moving file or folder.

Name
Type
Description
parentFolderId
String

Folder Id to which the item should be moved.

Error

Contains error information.

Name
Type
Description
code
String

One of a server-defined set of error codes.

message
String

A human-readable representation of the error.

target
String, null

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.

Name
Type
Description
error

Error information.