---
title: "Create smb share"
method: POST
path: "/api/smb/share"
tags: ["SMB"]
---

# Create smb share

`POST /api/smb/share`

Create an smb share

        :param share_resource: Dict share data
        :return: Returns share resource.
        :rtype: Dict[str, Any]

## Request body

- object
  - `share_resource` string, required — share_resource

## Response `201`

Resource created.

- object
  - `results` object[], required — List of operation results
    - `resource` object, required — Resource
      - `browseable` boolean, required — Indicates if the share is browseable
      - `cephfs` object, required — Configuration for the CephFS share
        - `path` string, required — Path within the CephFS file system
        - `provider` string, required — Provider of the CephFS share, e.g., 'samba-vfs'
        - `subvolume` string, required — Subvolume within the CephFS file system
        - `subvolumegroup` string, required — Subvolume Group in CephFS file system
        - `volume` string, required — Name of the CephFS file system
      - `cluster_id` string, required — Unique identifier for the cluster
      - `intent` string, required — Desired state of the resource, e.g., 'present' or 'removed'
      - `name` string, required — Name of the share
      - `read_bw_limit` integer, required — QoS: max read bandwidth B/s (0=disabled)
      - `read_delay_max` integer, required — QoS: max read delay in seconds (0-300)
      - `read_iops_limit` integer, required — QoS: max read IOPS (0=disabled)
      - `readonly` boolean, required — Indicates if the share is read-only
      - `resource_type` string, required — ceph.smb.share
      - `share_id` string, required — Unique identifier for the share
      - `write_bw_limit` integer, required — QoS: max write bandwidth B/s (0=disabled)
      - `write_delay_max` integer, required — QoS: max write delay in seconds (0-300)
      - `write_iops_limit` integer, required — QoS: max write IOPS (0=disabled)
    - `state` string, required — The current state of the resource, e.g., 'created', 'updated', 'deleted'
    - `success` boolean, required — Indicates if the operation was successful
  - `success` boolean, required — Indicates if the overall operation was successful

## Other responses

- `202` — Operation is still executing. Please check the task queue.
- `400` — Operation exception. Please check the response body for details.
- `401` — Unauthenticated access. Please login first.
- `403` — Unauthorized access. Please check your permissions.
- `500` — Unexpected error. Please check the response body for the stack trace.

---

[API](https://skmtc.net/ceph/apis/ceph-rest-api.md) · [All operations](https://skmtc.net/ceph/apis/ceph-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ceph/ceph-rest-api/revisions/b03ae23c3806/schema)
