メインコンテンツへスキップ
PUT
/
users
/
{user_id}
/
folders
/
0
Python
client.transfer.transfer_owned_folder(
    source_user.id, TransferOwnedFolderOwnedBy(id=target_user.id), notify=False
)
{
  "id": "12345",
  "type": "folder",
  "etag": "1",
  "sequence_id": "3",
  "name": "Contracts",
  "created_at": "2012-12-12T10:53:43-08:00",
  "modified_at": "2012-12-12T10:53:43-08:00",
  "description": "Legal contracts for the new ACME deal",
  "size": 629644,
  "path_collection": {
    "total_count": 1,
    "entries": [
      {
        "id": "12345",
        "type": "folder",
        "etag": "1",
        "sequence_id": "3",
        "name": "Contracts"
      }
    ]
  },
  "created_by": {
    "id": "11446498",
    "type": "user",
    "name": "Aaron Levie",
    "login": "ceo@example.com"
  },
  "modified_by": {
    "id": "11446498",
    "type": "user",
    "name": "Aaron Levie",
    "login": "ceo@example.com"
  },
  "trashed_at": "2012-12-12T10:53:43-08:00",
  "purged_at": "2012-12-12T10:53:43-08:00",
  "content_created_at": "2012-12-12T10:53:43-08:00",
  "content_modified_at": "2012-12-12T10:53:43-08:00",
  "owned_by": {
    "id": "11446498",
    "type": "user",
    "name": "Aaron Levie",
    "login": "ceo@example.com"
  },
  "shared_link": {
    "url": "https://www.box.com/s/vspke7y05sb214wjokpk",
    "effective_access": "company",
    "effective_permission": "can_download",
    "is_password_enabled": true,
    "download_count": 3,
    "preview_count": 3,
    "download_url": "https://www.box.com/shared/static/rh935iit6ewrmw0unyul.jpeg",
    "vanity_url": "https://acme.app.box.com/v/my_url/",
    "vanity_name": "my_url",
    "access": "open",
    "unshared_at": "2018-04-13T13:53:23-07:00",
    "permissions": {
      "can_download": true,
      "can_preview": true,
      "can_edit": false
    }
  },
  "folder_upload_email": {
    "access": "open",
    "email": "upload.Contracts.asd7asd@u.box.com"
  },
  "parent": {
    "id": "12345",
    "type": "folder",
    "etag": "1",
    "sequence_id": "3",
    "name": "Contracts"
  },
  "item_status": "active",
  "item_collection": {
    "limit": 1000,
    "next_marker": "JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVii",
    "prev_marker": "JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVih",
    "total_count": 5000,
    "offset": 2000,
    "order": [
      {
        "by": "type",
        "direction": "ASC"
      }
    ],
    "entries": [
      {
        "id": "12345",
        "type": "file",
        "etag": "1",
        "sequence_id": "3",
        "name": "Contract.pdf",
        "sha1": "85136C79CBF9FE36BB9D05D0639C70C265C18D37",
        "file_version": {
          "id": "12345",
          "type": "file_version",
          "sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc"
        },
        "description": "Contract for Q1 renewal",
        "size": 629644,
        "path_collection": {
          "total_count": 1,
          "entries": [
            "<unknown>"
          ]
        },
        "created_at": "2012-12-12T10:53:43-08:00",
        "modified_at": "2012-12-12T10:53:43-08:00",
        "trashed_at": "2012-12-12T10:53:43-08:00",
        "purged_at": "2012-12-12T10:53:43-08:00",
        "content_created_at": "2012-12-12T10:53:43-08:00",
        "content_modified_at": "2012-12-12T10:53:43-08:00",
        "created_by": {
          "id": "11446498",
          "type": "user",
          "name": "Aaron Levie",
          "login": "ceo@example.com"
        },
        "modified_by": {
          "id": "11446498",
          "type": "user",
          "name": "Aaron Levie",
          "login": "ceo@example.com"
        },
        "owned_by": {
          "id": "11446498",
          "type": "user",
          "name": "Aaron Levie",
          "login": "ceo@example.com"
        },
        "shared_link": {
          "url": "https://www.box.com/s/vspke7y05sb214wjokpk",
          "effective_access": "company",
          "effective_permission": "can_download",
          "is_password_enabled": true,
          "download_count": 3,
          "preview_count": 3,
          "download_url": "https://www.box.com/shared/static/rh935iit6ewrmw0unyul.jpeg",
          "vanity_url": "https://acme.app.box.com/v/my_url/",
          "vanity_name": "my_url",
          "access": "open",
          "unshared_at": "2018-04-13T13:53:23-07:00",
          "permissions": {
            "can_download": true,
            "can_preview": true,
            "can_edit": false
          }
        },
        "parent": "<unknown>",
        "item_status": "active",
        "version_number": "1",
        "comment_count": 10,
        "permissions": {
          "can_delete": true,
          "can_download": true,
          "can_invite_collaborator": true,
          "can_rename": true,
          "can_set_share_access": true,
          "can_share": true,
          "can_annotate": true,
          "can_comment": true,
          "can_preview": true,
          "can_upload": true,
          "can_view_annotations_all": true,
          "can_view_annotations_self": true,
          "can_apply_watermark": true
        },
        "tags": [
          "approved"
        ],
        "lock": {
          "id": "11446498",
          "type": "lock",
          "created_by": {
            "id": "11446498",
            "type": "user",
            "name": "Aaron Levie",
            "login": "ceo@example.com"
          },
          "created_at": "2012-12-12T10:53:43-08:00",
          "expired_at": "2012-12-12T10:53:43-08:00",
          "is_download_prevented": true,
          "app_type": "office_wopiplus"
        },
        "extension": "pdf",
        "is_package": true,
        "expiring_embed_link": {
          "access_token": "c3FIOG9vSGV4VHo4QzAyg5T1JvNnJoZ3ExaVNyQWw6WjRsanRKZG5lQk9qUE1BVQ",
          "expires_in": 3600,
          "token_type": "bearer",
          "restricted_to": [
            {
              "scope": "item_download",
              "object": {
                "id": "<unknown>",
                "type": "<unknown>",
                "etag": "<unknown>",
                "sequence_id": "<unknown>",
                "name": "<unknown>"
              }
            }
          ],
          "url": "https://cloud.app.box.com/preview/expiring_embed/..."
        },
        "watermark_info": {
          "is_watermarked": true,
          "is_watermark_inherited": false,
          "is_watermarked_by_access_policy": false
        },
        "is_accessible_via_shared_link": true,
        "allowed_invitee_roles": [
          "editor"
        ],
        "is_externally_owned": true,
        "has_collaborations": true,
        "metadata": {
          "enterprise_27335": {
            "marketingCollateral": {
              "$canEdit": true,
              "$id": "01234500-12f1-1234-aa12-b1d234cb567e",
              "$parent": "folder_59449484661",
              "$scope": "enterprise_27335",
              "$template": "marketingCollateral",
              "$type": "properties-6bcba49f-ca6d-4d2a-a758-57fe6edf44d0",
              "$typeVersion": 2,
              "$version": 1
            }
          }
        },
        "expires_at": "2012-12-12T10:53:43-08:00",
        "representations": {
          "entries": [
            {
              "content": {
                "url_template": "https://dl.boxcloud.com/api/2.0/internal_files/123/versions/345/representations/png_paged_2048x2048/content/{+asset_path}?watermark_content=4567"
              },
              "info": {
                "url": "https://api.box.com/2.0/internal_files/123/versions/345/representations/png_paged_2048x2048"
              },
              "properties": {
                "dimensions": "2048x2048",
                "paged": "true",
                "thumb": "true"
              },
              "representation": "png",
              "status": {
                "state": "success"
              }
            }
          ]
        },
        "classification": {
          "name": "Top Secret",
          "definition": "Content that should not be shared outside the company.",
          "color": "#FF0000"
        },
        "uploader_display_name": "Ellis Wiggins",
        "disposition_at": "2012-12-12T10:53:43-08:00",
        "shared_link_permission_options": [
          "can_preview"
        ],
        "is_associated_with_app_item": true
      }
    ]
  },
  "sync_state": "synced",
  "has_collaborations": true,
  "permissions": {
    "can_delete": true,
    "can_download": true,
    "can_invite_collaborator": true,
    "can_rename": true,
    "can_set_share_access": true,
    "can_share": true,
    "can_upload": true,
    "can_apply_watermark": true
  },
  "tags": [
    "approved"
  ],
  "can_non_owners_invite": true,
  "is_externally_owned": true,
  "metadata": {
    "enterprise_27335": {
      "marketingCollateral": {
        "$canEdit": true,
        "$id": "01234500-12f1-1234-aa12-b1d234cb567e",
        "$parent": "folder_59449484661",
        "$scope": "enterprise_27335",
        "$template": "marketingCollateral",
        "$type": "properties-6bcba49f-ca6d-4d2a-a758-57fe6edf44d0",
        "$typeVersion": 2,
        "$version": 1
      }
    }
  },
  "is_collaboration_restricted_to_enterprise": true,
  "allowed_shared_link_access_levels": [
    "open"
  ],
  "allowed_invitee_roles": [
    "editor"
  ],
  "watermark_info": {
    "is_watermarked": true,
    "is_watermark_inherited": false,
    "is_watermarked_by_access_policy": false
  },
  "is_accessible_via_shared_link": true,
  "can_non_owners_view_collaborators": true,
  "classification": {
    "name": "Top Secret",
    "definition": "Content that should not be shared outside the company.",
    "color": "#FF0000"
  },
  "is_associated_with_app_item": true
}

