Create a new project snippet
POST
/v3/projects/{id}/snippetsCreate a new project snippet
请求参数
Path 参数
id
string
必需
The ID of a project
Body 参数application/x-www-form-urlencoded
title
string
必需
The title of the snippet
file_name
string
必需
The file name of the snippet
code
string
必需
The content of the snippet
visibility_level
enum<integer> <int32>
必需
The visibility level of the snippet
枚举值:
01020
示例代码
返回响应
成功(201)
HTTP 状态码: 201
内容格式: JSONapplication/json
Create a new project snippet
数据结构
Update an existing project snippet
id
string
可选
title
string
可选
file_name
string
可选
author
object (UserBasic)
可选
Get a single user
name
string
可选
username
string
可选
id
string
可选
state
string
可选
avatar_url
string
可选
web_url
string
可选
updated_at
string
可选
created_at
string
可选
expires_at
string
可选
web_url
string
可选
示例
{
"id": "string",
"title": "string",
"file_name": "string",
"author": {
"name": "string",
"username": "string",
"id": "string",
"state": "string",
"avatar_url": "string",
"web_url": "string"
},
"updated_at": "string",
"created_at": "string",
"expires_at": "string",
"web_url": "string"
}
最后修改时间: 1 个月前