western-digital Search API

Search files by parent directory.

OpenAPI Specification

western-digital-search-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: WD My Cloud Home Authentication Search API
  description: The WD My Cloud Home REST API enables off-device applications to manage files and folders on a user's My Cloud Home NAS device. It supports file upload, download, listing, search, sharing, thumbnails, and device discovery via OAuth 2.0 authentication.
  version: v2
  termsOfService: https://www.westerndigital.com/legal/terms-of-use
  contact:
    name: Western Digital Developer Support
    url: https://developer.westerndigital.com/develop/wd-my-cloud-home/forms.html
  license:
    name: Western Digital Developer Terms
    url: https://developer.westerndigital.com/develop/wd-my-cloud-home/
servers:
- url: https://config.mycloud.com
  description: Configuration service — call first to get device and auth URLs
- url: https://device.mycloud.com
  description: Device service (dynamically resolved per device)
- url: https://wdc.auth0.com
  description: Authentication service
tags:
- name: Search
  description: Search files by parent directory.
paths:
  /sdk/v2/filesSearch/parents:
    get:
      operationId: searchFilesByParent
      summary: Search Files by Parent
      description: Returns files within a specified parent folder, enabling directory traversal.
      tags:
      - Search
      security:
      - bearerAuth: []
      parameters:
      - name: ids
        in: query
        required: true
        schema:
          type: string
        description: Comma-separated list of parent folder IDs to search within. Use "root" for the root folder.
      - name: pageToken
        in: query
        required: false
        schema:
          type: string
        description: Pagination token.
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          default: 100
          maximum: 100
        description: Maximum number of results.
      responses:
        '200':
          description: Files within the specified parent folder.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FilesResponse'
        '401':
          description: Unauthorized.
components:
  schemas:
    FilesResponse:
      type: object
      properties:
        files:
          type: array
          items:
            $ref: '#/components/schemas/FileItem'
        pageToken:
          type: string
          description: Token for the next page of results. Absent if no more pages.
    FileItem:
      type: object
      properties:
        id:
          type: string
          description: Unique file/folder identifier.
        name:
          type: string
          description: File or folder name.
        mimeType:
          type: string
          description: MIME type. Use "application/x.wd.dir" for folders.
        size:
          type: integer
          description: File size in bytes.
        parentId:
          type: string
          description: ID of the parent folder. "root" for top-level items.
        createdTime:
          type: string
          format: date-time
        modifiedTime:
          type: string
          format: date-time
        thumbnailUrl:
          type: string
          format: uri
          description: URL for image/video thumbnail.
        downloadUrl:
          type: string
          format: uri
          description: Direct download URL.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: OAuth 2.0 Bearer token obtained via the /oauth/token endpoint. Include in Authorization header as "Bearer {token}".