演示链接: https://arkie-ai.github.io/scenario/
-
域名前缀(
endpoint):https://api.arkie.cn
请求
-
{{endpoint}}/v1/scenario/:id -
GET -
参数 必须 类型 说明 id √ string 场景ID
-
Content-Type
application/json; charset=utf-8 -
数据结构
参数 类型 说明 id string 场景ID name string 场景名称 inputsarray 场景可输入内容集合 createdAt string 场景创建时间 updatedAt string 场景�最后一次更新时间 inputs : [ TextInput | ImageInput ]参数 类型 说明 id string 输入ID type string 输入类型 label string 输入提示 placeholder string 默认输入内容 text string 内容 groupId string 所属输入类别ID groupName string 所属输入类别名称 参数 类型 说明 id string 输入ID type string 输入类型 label string 输入提示 url string 图片地址 groupId string 所属输入类别ID groupName string 所属输入类别名称 -
响应码
-
200成功返回场景数据 -
404找不到指定的场景
-
返回样例
{
"data": {
"id": "Scenario26dd7999-eb19-4940-9b33-6091f12d67e6",
"name": "demo",
"inputs": [
{
"id": "55e8ff47-05bc-4caf-84e0-2d39d14b9771",
"label": "标题",
"type": "text",
"groupId": "cb8d744b-87c8-489e-b034-776c4982e7bd",
"groupName": "ATF信息",
"placeholder": "标题",
"text": ""
},
{
"id": "51b808a7-57c7-4b25-ba5c-1acfd062858e",
"label": "副标题",
"type": "text",
"groupId": "cb8d744b-87c8-489e-b034-776c4982e7bd",
"groupName": "ATF信息",
"placeholder": "副标题",
"text": ""
},
{
"id": "eb1d571c-660e-483c-8947-da6eda741df1",
"label": "LOGO",
"type": "image",
"groupId": "cb8d744b-87c8-489e-b034-776c4982e7bd",
"groupName": "ATF信息",
"url": ""
}
]
},
"errors": []
}
请求
-
{{endpoint}}/v1/poster/:id -
GET -
参数 必须 类型 说明 id √ string 海报ID
-
Content-Type
application/json; charset=utf-8 -
数据结构
参数 类型 说明 idstring 海报ID templateIdstring 海报所属模版ID scenarioIdstring 海报所属场景ID ownerstring 海报所属用户ID inputsarray 海报可输入内容集合 sizeobject 海报尺寸 urlstring 海报图片地址 createdAtstring 海报创建时间 updatedAtstring 海报�最后一次更新时间 inputs �: [ TextInput | ImageInput ]参数 类型 说明 idstring 输入ID typestring 输入类型 labelstring 输入提示 placeholderstring 默认输入内容 textstring 内容 groupIdstring 所属输入类别ID groupNamestring 所属输入类别名称 参数 类型 说明 idstring 输入ID typestring 输入类型 labelstring 输入提示 urlstring 图片地址 groupIdstring 所属输入类别ID groupNamestring 所属输入类别名称 参数 类型 说明 widthnumber 宽 heightnumber 高 �unitstring 尺寸单位 �unit �: px | mm | cm -
响应码
-
200成功返回海报数据 -
404找不到指定的海报
-
返回样例
暂无
请求
-
{{endpoint}}/v1/poster -
POST -
参数 必须 类型 说明 scenarioId√ string 场景ID templateIdarray 模版ID inputs√ array 输入集合 如果未指定
templateId�系统自动匹配模版生成海报inputs �: [ TextInput | ImageInput ]参数 必须 类型 说明 id√ string 输入ID type√ string 输入类型 text√ string 输入内容 id type值由场景数据�的inputs获取, 不可更改参数 必须 类型 说明 id√ string 输入ID type√ string 输入类型 url√ string 图片地址 id type值由场景数据�的inputs获取, 不可更改
-
Content-Type
application/json; charset=utf-8 -
数据结构
参数 类型 说明 idstring 海报ID templateIdstring 海报所属模版ID scenarioIdstring 海报所属场景ID ownerstring 海报所属用户ID inputsarray 海报可输入内容集合 sizeobject 海报尺寸 urlstring 海报图片地址 createdAtstring 海报创建时间 updatedAtstring 海报�最后一次更新时间 inputs �: [ TextInput | ImageInput ]参数 类型 说明 idstring 输入ID typestring 输入类型 labelstring 输入提示 placeholderstring 默认输入内容 textstring 内容 groupIdstring 所属输入类别ID groupNamestring 所属输入类别名称 参数 类型 说明 idstring 输入ID typestring 输入类型 labelstring 输入提示 urlstring 图片地址 groupIdstring 所属输入类别ID groupNamestring 所属输入类别名称 参数 类型 说明 widthnumber 宽 heightnumber 高 �unitstring 尺寸单位 �unit �: px | mm | cm -
响应码
-
200成功返回海报数据 -
400错误的请求参数 -
404找不到指定的海报
-
返回样例
暂无
请求
-
{{endpoint}}/v1/poster/:id -
PUT -
参数 必须 类型 说明 inputs√ array 输入集合 inputs �: [ TextInput | ImageInput ]参数 必须 类型 说明 id√ string 输入ID type√ string 输入类型 text√ string 输入内容 id name type值由场景数据�的inputs获取, 不可更改参数 必须 类型 说明 id√ string 输入ID type√ string 输入类型 url√ string 图片地址 id type值由场景数据�的inputs获取, 不可更改
-
Content-Type
application/json; charset=utf-8 -
数据结构
参数 类型 说明 idstring 海报ID templateIdstring 海报所属模版ID scenarioIdstring 海报所属场景ID ownerstring 海报所属用户ID inputsarray 海报可输入内容集合 sizeobject 海报尺寸 urlstring 海报图片地址 createdAtstring 海报创建时间 updatedAtstring 海报�最后一次更新时间 inputs �: [ TextInput | ImageInput ]参数 类型 说明 idstring 输入ID typestring 输入类型 labelstring 输入提示 placeholderstring 默认输入内容 textstring 内容 groupIdstring 所属输入类别ID groupNamestring 所属输入类别名称 参数 类型 说明 idstring 输入ID typestring 输入类型 labelstring 输入提示 urlstring 图片地址 groupIdstring 所属输入类别ID groupNamestring 所属输入类别名称 参数 类型 说明 widthnumber 宽 heightnumber 高 �unitstring 尺寸单位 �unit �: px | mm | cm -
响应码
-
200成功返回海报数据 -
400错误的请求参数 -
404找不到指定的海报
-
返回样例
暂无
请求
-
{{endpoint}}/v1/poster/:id -
DELETE -
无参数
-
Content-Type
application/json; charset=utf-8 -
数据结构
空
-
响应码
-
204成功返回海报数据 -
404找不到指定的海报
-
返回样例
请求
-
{{endpoint}}/v1/image -
GET -
参数 必须 类型 说明 keyword √ string 关键词,关键词之间用空格隔开 skip number 指定�搜索记录的开始位置 limit number 返回的图片数目
-
Content-Type
application/json; charset=utf-8 -
数据结构
参数 类型 说明 limit number 返回的图片数目 skip number 搜索记录的开始位置 resultarray 图片集合 count number 符合搜索的图片总数 result �: [ �Image ]参数 类型 说明 id string 图片ID width number 图片宽度 height number 图片高度 aspect number 图片比例 previewUrl string 预览图地址 url string 图片地址 -
响应码
200成功返回场景数据
返回样例
{
"data": {
"result": [
{
"id": "5a75c59fc9d4c416af28a700",
"aspect": 1.5,
"width": 960,
"height": 640,
"url": "http://resource.arkie.cn/resource/image/pixabay/type/3_evening-sky-335969_960_720.jpg",
"previewUrl": "http://resource.arkie.cn/resource/image/pixabay/type/3_evening-sky-335969_960_720.jpg?x-oss-process=image/resize,w_300"
},
{
"id": "5a75c59fc9d4c416af28a70e",
"aspect": 1.8532818532818534,
"width": 960,
"height": 518,
"url": "http://resource.arkie.cn/resource/image/pixabay/type/3_buildings-1846728_960_720.jpg",
"previewUrl": "http://resource.arkie.cn/resource/image/pixabay/type/3_buildings-1846728_960_720.jpg?x-oss-process=image/resize,w_300"
},
{
"id": "5a75c59fc9d4c416af28a752",
"aspect": 1.3351877607788596,
"width": 960,
"height": 719,
"url": "http://resource.arkie.cn/resource/image/pixabay/type/4_mar-922253_960_720.jpg",
"previewUrl": "http://resource.arkie.cn/resource/image/pixabay/type/4_mar-922253_960_720.jpg?x-oss-process=image/resize,w_300"
}
],
"count": 12702,
"skip": 0,
"limit": 3
},
"errors": []
}
请求
-
{{endpoint}}/v1/image/upload -
POST -
参数 必须 类型 说明 name √ string 图片名称 minetype √ string 文件类型 dataUrl √ string 图片base64文件格式
-
Content-Type
application/json; charset=utf-8 -
数据结构
参数 类型 说明 fileFile 图片��上传信息 参数 类型 说明 filenamestring 图片名称 mimetypestring 图片格式 urlstring 图片地址
返回样例
{
"data": [
{
"filename": "demo.jpg",
"mimetype": "image/jpeg",
"url": "https://arkie-public.oss-cn-hangzhou.aliyuncs.com/resources/eeaad45f-1ba3-4065-93ba-91289fee3c0c.jpg"
}
],
"errors": []
}