Table of contents
Storage
Download API definition:
POST https://dev-api.bentley.com/storage/folders/{folderId}/move

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

Name
Required?
Description
folderId
Yes

Id of the folder which you want to move

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 client sent more requests than allowed by this API for the current tier of the client.

json
{
    "error": {
        "code": "RateLimitExceeded",
        "message": "The client sent more requests than allowed by this API for the current tier of the client."
    }
}

Response headers

Name
Description
retry-after

Number of seconds to wait until client is allowed to make more requests.

folder (response)

Retrieved folder response containing folder.

Name
Type
Description
folder

Full representation of the folder.

folder-details type

Identification of the folder entity.

Name
Type
Description
folder
String

folder-details

Full representation of the folder.

Name
Type
Description
folder-details type

Identification of the folder entity.

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.

Was this page helpful?