Documentation Index

Fetch the complete documentation index at: https://developer.box.com/llms.txt

Use this file to discover all available pages before exploring further.

このリソースは、バージョン2024.0のエンドポイントで使用されています。 詳細については、 Box APIのバージョン管理を参照してください。Box SDKのバージョニング戦略について詳しく学ぶ。」

承認

Authorization
string
header
必須

The access token received from the authorization server in the OAuth 2.0 flow.

パスパラメータ

user_id
string
必須

ユーザーのID。

クエリパラメータ

fields
string[]

レスポンスに含める属性のコンマ区切りリスト。このパラメータを使用すると、標準のレスポンスには通常含まれないフィールドをリクエストできます。

このパラメータを指定すると、明示的に指定しない限り標準フィールドはレスポンスに含まれず、リクエストしたフィールドのほかには、Mini版の表示のフィールドしか返されないことに注意してください。

notify
boolean

実行されたアクションについてのメール通知をユーザーに送信するかどうかを決定します。

ボディ

application/json
owned_by
object
必須

フォルダの転送先になるユーザー。

レスポンス

新しく作成された宛先フォルダの情報を返します。

任意のフォルダAPIエンドポイントからデフォルトで返される可能性があるフォルダのFull版の表示。

id
string
必須

フォルダを表す一意の識別子。

