Method: children.list

フォルダの子を一覧表示します。

HTTP リクエスト

GET https://www.googleapis.com/drive/v2/files/{folderId}/children

この URL は gRPC Transcoding 構文を使用します。

パスパラメータ

パラメータ
folderId

string

フォルダの ID。

クエリ パラメータ

パラメータ
maxResults

integer

返す子要素の最大数。

orderBy

string

並べ替えキーのカンマ区切りのリスト。有効なキーは、createdDatefolderlastViewedByMeDatemodifiedByMeDatemodifiedDatequotaBytesUsedrecencysharedWithMeDatestarredtitle です。各キーはデフォルトで昇順に並べ替えられますが、desc 修飾子で逆順に並べ替えることもできます。使用例: ?orderBy=folder,modifiedDate desc,title。なお、現在、約 100 万個のファイルがあるユーザーについては、リクエストされた並べ替え順序が無視されるという制限があります。

pageToken

string

お子様のページトークン。

q

string

子を検索するためのクエリ文字列。

リクエストの本文

リクエストの本文は空にする必要があります。

レスポンスの本文

ファイルの子のリスト。

成功した場合、レスポンスの本文には次の構造のデータが含まれます。

JSON 表現
{
  "items": [
    {
      object (ChildReference)
    }
  ],
  "nextPageToken": string,
  "kind": string,
  "etag": string,
  "selfLink": string,
  "nextLink": string
}
フィールド
items[]

object (ChildReference)

子どものリスト。nextPageToken が入力されている場合、このリストは不完全である可能性があり、結果の追加ページを取得する必要があります。

nextPageToken

string

子どもの次のページのページトークン。子リストの末尾に達した場合は、これが存在しません。なんらかの理由でトークンが拒否された場合は、トークンを破棄し、結果の最初のページからページネーションを再開する必要があります。

kind

string

これは常に drive#childList です。

etag

string

リストの ETag。

認可スコープ

次の OAuth スコープのいずれかが必要です。

  • https://www.googleapis.com/auth/docs
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.appdata
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/drive.meet.readonly
  • https://www.googleapis.com/auth/drive.metadata
  • https://www.googleapis.com/auth/drive.metadata.readonly
  • https://www.googleapis.com/auth/drive.photos.readonly
  • https://www.googleapis.com/auth/drive.readonly

一部のスコープは制限されており、アプリでそれらを使用するにはセキュリティ評価が必要です。詳しくは、承認ガイドをご覧ください。