---
title: "增加应用持久化信息(V2.1支持多种类型存储)"
method: POST
path: "/v2/tenants/{tenant_name}/services/{service_alias}/volumes"
tags: ["v2"]
---

# 增加应用持久化信息(V2.1支持多种类型存储)

`POST /v2/tenants/{tenant_name}/services/{service_alias}/volumes`

## Request

- The document declares no server URL.
- Auth: none declared

add volume

## Path parameters

- `tenant_name` string, required
- `service_alias` string, required

## Request body

- object
  - `category` string, required: 类型 "application;app_publish" in: body
  - `volume_name` string, required: 存储名称(同一个应用唯一) in: body
  - `volume_path` string, required: 容器挂载目录 in: body
  - `volume_type` string, required: 存储类型（share,local,tmpfs） in: body

## Response `default`

统一返回格式

- CommandResponse (unresolved $ref)

## Changes

- **2017-11-07** `5e3ca7f5dfc5`: 1 info
  - endpoint added
- **2017-11-07** `7b547fba71aa`: 1 breaking
  - api path removed without deprecation

[Operation history](https://skmtc.dev/goodrain/apis/goodrain-cmd-api/changes/v2/tenants/:tenant_name/services/:service_alias/volumes/post.md)

---

[API](https://skmtc.dev/goodrain/apis/goodrain-cmd-api.md) - [All operations](https://skmtc.dev/goodrain/apis/goodrain-cmd-api/llms.txt) - [OpenAPI document](https://skmtc.dev/goodrain/apis/goodrain-cmd-api/revisions/8c773e222448?raw)
