> ## Documentation Index
> Fetch the complete documentation index at: https://developers.liara.ir/llms.txt
> Use this file to discover all available pages before exploring further.

# List a disk's FTP accounts

> Lists a disk's FTP accounts with their passwords, and the host to connect to. The app must have been deployed. Team permission: `operate` or `manage`.



## OpenAPI

````yaml /spec/paas-domains-disks.yaml get /v1/projects/{project_id}/disks/{diskName}/ftp
openapi: 3.0.1
info:
  title: Domains & Disks
  version: 1.0.0
  description: |
    Connect custom domains to your apps and object storage buckets, and
    manage your apps' persistent disks, their backups and FTP access.

    ## Connecting a domain

    1. Add the domain with `POST /v1/domains`.
    2. Get its details with `GET /v1/domains/{domainName}` and create these
       DNS records at your DNS provider:
       - **Ownership:** a `TXT` record on `liara-challenge.<domain>` with the
         domain's `verificationCode`. You can skip it if the root domain is a
         zone managed in Liara DNS.
       - **Routing:** a `CNAME` record from the domain to its `target`. For a
         wildcard domain `*.example.com`, the check uses
         `__liara__.example.com`, which a wildcard record covers.
       - **Certificates through DNS validation** (needed for wildcard
         domains): a `CNAME` record from `_acme-challenge.<domain>` to
         `<domain-with-dashes>._acme-challenge.liara.cloud`, for example
         `_acme-challenge.example.com` → `example-com._acme-challenge.liara.cloud`.
    3. Check the records with `GET /v1/domains/{domainID}/check`. The domain
       becomes `ACTIVE` once ownership is verified.
    4. Request an SSL certificate with `POST /v1/domains/provision-ssl-certs`.

    ## Identifying an app

    Some disk endpoints identify the app by its **name** (`project_id`) and
    others by its **ID** (`projectID`, the app's `_id`). Each endpoint says
    which one it expects.

    ## Team permissions

    With `teamID`, each endpoint needs one of the permissions it lists on the
    app (or bucket) involved. A permission from your role or a resource
    permission on that app both count.
servers:
  - url: https://api.liara.ir
security:
  - bearerAuth: []
tags:
  - name: Domains
    description: Add, verify and remove custom domains.
  - name: Domain SSL & Redirects
    description: SSL certificates and redirects for custom domains.
  - name: Disks
    description: Create, resize and delete persistent disks.
  - name: Disk Backups
    description: Back up disks, download backups and restore them.
  - name: FTP Access
    description: FTP accounts for reading and writing disk files.
paths:
  /v1/projects/{project_id}/disks/{diskName}/ftp:
    get:
      tags:
        - FTP Access
      summary: List a disk's FTP accounts
      description: >-
        Lists a disk's FTP accounts with their passwords, and the host to
        connect to. The app must have been deployed. Team permission: `operate`
        or `manage`.
      operationId: listFTPAccounts
      parameters:
        - $ref: '#/components/parameters/TeamID'
        - $ref: '#/components/parameters/AppName'
        - $ref: '#/components/parameters/FTPDiskName'
      responses:
        '200':
          description: FTP accounts.
          content:
            application/json:
              schema:
                type: object
                properties:
                  host:
                    type: string
                    description: The FTP server to connect to.
                  accesses:
                    type: array
                    items:
                      type: object
                      properties:
                        _id:
                          type: string
                        disk:
                          type: string
                          description: The disk's ID.
                        username:
                          type: string
                        password:
                          type: string
                        readOnly:
                          type: boolean
                        createdAt:
                          type: string
                          format: date-time
              example:
                host: <ftp-host>
                accesses:
                  - _id: '000000000000000000000240'
                    disk: '000000000000000000000230'
                    username: uploads_ftp
                    password: <password>
                    readOnly: false
        '400':
          description: '`teamID` is invalid, or the app has never been deployed.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                statusCode: 400
                error: Bad Request
                message: Project does not have any releases.
                data: null
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/TeamForbidden'
        '404':
          $ref: '#/components/responses/AppOrDiskNotFound'
components:
  parameters:
    TeamID:
      name: teamID
      in: query
      required: false
      description: >-
        Run the request in the context of a team you belong to, instead of your
        personal account.
      schema:
        $ref: '#/components/schemas/ObjectID'
      example: '000000000000000000000002'
    AppName:
      name: project_id
      in: path
      required: true
      description: The app's name.
      schema:
        type: string
      example: my-app
    FTPDiskName:
      name: diskName
      in: path
      required: true
      description: The disk's name.
      schema:
        type: string
      example: uploads
  schemas:
    Error:
      type: object
      description: Standard error body.
      properties:
        statusCode:
          type: integer
        error:
          type: string
          description: HTTP status text.
        message:
          type: string
          description: What went wrong.
        data:
          type: object
          nullable: true
          description: >-
            Extra details. When present, `code` is a stable, machine-readable
            error code.
          properties:
            code:
              type: string
    ObjectID:
      type: string
      pattern: ^[0-9a-fA-F]{24}$
      description: 24-character hexadecimal ID.
    AuthError:
      type: object
      description: Error body returned when the API token is rejected.
      properties:
        error:
          type: string
  responses:
    Unauthorized:
      description: The API token is missing, invalid or expired.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AuthError'
          example:
            error: Unauthorized.
    TeamForbidden:
      description: >-
        With `teamID`: you aren't a member of the team (`team_not_found`), or
        you don't have the required permission (`no_permission`).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            teamNotFound:
              summary: Not a team member
              value:
                statusCode: 403
                error: Forbidden
                message: Team not found
                data:
                  code: team_not_found
            noPermission:
              summary: Missing permission
              value:
                statusCode: 403
                error: Forbidden
                message: You do not have permission to access this resource.
                data:
                  code: no_permission
    AppOrDiskNotFound:
      description: The app or the disk doesn't exist.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            statusCode: 404
            error: Not Found
            message: Disk not found.
            data: null
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Send your API token as `Authorization: Bearer <api-token>`.'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.