You need to enable JavaScript to run this app.
文档中心
文档控制台
注册
智能视联

智能视联

复制全文
下载 pdf
空间管理
CreateSpace - 创建空间
复制全文
下载 pdf
CreateSpace - 创建空间

创建空间。

请求说明

  • 请求方式:POST
  • 请求地址:https://open.volcengineapi.com?Action=CreateSpace&Version=2021-01-01

调试

请求参数

下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数

Query

const columns = [
  {
    width: '20%',
    title: '参数',
    dataIndex: 'Name',
    className: 'openapi-doc-parameter-table-name'
  },
  {
    width: 130,
    title: '类型',
    dataIndex: 'DataType',
    className: 'openapi-doc-parameter-table-type'
  },
  {
    width: 90,
    title: '是否必填',
    dataIndex: 'IsRequired',
    className: 'openapi-doc-parameter-table-required'
  },
  {
    width: '20%',
    title: '示例值',
    dataIndex: 'Example',
    className: 'openapi-doc-parameter-table-example'
  },
  {
    title: '描述',
    dataIndex: 'Description',
    className: 'openapi-doc-parameter-table-description'
  },
];

const queryData = [
  {
    rowKey: '->Action',
    Name: 'Action',
    DataType: 'String',
    IsRequired: '是',
    Example: <RenderMd content={"CreateSpace"} />,
    Description: <RenderMd content={"要执行的操作,取值:CreateSpace。"} />,
    children: [
    ]
  },
  {
    rowKey: '->Version',
    Name: 'Version',
    DataType: 'String',
    IsRequired: '是',
    Example: <RenderMd content={"2021-01-01"} />,
    Description: <RenderMd content={"API的版本,取值:2021-01-01。"} />,
    children: [
    ]
  },
];

return (<Table
  rowKey="rowKey"
  className="openapi-doc-parameter-table"
  columns={columns}
  data={queryData}
  border={ { cell: true, wrapper: true } }
  scroll={ { x: "auto" } }
  pagination={false}
/>);

Body

const columns = [
  {
    width: '20%',
    title: '参数',
    dataIndex: 'Name',
    className: 'openapi-doc-parameter-table-name'
  },
  {
    width: 130,
    title: '类型',
    dataIndex: 'DataType',
    className: 'openapi-doc-parameter-table-type'
  },
  {
    width: 90,
    title: '是否必填',
    dataIndex: 'IsRequired',
    className: 'openapi-doc-parameter-table-required'
  },
  {
    width: '20%',
    title: '示例值',
    dataIndex: 'Example',
    className: 'openapi-doc-parameter-table-example'
  },
  {
    title: '描述',
    dataIndex: 'Description',
    className: 'openapi-doc-parameter-table-description'
  },
];

const bodyData = [
  {
    rowKey: '->ProjectName',
    Name: 'ProjectName',
    DataType: 'String',
    IsRequired: '否',
    Example: <RenderMd content={"default"} />,
    Description: <RenderMd content={"项目名称"} />,
    children: [
    ]
  },
  {
    rowKey: '->Tags',
    Name: 'Tags',
    DataType: 'Array of Object',
    IsRequired: '否',
    Example: <RenderMd content={"[]"} />,
    Description: <RenderMd content={"tags绑定参数"} />,
    children: [
        {
          rowKey: '->Tags->Key',
          Name: 'Key',
          DataType: 'String',
          IsRequired: '是',
          Example: <RenderMd content={""} />,
          Description: <RenderMd content={"key"} />,
          children: [
          ]
        },
        {
          rowKey: '->Tags->Value',
          Name: 'Value',
          DataType: 'String',
          IsRequired: '是',
          Example: <RenderMd content={""} />,
          Description: <RenderMd content={"value"} />,
          children: [
          ]
        },
    ]
  },
  {
    rowKey: '->SpaceName',
    Name: 'SpaceName',
    DataType: 'String',
    IsRequired: '是',
    Example: <RenderMd content={"spacename"} />,
    Description: <RenderMd content={"空间名称"} />,
    children: [
    ]
  },
  {
    rowKey: '->Description',
    Name: 'Description',
    DataType: 'String',
    IsRequired: '否',
    Example: <RenderMd content={"descrption"} />,
    Description: <RenderMd content={"空间描述"} />,
    children: [
    ]
  },
  {
    rowKey: '->Region',
    Name: 'Region',
    DataType: 'String',
    IsRequired: '是',
    Example: <RenderMd content={"cn-beijing-a"} />,
    Description: <RenderMd content={"服务区域,可选枚举值:\n\n- cn-beijing-a(华北2-北京)"} />,
    children: [
    ]
  },
  {
    rowKey: '->AccessType',
    Name: 'AccessType',
    DataType: 'String',
    IsRequired: '是',
    Example: <RenderMd content={"rtmp"} />,
    Description: <RenderMd content={"接入类型,可选枚举值:\n- rtmp \n- gb28181 \n- rtmp-forward"} />,
    children: [
    ]
  },
  {
    rowKey: '->GB',
    Name: 'GB',
    DataType: 'Object',
    IsRequired: '否',
    Example: <RenderMd content={"-"} />,
    Description: <RenderMd content={"该空间使用 GB 协议接入设备,参考以下 GB 数据结构说明"} />,
    children: [
        {
          rowKey: '->GB->PullOnDemand',
          Name: 'PullOnDemand',
          DataType: 'Boolean',
          IsRequired: '是',
          Example: <RenderMd content={"true"} />,
          Description: <RenderMd content={"是否开启按需拉流:\n\n- true:开启\n- false:关闭\n\t按需拉流说明:用户在一段时间(约3~5分钟)内不使用视频流时,会将视频流断开,并将流状态置为stopped;再次观看时,需要启用视频流"} />,
          children: [
          ]
        },
    ]
  },
  {
    rowKey: '->HLSLowLatency',
    Name: 'HLSLowLatency',
    DataType: 'Boolean',
    IsRequired: '否',
    Example: <RenderMd content={"false"} />,
    Description: <RenderMd content={"是否开启 HLS 低延迟,默认为 false"} />,
    children: [
    ]
  },
  {
    rowKey: '->CallbackURL',
    Name: 'CallbackURL',
    DataType: 'String',
    IsRequired: '否',
    Example: <RenderMd content={"http://callback_host/callback"} />,
    Description: <RenderMd content={"回调地址"} />,
    children: [
    ]
  },
];