フォルダIDを確認するには、ウェブアプリケーションでフォルダにアクセスして、URLからIDをコピーします。たとえば、URLがhttps://*.app.box.com/folders/123の場合、folder_id123です。

:

"12345"

type
enum<string>
必須

値は常にfolderになります。

利用可能なオプション:
folder
:

"folder"

etag
string | null

このフォルダのHTTP etag。これは変更が発生した場合 (またはしなかった場合) にフォルダに対して変更を行う目的でのみ、If-MatchおよびIf-None-Matchヘッダー内の一部のAPIエンドポイントで使用できます。

:

"1"

sequence_id
string | null

この項目に適用された最新のUser Eventを表す数値の識別子。

これをGET /eventsエンドポイントと組み合わせて使用すると、この識別子が読み取られる前に発生した可能性があるUser Eventを除外できます。

たとえば、Box DriveなどのアプリケーションがAPIを介して項目を取得し、その項目の変更に関連するUser Eventの発生を監視する場合などがこれに該当します。User Eventのsequence_idが最初に取得されたリソースのsequence_idよりも小さいか同じである場合、アプリケーションはそのようなUser Eventをすべて無視します。

:

"3"

name
string

フォルダの名前。

:

"Contracts"

created_at
string<date-time> | null

このフォルダが作成された日時。ルートフォルダやごみ箱フォルダなど、一部のフォルダの場合、この値はnullになる場合があります。

:

"2012-12-12T10:53:43-08:00"

modified_at
string<date-time> | null

このフォルダが最後に更新された日時。ルートフォルダやごみ箱フォルダなど、一部のフォルダの場合、この値はnullになる場合があります。

:

"2012-12-12T10:53:43-08:00"

description
string

このフォルダの説明 (省略可)。

Maximum string length: 256
:

"Legal contracts for the new ACME deal"

size
integer<int64>

フォルダサイズ (バイト単位)。

この整数を解析する際には、値が非常に大きくなることがあるため注意が必要です。

:

629644

path_collection
パスのコレクション · object

ルートフォルダを起点にした、このフォルダを含むフォルダツリー。

created_by
ユーザー (Mini) · object

このフォルダを作成したユーザー。

modified_by
ユーザー (Mini) · object

このフォルダを最後に変更したユーザー。

trashed_at
string<date-time> | null

このフォルダがごみ箱に移動された日時。

:

"2012-12-12T10:53:43-08:00"

purged_at
string<date-time> | null

このフォルダがごみ箱から削除される予定日時。

:

"2012-12-12T10:53:43-08:00"

content_created_at
string<date-time> | null

このフォルダが最初に作成された日時。

:

"2012-12-12T10:53:43-08:00"

content_modified_at
string<date-time> | null

このフォルダが最後に更新された日時。

:

"2012-12-12T10:53:43-08:00"

owned_by
ユーザー (Mini) · object

このフォルダを所有するユーザー。

このフォルダの共有リンク。このフォルダに対してまだ共有リンクが作成されていない場合は、nullになります。

folder_upload_email
object

以下のオプションのいずれかがtrueの場合、folder_upload_emailパラメータはnullではありません。

  • [このフォルダへのメールによるアップロードを許可する] および [このフォルダのコラボレータにのみメールによるアップロードを許可する] が管理コンソールで1フォルダに対して有効になっていて、ユーザーには少なくともアップロード権限が付与されています。

  • [このフォルダへのメールによるアップロードを許可する] の設定が管理コンソールで1フォルダに対して有効になっていて、[このフォルダのコラボレータにのみメールによるアップロードを許可する] の設定が無効 (オフ) になっています。

