---
title: "Create a plan."
method: POST
path: "/v1/{tenantId}/plans"
tags: ["Plan"]
---

# Create a plan.

`POST /v1/{tenantId}/plans`

## Request

- Base URL: `https://virtserver.swaggerhub.com/open83/crystal/1.0.0`
- URL: `https://virtserver.swaggerhub.com/open83/crystal/1.0.0/v1/{tenantId}/plans`
- Auth: none declared

## Request body

- Plan
  - `Id` string: The plan ID, generated by server
  - `TenantId` string: The tenant UUID in a multi-tenancy environment.
  - `UserId` string: The user UUID in a multi-tenancy environment.
  - `Description` string: Plan description.
  - `Name` string: The plan name specified by user.
  - `Type` 'migration': The plan type. Till now only migration support. New types will be added in the future.
  - `PolicyEnabled` boolean: Enable policy or not.
  - `PolicyId` string: Related policy id, plan will be scheduled automatically according this policy if PolicyEnabled is true.
  - `RemainSource` boolean: Remain the source objects or not.
  - `SourceConn` Connector
    - `StorType` 'aws-s3' | 'azure-blob' | 'gcp-s3' | 'fusionstorage-object' | 'ibm-cos' | 'yig' | 'aws-file' | 'azure-file': Connector type.
    - `BucketName` string: The name of bucket which is created in SODA crystal. When the type of connector is opensds-obj, this parameter should be provided.
  - `DestConn` Connector
    - `StorType` 'aws-s3' | 'azure-blob' | 'gcp-s3' | 'fusionstorage-object' | 'ibm-cos' | 'yig' | 'aws-file' | 'azure-file': Connector type.
    - `BucketName` string: The name of bucket which is created in SODA crystal. When the type of connector is opensds-obj, this parameter should be provided.
  - `Filter` object
    - `Prefix` string: Prefix of object name, only those objects which name have this prefix will be choosed.
    - `Tag` KV[]: Tag of object name.
      - `key` string: Key of the Key-Value object.
      - `Value` string: Value of the Key-Value object.

## Response `200`

successful operation

- object
  - `plan` Plan
    - `Id` string: The plan ID, generated by server
    - `TenantId` string: The tenant UUID in a multi-tenancy environment.
    - `UserId` string: The user UUID in a multi-tenancy environment.
    - `Description` string: Plan description.
    - `Name` string: The plan name specified by user.
    - `Type` 'migration': The plan type. Till now only migration support. New types will be added in the future.
    - `PolicyEnabled` boolean: Enable policy or not.
    - `PolicyId` string: Related policy id, plan will be scheduled automatically according this policy if PolicyEnabled is true.
    - `RemainSource` boolean: Remain the source objects or not.
    - `SourceConn` Connector
      - `StorType` 'aws-s3' | 'azure-blob' | 'gcp-s3' | 'fusionstorage-object' | 'ibm-cos' | 'yig' | 'aws-file' | 'azure-file': Connector type.
      - `BucketName` string: The name of bucket which is created in SODA crystal. When the type of connector is opensds-obj, this parameter should be provided.
    - `DestConn` Connector
      - `StorType` 'aws-s3' | 'azure-blob' | 'gcp-s3' | 'fusionstorage-object' | 'ibm-cos' | 'yig' | 'aws-file' | 'azure-file': Connector type.
      - `BucketName` string: The name of bucket which is created in SODA crystal. When the type of connector is opensds-obj, this parameter should be provided.
    - `Filter` object
      - `Prefix` string: Prefix of object name, only those objects which name have this prefix will be choosed.
      - `Tag` KV[]: Tag of object name.
        - `key` string: Key of the Key-Value object.
        - `Value` string: Value of the Key-Value object.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized. Token not found in header

## Changes

- **2025-01-08** `6517d105571e`: 4 breaking, 4 info
  - removed the enum value `ceph-s3` of the request property `DestConn/StorType`
  - removed the enum value `ceph-s3` of the request property `SourceConn/StorType`
  - removed the enum value `hw-obs` of the request property `DestConn/StorType`
  - removed the enum value `hw-obs` of the request property `SourceConn/StorType`
  - …4 more
- **2023-09-17** `d4f502a59e17`: 4 warning, 4 info
  - added the new `ceph-s3` enum value to the `plan/DestConn/StorType` response property for the response status `200`
  - added the new `ceph-s3` enum value to the `plan/SourceConn/StorType` response property for the response status `200`
  - added the new `hw-obs` enum value to the `plan/DestConn/StorType` response property for the response status `200`
  - added the new `hw-obs` enum value to the `plan/SourceConn/StorType` response property for the response status `200`
  - …4 more

[Operation history](https://skmtc.dev/sodafoundation/apis/soda-crystal-api/changes/v1/:tenantId/plans/post.md)

---

[API](https://skmtc.dev/sodafoundation/apis/soda-crystal-api.md) - [All operations](https://skmtc.dev/sodafoundation/apis/soda-crystal-api/llms.txt) - [OpenAPI document](https://skmtc.dev/sodafoundation/apis/soda-crystal-api/revisions/c02dd33a522b?raw)