return (<Table
  rowKey="rowKey"
  className="openapi-doc-parameter-table"
  columns={columns}
  data={bodyData}
  border={ { cell: true, wrapper: true } }
  scroll={ { x: "auto" } }
  pagination={false}
/>);

返回参数

下表仅列出本接口特有的返回参数。更多信息请参见返回结构

const columns = [
  {
    width: '25%',
    title: '参数',
    dataIndex: 'Name',
    className: 'openapi-doc-parameter-table-name',
  },
  {
    width: 130,
    title: '类型',
    dataIndex: 'DataType',
    className: 'openapi-doc-parameter-table-type'
  },
  {
    width: '25%',
    title: '示例值',
    dataIndex: 'Example',
    className: 'openapi-doc-parameter-table-example'
  },
  {
    title: '描述',
    dataIndex: 'Description',
    className: 'openapi-doc-parameter-table-description'
  },
];

const data = [
  {
    rowKey: "->ID",
    Name: "ID",
    DataType: "String",
    Example: <RenderMd content={"spaceuuidxxxxx"} />,
    Description: <RenderMd content={"创建成功的空间 ID<br>"} />,
    children: [
    ]
  },
];

return (<Table
  rowKey="rowKey"
  className="openapi-doc-parameter-table"
  columns={columns}
  data={data}
  border={ { cell: true, wrapper: true } }
  scroll={ { x: "auto" } }
  pagination={false}
/>);

请求示例

POST https://open.volcengineapi.com?Action=CreateSpace&Version=2021-01-01
{
    "SpaceName": "MySpace",
    "Description": "Sample Space",
    "Region": "cn-beijing-a",
    "AccessType": "gb28181",
    "GB": {
        "PullOnDemand": true
    },
    "HLSLowLatency": true,
    "CallbackURL": "url"
}

返回示例

{
    "ResponseMetadata": {
        "RequestId": "202112081002370102121980161E010387",
        "Action": "CreateSpace",
        "Version": "2021-01-01",
        "Service": "aiotvideo",
        "Region": "cn-north-1"
    },
    "Result": {
        "ID": "2db38a3a-2a9d-4bf7-afd9-7cdc13xxxxxx"
    }
}

错误码

下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。

const columns = [
  {
    title: '状态码',
    dataIndex: 'HttpCode',
    width: '12%',
    className: 'openapi-doc-errorcode-table-httpcode'
  },
  {
    title: '错误码',
    dataIndex: 'ErrorCode',
    width: '22%',
    className: 'openapi-doc-errorcode-table-errorcode'
  },
  {
    title: '错误信息',
    dataIndex: 'ErrorMessage',
    width: '33%',
    className: 'openapi-doc-errorcode-table-errormessage'
  },
  {
    title: '说明',
    dataIndex: 'Description',
    width: '33%',
    className: 'openapi-doc-errorcode-table-description'
  },
];

const data = [
  {
    HttpCode: 400,
    ErrorCode: 'MissingParameter',
    ErrorMessage: <RenderMd content={"The required parameter %s is missing."} />,
    Description: <RenderMd content={""} />,
  },
  {
    HttpCode: 400,
    ErrorCode: 'InvalidParameter',
    ErrorMessage: <RenderMd content={"The specified parameter %s is invalid."} />,
    Description: <RenderMd content={""} />,
  },
  {
    HttpCode: 400,
    ErrorCode: 'OperationDenied',
    ErrorMessage: <RenderMd content={"Operation is denied because the specified resource is in use."} />,
    Description: <RenderMd content={""} />,
  },
];

return (<Table
  columns={columns}
  data={data}
  border={ { cell: true, wrapper: true } }
  scroll={ { x: "auto" } }
  pagination={false}
/>);
最近更新时间:2026.07.08 19:43:36
这个页面对您有帮助吗?
有用
有用
无用
无用