条件が満たされていない場合、パラメータには次の値が設定されます: folder_upload_email: null

parent
フォルダ (Mini) · object

このフォルダが配置されているフォルダ (省略可)

ルートフォルダやごみ箱フォルダなど、一部のフォルダの場合、この値はnullになることがあります。

item_status
enum<string>

この項目が削除されたかどうかを定義します。

  • active - 項目がごみ箱に移動されていない場合。
  • trashed - 項目がごみ箱に移動されているが、まだ削除されていない場合。
  • deleted - 項目がすでに完全に削除されている場合。
利用可能なオプション:
active,
trashed,
deleted
:

"active"

item_collection
Items · object

フォルダ内の項目のページ。

このフィールドをリクエストできるのは、フォルダの情報をクエリで照会するときのみで、フォルダの項目をクエリで照会するときにはリクエストできません。

sync_state
enum<string>

フォルダをユーザーのデバイスに同期する必要があるかどうかを指定します。これはBox Sync (廃止済み) で使用され、Box Driveでは 使用されません。

利用可能なオプション:
synced,
not_synced,
partially_synced
:

"synced"

has_collaborations
boolean

このフォルダに他のコラボレータが存在するかどうかを指定します。

:

true

permissions
object

このフォルダに対して現在のユーザーが持っている権限について説明します。

tags
string[]

この項目のタグ。これらのタグはBoxウェブアプリおよびモバイルアプリで項目の横に表示されます。

タグを追加または削除するには、項目の現在のタグを取得して変更してから、このフィールドを更新します。

タグの数は、1項目あたり100個までに制限され、一意のタグは会社あたり10,000個までに制限されます。

Required array length: 1 - 100 elements
:
["approved"]
can_non_owners_invite
boolean

フォルダの所有者ではないユーザーがそのフォルダに新しいコラボレータを招待できるかどうかを指定します。

:

true

is_externally_owned
boolean

このフォルダが認証済みの会社以外のユーザーによって所有されているかどうかを指定します。

:

true

metadata
項目メタデータインスタンス · object

このフォルダに追加されたメタデータインスタンスを含むオブジェクト。

各メタデータインスタンスは、そのscopetemplateKeyによって一意に識別されます。各フォルダに追加されるメタデータテンプレートのインスタンスは1つだけです。各メタデータインスタンスは、キーとしてtemplateKeyが指定されているオブジェクト内にネストされ、さらにそのオブジェクト自体もキーとしてscopeが指定されているオブジェクト内にネストされます。

:
{
  "enterprise_27335": {
    "marketingCollateral": {
      "$canEdit": true,
      "$id": "01234500-12f1-1234-aa12-b1d234cb567e",
      "$parent": "folder_59449484661",
      "$scope": "enterprise_27335",
      "$template": "marketingCollateral",
      "$type": "properties-6bcba49f-ca6d-4d2a-a758-57fe6edf44d0",
      "$typeVersion": 2,
      "$version": 1
    }
  }
}
is_collaboration_restricted_to_enterprise
boolean

このフォルダへの招待を社内のユーザーのみに限定するかどうかを指定します。既存のコラボレーションには影響しません。

:

true

このフォルダで使用できるアクセスレベルのリスト。

ルートフォルダなどの一部のフォルダでは共有が許可されていないため、このリストは常に空になります。

利用可能なオプション:
open,
company,
collaborators
:
["open"]
allowed_invitee_roles
enum<string>[]

このフォルダを共有するときに招待できるユーザーの役割タイプのリスト。

利用可能なオプション:
editor,
viewer,
previewer,
uploader,
previewer uploader,
viewer uploader,
co-owner
:
["editor"]
watermark_info
object

このフォルダに適用された電子すかしに関する詳細。

直接共有リンクまたは親フォルダへの共有リンクを使用してフォルダにアクセスできるかどうかを指定します。

:

true

can_non_owners_view_collaborators
boolean

このフォルダの所有者ではないコラボレータがこのフォルダの他のコラボレータを表示できないように制限するかどうかを指定します。

この制限を有効にした場合は、所有者ではないユーザーが新しいコラボレータを招待することも制限されます。

:

true

classification
object

このフォルダに適用された分類に関する詳細。

is_associated_with_app_item
boolean

フォルダまたはフォルダの先祖が1つ以上のアプリ項目に関連付けられている場合、このフィールドはtrueを返します。コンテキストユーザーがそのフォルダに関連付けられたアプリ項目にアクセスできない場合でもtrueが返されることに注意してください。

:

true