全部产品
云市场

Appserver趣视频接口文档

更新时间:2019-07-01 10:30:35

简介

视频点播接口主要包括:凭证类,User,视频类,资源,回调通知类等。

返回值结构说明

所有请求均返回此JSON格式的数据,所有API只描述[data]结构数据。

result bool 操作是否成功
requestId string 服务端生成的本次请求ID
code string 服务端生成的本次请求code
message string 服务端消息多用于描述错误原因
data object 服务端返回的业务结构体数据,不同业务数据结构不同

凭证类

getSTS

通过token获取sts权限。

method get
url /vod/getSts
param
名称 类型 是否必需 描述
token string token
return param
名称 类型 描述
expiration string 上传授权过期时间,视频为3000秒,过期需要刷新上传凭证
accessKeyId string 上传授权密钥ID
accessKeySecret string 上传授权密钥
securityToken string 上传授权密钥

返回示例:

  1. {
  2. "result": "true",
  3. "requestId": "c17f13d1-4ce8-407f-a82b-c4799f84xxx",
  4. "message": "",
  5. "code": "200",
  6. "data": {
  7. "Expiration": "2018-12-28T08:26:13Z",
  8. "accessKeyId": "<yourAccessKeyId>",
  9. "securityToken": "CAIS9QF1q6Ft5B2yfSjIr4jhLujii5gV1LfYSBfj0UxhOPZNhrbNqTz2IHxFfnloBuwfvvw+lG5U6/cYlqFtTJMAX0vAYJP1A1OgZkfzDbDasumZsJY86vT8a0vxZjf/2MjNGZKbKPrWZvaqbX3diyZ32sGUXD6+XlujQ/Lr5IBgYoZVJEDaCwBLH9BLPABvhdYHPH/KT5aXPwXtn3DbATgF2GE0yytdkf3mmpbFtkaD1wamkLFO99rLT8L6P5U2DvBWSMyo2eF6TK3F3RNL5gJCnKUM1/AVo2ef4Y3EUwEAs0vabruO6L1xKwM8fK8+Fr7+RSREIHzq0xqAAZzSIQzyi/0dmEAJpmiUciXfX6sSSCYD/3NaNxLFG+mrImN+NjnAaR38cuXV50y/4WLc18RBmW9LmQ+fXd/DroAZRWXyFgIOp3KS8rR/YyOh2ghihCoLBjhyrIgaCsRUZTu2egpBx/B/nZu4fIwp9/NoMQ4kXzIcKlNNDMwFbNRr",
  10. "accessKeySecret": "<yourAccessKeySecret>"
  11. }
  12. }

getVideoUploadAuth

传入token,标题和视频文件名等信息获取视频上传凭证。

method get
url /vod/getVideoUploadAuth
param
名称 类型 是否必需 描述
token string token
title string 视频标题,长度不超过128个字节,UTF8编码
fileName string 视频源文件名, 必须带扩展名,且扩展名不区分大小写, 支持的扩展名参见上传概述的限制部分
fileSize string 视频文件大小,单位:字节
description string 视频描述
coverURL string 自定义视频封面URL地址
tags string 视频标签,多个标签用逗号分隔
return param
名称 类型 描述
videoId string 视频ID
uploadAddress string 上传地址
uploadAuth string 上传凭证

返回示例:

  1. {
  2. "result": "true",
  3. "requestId": "1490ee0b-3660-4d4c-be1b-9e1d4aadxxxx",
  4. "message": "",
  5. "code": "200",
  6. "data": {
  7. "videoId": "034813ff97984171a57aefe71c84xxxx",
  8. "uploadAddress": "eyJFbmRwb2ludCI6Imh0dHBzOi8vb3NzLWNuLXNoYW5naGFpLmFsaXl1bmNzLmNvbSIsIkJ1Y2tldCI6Im91dGluLTEyZWJlMDFmMDI5ZDExZTliNjMzMDAxNjNlMWM4ZGJhIiwiRmlsZU5hbWUiOiJzdi8yYzc1NzhkNy0xNjdmM2I3YTg4NS8yYzc1NzhkNy0xNjdmM2I3YTg4NS5tcDQifQ==",
  9. "uploadAuth": "eyJTZWN1cml0eVRva2VuIjoiQ0FJUzBBUjFxNkZ0NUIyeWZTaklyNGorR3RQZ283eDBnNWFxVVZQQnZuQmpYZjFvdXZMSWhUejJJSGxQZTNGaEFPb2V2L2svbVc5VTdmb2NsclVxRXNjZUhCQ1lNSkFyc3M0SnFsUC9KcGZadjh1ODRZQURpNUNqUWJkVjJlbHNtSjI4V2Y3d2FmK0FVQlhHQ1RtZDVNTVlvOWJUY1RHbFFDWnVXLy90b0pWN2I5TVJjeENsWkQ1ZGZybC9MUmRqcjhsbzF4R3pVUEcyS1V6U24zYjNCa2hsc1JZZTcyUms4dmFIeGRhQXpSRGNnVmJtcUpjU3ZKK2pDNEM4WXM5Z0c1MTlYdHlwdm9weGJiR1Q4Q05a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tleVNlY3JldCI6IkdZTlZBbXJBQnE1VVNWWW5YbWI1QmlVeEZvQ2ZVYXpTQUw0dTRaMzFDRDVSIiwiRXhwaXJhdGlvbiI6IjM2MDAiLCJSZWdpb24iOiJjbi1zaGFuZ2hhaSJ9"
  10. }
  11. }

refreshVideoUploadAuth

刷新视频凭证。

method get
url /vod/refreshVideoUploadAuth
param
名称 类型 是否必需 描述
token string token
videoId string 视频id
return param
名称 类型 描述
uploadAddress string 上传地址
uploadAuth string 上传凭证

返回示例:

  1. {
  2. "result": "true",
  3. "requestId": "efe66931-2a98-4bd9-9c46-e3a92eeexxxx",
  4. "message": "",
  5. "code": "200",
  6. "data": {
  7. "uploadAddress": "eyJFbmRwb2ludCI6Imh0dHBzOi8vb3NzLWNuLXNoYW5naGFpLmFsaXl1bmNzLmNvbSIsIkJ1Y2tldCI6Im91dGluLTEyZWJlMDFmMDI5ZDExZTliNjMzMDAxNjNlMWM4ZGJhIiwiRmlsZU5hbWUiOiJzdi8yYzc1NzhkNy0xNjdmM2I3YTg4NS8yYzc1NzhkNy0xNjdmM2I3YTg4NS5tcDQifQ==",
  8. "uploadAuth": "eyJTZWN1cml0eVRva2VuIjoiQ0FJUzBBUjFxNkZ0NUIyeWZTaklyNGorR3RQZ283eDBnNWFxVVZQQnZuQmpYZjFvdXZMSWhUejJJSGxQZTNGaEFPb2V2L2svbVc5VTdmb2NsclVxRXNjZUhCQ1lNSkFyc3M0SnFsUC9KcGZadjh1ODRZQURpNUNqUWJkVjJlbHNtSjI4V2Y3d2FmK0FVQlhHQ1RtZDVNTVlvOWJUY1RHbFFDWnVXLy90b0pWN2I5TVJjeENsWkQ1ZGZybC9MUmRqcjhsbzF4R3pVUEcyS1V6U24zYjNCa2hsc1JZZTcyUms4dmFIeGRhQXpSRGNnVmJtcUpjU3ZKK2pDNEM4WXM5Z0c1MTlYdHlwdm9weGJiR1Q4Q05aNXo5QTlxcDlrTTQ5L2l6YzdQNlFIMzViNFJpTkw4L1o3dFFOWH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2ZVYXpTQUw0dTRaMzFDRDVSIiwiRXhwaXJhdGlvbiI6IjM1NDEiLCJSZWdpb24iOiJjbi1zaGFuZ2hhaSJ9"
  9. }
  10. }

getImageUploadAuth

传入token,图片类型等信息获取图片上传凭证。

method get
url /vod/getImageUploadAuth
param
名称 类型 是否必需 描述
token string token
imageType string 图片类型,default(默 认)cover(封面)
imageExt string 图片文件扩展名,默认值:png
title string 图片标题
tags string 图片标签,多个标签用逗号分隔
return param
名称 类型 描述
uploadAddress string 上传地址
uploadAuth string 上传凭证
imageURL string 图片地址
imageId string 图片ID

返回示例:

  1. {
  2. "result": "true",
  3. "requestId": "c9fc9bf0-b172-441c-9624-2b700204xxxx",
  4. "message": "",
  5. "code": "200",
  6. "data": {
  7. "uploadAddress": "eyJFbmRwb2ludCI6Imh0dHBzOi8vb3NzLWNuLXNoYW5naGFpLmFsaXl1bmNzLmNvbSIsIkJ1Y2tldCI6Im91dGluLTEyZWJlMDFmMDI5ZDExZTliNjMzMDAxNjNlMWM4ZGJhIiwiRmlsZU5hbWUiOiJpbWFnZS9jb3Zlci84RUI3MDMxODhGOUQ0OTIwQjZFM0ExREREQjc5N0I1MC02LTIuanBnIn0=",
  8. "uploadAuth": "eyJTZWN1cml0eVRva2VuIjoiQ0FJUzB3UjFxNkZ0NUIyeWZTaklyNG4rUHNEdHF1a1pnSWl2TUczcHNWSUVQOHRJM29uamhUejJJSGxQZTNGaEFPb2V2L2svbVc5VTdmb2NsclVxRXNjZUhCQ1lNSkFyc3M0SnFsUC9KcGZadjh1ODRZQURpNUNqUVljejU5WnNtSjI4V2Y3d2FmK0FVQkxHQ1RtZDVNQVlvOWJUY1RHbFFDWnVXLy90b0pWN2I5TVJjeENsWkQ1ZGZybC9MUmRqcjhsbzF4R3pVUEcyS1V6U24zYjNCa2hsc1JZZTcyUms4dmFIeGRhQXpSRGNnVmJtcUpjU3ZKK2pDNEM4WXM5Z0c1MTlYdHlwdm9weGJiR1Q4Q05aNXo5QTlxcDlrTT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TZWNyZXQiOiJIMWlkWUFucXFQaDNIQWs1dFpDaUJjRzJpQTdRSm1pM01pM25OQjc4Z3ZkVCIsIkV4cGlyYXRpb24iOiIzNTY2IiwiUmVnaW9uIjoiY24tc2hhbmdoYWkifQ==",
  9. "imageId": "76ac9d24882544e7a2b94758d34bceac",
  10. "imageURL": "https://outin-12ebe01f029d11e9b63300163e1c8dba.oss-cn-shanghai.aliyuncs.com/image/cover/8EB703188F9D4920B6E3A1DDDB797B50-6-2.jpg?Expires=1545987008&OSSAccessKeyId=XXXXXXX&Signature=cb6kwDuABBH%2FUDk7qviXy0MC2mE%3D"
  11. }
  12. }

凭证类(无token)

getSTS

获取sts权限。

method get
url /demo/getSts
param
return param
名称 类型 描述
expiration string 上传授权过期时间,视频为3000秒,过期需要刷新上传凭证
accessKeyId string 上传授权密钥ID
accessKeySecret string 上传授权密钥
securityToken string 上传授权密钥

返回示例:

  1. {
  2. "result": "true",
  3. "requestId": "c17f13d1-4ce8-407f-a82b-c4799f84xxxx",
  4. "message": "",
  5. "code": "200",
  6. "data": {
  7. "Expiration": "2018-12-28T08:26:13Z",
  8. "accessKeyId": "<yourAccessKeyId>",
  9. "securityToken": "CAIS9QF1q6Ft5B2yfSjIr4jhLujii5gV1LfYSBfj0UxhOPZNhrbNqTz2IHxFfnloBuwfvvw+lG5U6/cYlqFtTJMAX0vAYJP1A1OgZkfzDbDasumZsJY86vT8a0vxZjf/2MjNGZKbKPrWZvaqbX3diyZ32sGUXD6+XlujQ/Lr5IBgYoZVJEDaCwBLH9BLPABvhdYHPH/KT5aXPwXtn3DbATgF2GE0yytdkf3mmpbFtkaD1wamkLFO99rLT8L6P5U2DvBWSMyo2eF6TK3F3RNL5gJCnKUM1/AVo2ef4Y3EUwEAs0vabruO6L1xKwM8fK8+Fr7+RSREIHzq0xqAAZzSIQzyi/0dmEAJpmiUciXfX6sSSCYD/3NaNxLFG+mrImN+NjnAaR38cuXV50y/4WLc18RBmW9LmQ+fXd/DroAZRWXyFgIOp3KS8rR/YyOh2ghihCoLBjhyrIgaCsRUZTu2egpBx/B/nZu4fIwp9/NoMQ4kXzIcKlNNDMwFbNRr",
  10. "accessKeySecret": "<yourAccessKeySecret>"
  11. }
  12. }

getVideoUploadAuth

传入标题和视频文件名等信息获取视频上传凭证。

method get
url /demo/getVideoUploadAuth
param
名称 类型 是否必需 描述
title string 视频标题
fileName string 视频源文件名
fileSize string 视频文件大小,单位:字节
description string 视频描述
coverURL string 自定义视频封面URL地址
tags string 视频标签,多个标签用逗号分隔
return param
名称 类型 描述
videoId string 视频ID
uploadAddress string 上传地址
uploadAuth string 上传凭证

返回示例:

  1. {
  2. "result": "true",
  3. "requestId": "1490ee0b-3660-4d4c-be1b-9e1d4aadxxxx",
  4. "message": "",
  5. "code": "200",
  6. "data": {
  7. "videoId": "034813ff97984171a57aefe71c84xxxx",
  8. "uploadAddress": "eyJFbmRwb2ludCI6Imh0dHBzOi8vb3NzLWNuLXNoYW5naGFpLmFsaXl1bmNzLmNvbSIsIkJ1Y2tldCI6Im91dGluLTEyZWJlMDFmMDI5ZDExZTliNjMzMDAxNjNlMWM4ZGJhIiwiRmlsZU5hbWUiOiJzdi8yYzc1NzhkNy0xNjdmM2I3YTg4NS8yYzc1NzhkNy0xNjdmM2I3YTg4NS5tcDQifQ==",
  9. "uploadAuth": "eyJTZWN1cml0eVRva2VuIjoiQ0FJUzBBUjFxNkZ0NUIyeWZTaklyNGorR3RQZ283eDBnNWFxVVZQQnZuQmpYZjFvdXZMSWhUejJJSGxQZTNGaEFPb2V2L2svbVc5VTdmb2NsclVxRXNjZUhCQ1lNSkFyc3M0SnFsUC9KcGZadjh1ODRZQURpNUNqUWJkVjJlbHNtSjI4V2Y3d2FmK0FVQlhHQ1RtZDVNTVlvOWJUY1RHbFFDWnVXLy90b0pWN2I5TVJjeENsWkQ1ZGZybC9MUmRqcjhsbzF4R3pVUEcyS1V6U24zYjNCa2hsc1JZZTcyUms4dmFIeGRhQXpSRGNnVmJtcUpjU3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iOiIyMDE4LTEyLTI4VDA4OjI5OjE5WiIsIkFjY2Vzc0tleVNlY3JldCI6IkdZTlZBbXJBQnE1VVNWWW5YbWI1QmlVeEZvQ2ZVYXpTQUw0dTRaMzFDRDVSIiwiRXhwaXJhdGlvbiI6IjM2MDAiLCJSZWdpb24iOiJjbi1zaGFuZ2hhaSJ9"
  10. }
  11. }

refreshVideoUploadAuth

刷新视频凭证。

method get
url /demo/refreshVideoUploadAuth
param
名称 类型 是否必需 描述
videoId string 视频id
return param
名称 类型 描述
uploadAddress string 上传地址
uploadAuth string 上传凭证

返回示例:

  1. {
  2. "result": "true",
  3. "requestId": "efe66931-2a98-4bd9-9c46-e3a92eeexxxx",
  4. "message": "",
  5. "code": "200",
  6. "data": {
  7. "uploadAddress": "eyJFbmRwb2ludCI6Imh0dHBzOi8vb3NzLWNuLXNoYW5naGFpLmFsaXl1bmNzLmNvbSIsIkJ1Y2tldCI6Im91dGluLTEyZWJlMDFmMDI5ZDExZTliNjMzMDAxNjNlMWM4ZGJhIiwiRmlsZU5hbWUiOiJzdi8yYzc1NzhkNy0xNjdmM2I3YTg4NS8yYzc1NzhkNy0xNjdmM2I3YTg4NS5tcDQifQ==",
  8. "uploadAuth": "eyJTZWN1cml0eVRva2VuIjoiQ0FJUzBBUjFxNkZ0NUIyeWZTaklyNGorR3RQZ283eDBnNWFxVVZQQnZuQmpYZjFvdXZMSWhUejJJSGxQZTNGaEFPb2V2L2svbVc5VTdmb2NsclVxRXNjZUhCQ1lNSkFyc3M0SnFsUC9KcGZadjh1ODRZQURpNUNqUWJkVjJlbHNtSjI4V2Y3d2FmK0FVQlhHQ1RtZDVNTVlvOWJUY1RHbFFDWnVXLy90b0pWN2I5TVJjeENsWkQ1ZGZybC9MUmRqcjhsbzF4R3pVUEcyS1V6U24zYjNCa2hsc1JZZTcyUms4dmFIeGRhQXpSRGNnVmJtcUpjU3ZKK2pDNEM4WXM5Z0c1MTlYdHlwdm9weGJiR1Q4Q05aNXo5QTlxcD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I6IkdZTlZBbXJBQnE1VVNWWW5YbWI1QmlVeEZvQ2ZVYXpTQUw0dTRaMzFDRDVSIiwiRXhwaXJhdGlvbiI6IjM1NDEiLCJSZWdpb24iOiJjbi1zaGFuZ2hhaSJ9"
  9. }
  10. }

getVideoPlayAuth

获取视频播放凭证。

method get
url /demo/getVideoPlayAuth
param
名称 类型 是否必需 描述
videoId string 视频id
return param
名称 类型 描述
coverURL string 封面地址
duration string 视频大小
videoId string 视频id
playAuth string 播放凭证

返回示例:

  1. {
  2. "result": "true",
  3. "requestId": "b766e688-1fee-4635-9ed8-e86529d8xxxx",
  4. "message": "",
  5. "code": "200",
  6. "data": {
  7. "coverURL": "https://alivc-demo-vod.aliyuncs.com/5ef00e3c0ef24547a6dcff851be0b6ab/snapshots/a02dfc16dfab48a6ae27529edc906cd7-00002.jpg",
  8. "duration": "10.4167",
  9. "videoId": "5ef00e3c0ef24547a6dcff851be0xxxx",
  10. "playAuth": "eyJTZWN1cml0eVRva2VuIjoiQ0FJUzN3SjFxNkZ0NUIyeWZTaklyNG41SDhueGhvd1MrN2UvTkczNm9EZzJTczF1bUpidWxqejJJSGxQZTNGaEFPb2V2L2svbVc5VTdmb2Nsck1xRXNjZUhCQ1lNSkFyc3M0SnFsUC9KcExGc3QySjZyOEpqc1ZHeEpkTDVsdXBzdlhKYXNEVkVma3VFNVhFTWlJNS8wMGU2TC8rY2lyWVhEN0JHSmFWaUpsaFE4MEtWdzJqRjFSdkQ4dFhJUTBRazYxOUszemRaOW1nTGlidWkzdnhDa1J2MkhCaWptOHR4cW1qL015UTV4MzFpMXYweStCM3dZSHRPY3FjYThCOU1ZMVdUc3Uxdm9oemFyR1Q2Q3BaK2psTStxQVU2cWxZNG1YcnM5cUhFa0ZOd0JpWFNaMjJsT2RpTndoa2ZLTTNOcmRacGZ6bjc1MUN0L2ZVaXA3OHhtUW1YNGdYY1Z5R0d0RHhrWk9aUXJ6emJZNWhLK2lnQVJtWGpJRFRiS3VTbWhnL2ZIY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kIjoiU1RTLk5KTFRzRWtTM0x1VDZLS0Q4Y0ZCQndTRXQiLCJQbGF5RG9tYWluIjoiYWxpdmMtZGVtby12b2QuYWxpeXVuY3MuY29tIiwiQWNjZXNzS2V5U2VjcmV0IjoiOXcyNVlDeXVyblpxM2YyN3ZBQTNxZVJhYWZVSzhvVTFuUXN2aGJ3UUhVR0giLCJSZWdpb24iOiJjbi1zaGFuZ2hhaSIsIkN1c3RvbWVySWQiOjExMDMxNDQ1MzM0MjYzODZ9"
  11. }
  12. }

getImageUploadAuth

传入图片类型等信息获取图片上传凭证。

method get
url /demo/getImageUploadAuth
param
名称 类型 是否必需 描述
imageType string 图片类型,default(默 认)cover(封面)
imageExt string 图片文件扩展名,默认值:png
title string 图片标题
tags string 图片标签,多个标签用逗号分隔
return param
名称 类型 描述
uploadAddress string 上传地址
uploadAuth string 上传凭证
imageURL string 图片地址
imageId string 图片ID

返回示例:

  1. {
  2. "result": "true",
  3. "requestId": "c9fc9bf0-b172-441c-9624-2b700204xxxx",
  4. "message": "",
  5. "code": "200",
  6. "data": {
  7. "uploadAddress": "eyJFbmRwb2ludCI6Imh0dHBzOi8vb3NzLWNuLXNoYW5naGFpLmFsaXl1bmNzLmNvbSIsIkJ1Y2tldCI6Im91dGluLTEyZWJlMDFmMDI5ZDExZTliNjMzMDAxNjNlMWM4ZGJhIiwiRmlsZU5hbWUiOiJpbWFnZS9jb3Zlci84RUI3MDMxODhGOUQ0OTIwQjZFM0ExREREQjc5N0I1MC02LTIuanBnIn0=",
  8. "uploadAuth": "eyJTZWN1cml0eVRva2VuIjoiQ0FJUzB3UjFxNkZ0NUIyeWZTaklyNG4rUHNEdHF1a1pnSWl2TUczcHNWSUVQOHRJM29uamhUejJJSGxQZTNGaEFPb2V2L2svbVc5VTdmb2NsclVxRXNjZUhCQ1lNSkFyc3M0SnFsUC9KcGZadjh1ODRZQURpNUNqUVljejU5WnNtSjI4V2Y3d2FmK0FVQkxHQ1RtZDVNQVlvOWJUY1RHbF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JUUM1aVZ5T2l3K0dORGxscmlUREwvV1BXQkVMSVFBPSIsIkFjY2Vzc0tleUlkIjoiU1RTLk5KS3V6WUc2ODdKRDJLWFVSUTNEZDFMSGciLCJFeHBpcmVVVENUaW1lIjoiMjAxOC0xMi0yOFQwODo0OTozNFoiLCJBY2Nlc3NLZXlTZWNyZXQiOiJIMWlkWUFucXFQaDNIQWs1dFpDaUJjRzJpQTdRSm1pM01pM25OQjc4Z3ZkVCIsIkV4cGlyYXRpb24iOiIzNTY2IiwiUmVnaW9uIjoiY24tc2hhbmdoYWkifQ==",
  9. "imageId": "76ac9d24882544e7a2b94758d34bxxxx",
  10. "imageURL": "https://outin-12ebe01f029d11e9b63300163e1c8dba.oss-cn-shanghai.aliyuncs.com/image/cover/8EB703188F9D4920B6E3A1DDDB797B50-6-2.jpg?Expires=1545987008&OSSAccessKeyId=XXXXXXXX&Signature=cb6kwDuABBH%2FUDk7qviXy0MC2mE%3D"
  11. }
  12. }

User

login

用户登陆。

method get
url /user/login
param
名称 类型 是否必需 描述
username string 用户名
password string 密码
return param
名称 类型 描述
token string token

返回示例:

  1. {
  2. "result":"true",
  3. "code":"200",
  4. "requestId":"ad5ce518-aafd-47ef-bd42-36a809a1xxxx",
  5. "message":null,
  6. "data":{}
  7. }
  8. }

register

用户注册。

method get
url /user/register
param
名称 类型 是否必需 描述
username string 用户名
password string 密码
return param

返回示例:

  1. {
  2. "result":"true",
  3. "code":"200",
  4. "requestId":"ad5ce518-aafd-47ef-bd42-36a809a1xxxx",
  5. "message":null,
  6. "data":{}
  7. }
  8. }

updateUser

修改用户名。

method post
url /user/updateUser
param
名称 类型 是否必需 描述
token string token
userId string 用户id
nickname string 用户昵称
return param

返回示例:

  1. {
  2. "result":"true",
  3. "code":"200",
  4. "requestId":"ad5ce518-aafd-47ef-bd42-36a809a1xxxx",
  5. "message":null,
  6. "data":{}
  7. }
  8. }

randomUser

生成随机用户,包括:用户ID、token、用户昵称、用户头像、推流地址、flv播放地址和hls播放地址。

method get
url /user/randomUser
param
return param userId string 用户ID
token string token
nickName string 用户昵称
avatar string 用户头像
gmtCreate string 创建时间
gmtModified string 修改时间

返回示例:

  1. {
  2. "result":"true",
  3. "requestId":"d5b1f423-0186-41d0-bf20-98606472xxxx",
  4. "message":null,
  5. "data":{
  6. "id":"37",
  7. "userId":"243124930xxxx",
  8. "token":"234fwef23-fsdf4f7-ahjktghsrt65ujs87rukmslsgbfxlry91",
  9. "nickName":"8313e974-f6a8-4527-af6e-8b4c3a4f1xxxx",
  10. "gmtCreate":"2018-11-16 15:40:18",
  11. "gmtModified":""
  12. }
  13. }

视频类

videoPublish

视频发布(向后台插入上传的视频,届时个人中心能够查看发布的视频)。

method post
url /vod/videoPublish
param
名称 类型 是否必需 描述
token string token
title string 视频标题
videoId string 视频id
description string 视频描述
duration float 视频时长(秒)
coverUrl string 视频封面URL
size int 视频源文件大小(字节)
tags string 视频标签,多个标签用逗号分隔
cateId int 视频分类
cateName string 视频分类名称
return param

返回示例:

  1. {
  2. "result":"true",
  3. "code":"200",
  4. "requestId":"ad5ce518-aafd-47ef-bd42-36a809a1xxxx",
  5. "message":null,
  6. "data":{}
  7. }
  8. }

getRecommendVideoList

获取推荐视频。

method get
url /vod/getRecommendVideoList
param
名称 类型 是否必需 描述
token string token
pageIndex int 起始页
pageSize int 每页条数
return param
名称 类型 描述
total string 视频总条数
videoList List<Video> 视频信息列表

Video

名称 类型 描述
title string 视频标题
videoId string 视频id
description string 视频描述
duration string 视频时长(秒)
coverUrl string 视频封面URL
status string 视频状态
firstFrameUrl string 首帧地址
size string 视频源文件大小(字节)
tags string 视频标签,多个标签用逗号分隔
cateId string 视频分类
cateName string 视频分类名称
creationTime string 创建时间
transcodeStatus string 转码状态
snapshotStatus string 截图状态
censorStatus string 审核状态
narrowTranscodeStatus string 窄带高清转码状态
fileUrl string 播放地址
user User 用户

User

名称 类型 描述
userId string 用户id
userName string 用户名
avatarUrl string 头像url

返回示例:

  1. {
  2. "result": "true",
  3. "requestId": "27596e99-0083-4701-80b5-90969f55xxxx",
  4. "message": "",
  5. "code": "200",
  6. "data": {
  7. "total": 59,
  8. "videoList": [
  9. {
  10. "id": "110",
  11. "videoId": "a34f34e0fc744d00a5269e8a7c6a60c7",
  12. "title": "热气球",
  13. "description": "热气球",
  14. "duration": 7,
  15. "coverUrl": "https://alivc-demo-vod.aliyuncs.com/a34f34e0fc744d00a5269e8a7c6a60c7/snapshots/0c3a4b0e8f37494f83202d6e6bb83ecc-00001.jpg",
  16. "creationTime": "",
  17. "status": "1",
  18. "firstFrameUrl": "https://alivc-demo-vod.aliyuncs.com/a34f34e0fc744d00a5269e8a7c6a60c7/snapshots/0c3a4b0e8f37494f83202d6e6bb83ecc-00001.jpg",
  19. "size": 389938,
  20. "cateId": 1,
  21. "cateName": "推荐列表",
  22. "tags": "热气球",
  23. "shareUrl": "",
  24. "user": {
  25. "userId": "2435470766044",
  26. "userName": "",
  27. "avatarUrl": ""
  28. },
  29. "transcodeStatus": "",
  30. "snapshotStatus": "",
  31. "censorStatus": "",
  32. "narrowTranscodeStatus": "",
  33. "fileUrl": "https://alivc-demo-vod.aliyuncs.com/a34f34e0fc744d00a5269e8a7c6a60c7/02528a756dd04693dc3c44d68b1bcf28-fd.mp4"
  34. },
  35. {
  36. "id": "109",
  37. "videoId": "febc0388fab9491d8199bdad1958b756",
  38. "title": "沙滩椅",
  39. "description": "沙滩椅",
  40. "duration": 16,
  41. "coverUrl": "https://alivc-demo-vod.aliyuncs.com/febc0388fab9491d8199bdad1958b756/snapshots/6b6ad9bfc80d4bc49f96e6111cbffd02-00002.jpg",
  42. "creationTime": "",
  43. "status": "1",
  44. "firstFrameUrl": "https://alivc-demo-vod.aliyuncs.com/febc0388fab9491d8199bdad1958b756/snapshots/6b6ad9bfc80d4bc49f96e6111cbffd02-00002.jpg",
  45. "size": 2763135,
  46. "cateId": 1,
  47. "cateName": "推荐列表",
  48. "tags": "沙滩椅",
  49. "shareUrl": "",
  50. "user": {
  51. "userId": "243547076xxxx",
  52. "userName": "",
  53. "avatarUrl": ""
  54. },
  55. "transcodeStatus": "",
  56. "snapshotStatus": "",
  57. "censorStatus": "",
  58. "narrowTranscodeStatus": "",
  59. "fileUrl": "https://alivc-demo-vod.aliyuncs.com/a34f34e0fc744d00a5269e8a7c6a60c7/02528a756dd04693dc3c44d68b1bcf28-fd.mp4"
  60. }
  61. ]
  62. }
  63. }

getPersonalVideoList

获取个人中心视频。

method get
url /vod/getPersonalVideoList
param
名称 类型 是否必需 描述
token string token
pageIndex int 起始页 (从1开始)
pageSize int 每页条数
return param
名称 类型 描述
total string 视频总条数
videoList List<Video> 个人中心视频信息列表

Video

名称 类型 描述
title string 视频标题
videoId string 视频id
description string 视频描述
duration string 视频时长(秒)
coverUrl string 视频封面URL
status string 视频状态
firstFrameUrl string 首帧地址
size string 视频源文件大小(字节)
tags string 视频标签.多个用逗号分隔
cateId string 视频分类
cateName string 视频分类名称
creationTime string 创建时间
transcodeStatus string 转码状态
snapshotStatus string 截图状态
censorStatus string 审核状态
narrowTranscodeStatus string 窄带高清转码状态
user User 用户

User

名称 类型 描述
userId string 用户id
userName string 用户名
avatarUrl string 头像url

返回示例:

  1. {
  2. "result": "true",
  3. "requestId": "c3bcb60d-e85f-4e19-a50a-16bedb56xxxx",
  4. "message": "",
  5. "code": "200",
  6. "data": {
  7. "total": 7,
  8. "videoList": [
  9. {
  10. "id": "25",
  11. "videoId": "23rfewc23",
  12. "title": "test video",
  13. "description": "test33",
  14. "duration": 12,
  15. "coverUrl": "https://alivc-demo-vod.aliyuncs.com/image9sfsa0-dfcoverurl.png",
  16. "creationTime": "2019-01-09 22:11:29.0",
  17. "status": "",
  18. "firstFrameUrl": "",
  19. "size": 56,
  20. "cateId": 12,
  21. "cateName": "12",
  22. "tags": "测试",
  23. "shareUrl": "",
  24. "user": {
  25. "userId": "243479322xxxx",
  26. "userName": "xx",
  27. "avatarUrl": "https://alivc-demo-vod.aliyuncs.com/dd38cab5-2951-43a0-b9ed-ad0eebf83a70"
  28. },
  29. "transcodeStatus": "",
  30. "snapshotStatus": "",
  31. "censorStatus": "onCensor",
  32. "narrowTranscodeStatus": ""
  33. }
  34. ]
  35. }
  36. }

deleteVideoById

删除视频。

method post
url /vod/deleteVideoById
param
名称 类型 是否必需 描述
token string token
videoId string 视频id
userId string 用户id
return param
名称 类型 描述

返回示例:

  1. {
  2. "result": "true",
  3. "requestId": "f8163b40-6192-4edc-97ec-52c6cd96xxxx",
  4. "message": "删除完成",
  5. "code": "200",
  6. "data":null
  7. }

通知回调类

智能审核完成回调,视频转码完成回调,截图完成回调

通过提交智能审核作业,视频转码作业,截图作业后,在控制台配置回调设置,并在服务端用回调方法接收控制台传递过来的请求头的参数,回调内容公共参数及对应事件类型如下。

名称 类型 描述
EventTime string 事件产生时间, 为UTC时间:yyyy-MM-ddTHH:mm:ssZ
EventType string 事件类型
VideoId string 视频ID
Status string 处理状态,取值:success(成功),fail(失败)

EventType

事件类型 EventType
StreamTranscodeComplete 视频单个清晰度转码完成
SnapshotComplete 视频截图完成
AIVideoCensorComplete 智能审核完成

当一个事件完成,会携带数据请求回调,数据类型服务端接收到请求,更新数据库。

音乐类

获取音乐列表

获取热门音乐。

method get
url /music/getRecommendMusic
param
名称 类型 是否必需 描述
pageNo string 起始页,值范围[1,50]
pageSize string 每页条数,值范围[1,50]
return param
名称 类型 描述
total string 视频总条数
musicList List<MusicInfo> 歌曲信息列表

MusicInfo

名称 类型 描述
musicId string 歌曲id(唯一标识)
title string 歌曲显示名称
artistName string 艺术家名称
duration string 时长
source string 来源(暂时由的是太合(TaiHe)的资源)

返回示例:

  1. {
  2. "result": "true",
  3. "requestId": "56a393dc-b1f9-4641-b998-6a7ff40dxxxx",
  4. "message": "",
  5. "code": "200",
  6. "data": {
  7. "musicList": [
  8. {
  9. "musicId": "T10033153675",
  10. "title": "超感应",
  11. "artistName": "N.O.D",
  12. "duration": "219",
  13. "source": "TaiHe"
  14. },
  15. {
  16. "musicId": "T10033153447",
  17. "title": "Candybae",
  18. "artistName": "N.O.D",
  19. "duration": "200",
  20. "source": "TaiHe"
  21. },
  22. {
  23. "musicId": "T10033153645",
  24. "title": "Ring Ring Ring",
  25. "artistName": "N.O.D",
  26. "duration": "208",
  27. "source": "TaiHe"
  28. }
  29. ],
  30. "total": "40"
  31. }
  32. }

根据音乐id查询播放地址

根据音乐id查询播放地址。

method get
url /music/getPlayPath
param
名称 类型 是否必需 描述
musicId string 音乐id
return param
名称 类型 描述
playPath string 播放路径
expireTime string 有效期

返回示例:

  1. {
  2. "result": "true",
  3. "requestId": "56a393dc-b1f9-4641-b998-6a7ff40dxxxx",
  4. "message": "",
  5. "code": "200",
  6. "data": {
  7. "playPath": "https://audio01.dmhmusic.com/117_15_T10033153675_64_4_1_0_sdk-ts/0105/M00/B2/F4/ChR45VnaKfaAK01QABrJJdrL4Yk.64.aac?xcode=af09abf9f9e26b644165614d13a46776755f023",
  8. "expireTime": "1551772473"
  9. }

资源类

获取动图类别信息

method get
url /resource/getPasterInfo
param
名称 类型 是否必需 描述
return param
名称 类型 描述
id int id
icon string 图标
description string 描述
level int 等级
name string 名称
preview string 预览
sort int 排列序号
type int 类型
createTime string 创建时间

返回示例:

  1. {
  2. "result": "true",
  3. "requestId": "cc52d16b-3c1d-4694-abf1-c0633ddaxxxx",
  4. "message": "",
  5. "code": "200",
  6. "data": [
  7. {
  8. "id": 84,
  9. "icon": "http://alivc-demo-vod.aliyuncs.com/image/default/85157CBE88A14CBC95C5216F3D0579D1-6-2.png",
  10. "description": "情人节动图",
  11. "name": "最美情人节",
  12. "level": 1,
  13. "preview": "http://30.40.34.91:8080/?id=84",
  14. "sort": 46,
  15. "type": 1,
  16. "createTime": "2019-03-19 14:32:38.0"
  17. },
  18. {
  19. "id": 108,
  20. "icon": "http://alivc-demo-vod.aliyuncs.com/image/default/44F675192F144BDA9B2A324F7664911E-6-2.png",
  21. "description": "新年素材",
  22. "name": "2017春节快乐2",
  23. "level": 1,
  24. "preview": "http://30.40.34.91:8080/?id=108",
  25. "sort": 45,
  26. "type": 1,
  27. "createTime": "2019-03-19 14:32:18.0"
  28. }
  29. ...
  30. ]
  31. }

根据动图类别id查找动图包信息

method get
url /resource/getPasterList
param
名称 类型 是否必需 描述
pasterId string 动图类别id
type string 动图类型(1:前置动图,2:后置动图)
return param
名称 类型 描述
id string id
fontId int 字体id
icon string 图标
name string 名称
url string 下载路径
preview string 预览图
sort int 排列序号
type int 类型
createTime string 创建时间

返回示例:

  1. {
  2. "result": "true",
  3. "requestId": "395f0d19-7f3d-4df3-ac56-e7715e4fxxxx",
  4. "message": "",
  5. "code": "200",
  6. "data": [
  7. {
  8. "id": 1083,
  9. "icon": "http://alivc-demo-vod.aliyuncs.com/image/default/145F371646EB4CA595A7BD6C43F0EA9E-6-2.jpg",
  10. "url": "http://alivc-demo-vod.aliyuncs.com/video/material/9862890CE93C4248B8B1F6F2C96E4289-7-4.mat",
  11. "preview": "http://alivc-demo-vod.aliyuncs.com/image/default/12044FD09B6C432B874A925952F526F2-6-2.gif",
  12. "name": "bianpao",
  13. "sort": 0,
  14. "type": 0,
  15. "fontId": 0,
  16. "createTime": "2019-03-19 14:32:18.0"
  17. },
  18. {
  19. "id": 1092,
  20. "icon": "http://alivc-demo-vod.aliyuncs.com/image/default/F78BDD275CE84186A67730BC93BF23ED-6-2.jpg",
  21. "url": "http://alivc-demo-vod.aliyuncs.com/video/material/ABE3DAE450C3482896BA5AEAE8C82283-7-4.mat",
  22. "preview": "http://alivc-demo-vod.aliyuncs.com/image/default/4154C9D2FE3A4B4191A58357F1C403C6-6-2.gif",
  23. "name": "zhaofudamo",
  24. "sort": 0,
  25. "type": 0,
  26. "fontId": 0,
  27. "createTime": "2019-03-19 14:32:19.0"
  28. }
  29. ...
  30. ]
  31. }

查询前置动图包

method get
url /resource/getFrontPasterList
param
名称 类型 是否必需 描述
return param
名称 类型 描述
id int id
fontId string 字体id
icon string 图标
name string 名称
url string 下载路径
preview string 预览
sort string 排列序号
type string 类型
createTime string 创建时间

返回示例:

  1. {
  2. "result": "true",
  3. "requestId": "0423771c-ad6b-4557-9ef1-ce71fcb0xxxx",
  4. "message": "",
  5. "code": "200",
  6. "data": [
  7. {
  8. "id": 5871,
  9. "icon": "http://alivc-demo-vod.aliyuncs.com/image/default/EFA0567FF6CE4E6D866A25D909DE05C3-6-2.jpg",
  10. "mediaId": 0,
  11. "url": "http://alivc-demo-vod.aliyuncs.com/video/material/BD74BC09CB3341169F319727340B78CF-7-4.mat",
  12. "preview": "http://alivc-demo-vod.aliyuncs.com/image/default/2A768BDC4D024366BCCBFF950C2B3051-6-2.gif",
  13. "name": "bixin",
  14. "duration": 0,
  15. "desc": "",
  16. "sort": 0,
  17. "aspect": 0,
  18. "type": 0,
  19. "fontId": 0,
  20. "createTime": "2019-03-19 14:32:45.0"
  21. },
  22. {
  23. "id": 5872,
  24. "icon": "http://alivc-demo-vod.aliyuncs.com/image/default/497006AE17DB46FA9DAFE6B5405D9576-6-2.jpg",
  25. "mediaId": 0,
  26. "url": "http://alivc-demo-vod.aliyuncs.com/video/material/7E3079293ACE44A48271E1D6CB07D217-7-4.mat",
  27. "preview": "http://alivc-demo-vod.aliyuncs.com/image/default/E6567EDDD03540C7931980928CA12E05-6-2.gif",
  28. "name": "gaobai",
  29. "duration": 0,
  30. "desc": "",
  31. "sort": 0,
  32. "aspect": 0,
  33. "type": 0,
  34. "fontId": 0,
  35. "createTime": "2019-03-19 14:32:46.0"
  36. },
  37. {
  38. "id": 5873,
  39. "icon": "http://alivc-demo-vod.aliyuncs.com/image/default/CB1BB92B7BCB44E28AA50F26C96D0109-6-2.jpg",
  40. "mediaId": 0,
  41. "url": "http://alivc-demo-vod.aliyuncs.com/video/material/A5EBA7E610D84265B53539964EFD89C4-7-4.mat",
  42. "preview": "http://alivc-demo-vod.aliyuncs.com/image/default/E1BF246F042A4A30A0E7F41673316BD7-6-2.gif",
  43. "name": "liwune",
  44. "duration": 0,
  45. "desc": "",
  46. "sort": 0,
  47. "aspect": 0,
  48. "type": 0,
  49. "fontId": 0,
  50. "createTime": "2019-03-19 14:32:48.0"
  51. }
  52. ...
  53. ]
  54. }

字幕类别信息

method get
url /resource/getTextPaster
param
名称 类型 是否必需 描述
return param
名称 类型 描述
id int id
icon string 图标
description string 描述
name string 名称
preview string 预览
sort int 排列序号
type int 类型
createTime string 创建时间

返回示例:

  1. {
  2. "result": "true",
  3. "requestId": "23b4de5e-0b89-40f0-b78c-d4122537xxxx",
  4. "message": "",
  5. "code": "200",
  6. "data": [
  7. {
  8. "id": 189,
  9. "icon": "http://alivc-demo-vod.aliyuncs.com/image/default/BB11DAF8ED0842408A4A04F09893D454-6-2.png",
  10. "description": "气泡框",
  11. "name": "气泡框",
  12. "preview": "http://30.40.34.91:8080/?type=text&id=189",
  13. "sort": 3,
  14. "type": 2,
  15. "createTime": "2019-03-19 14:21:58.0"
  16. },
  17. {
  18. "id": 196,
  19. "icon": "http://alivc-demo-vod.aliyuncs.com/image/default/7858EDE1DCD8457E976BCAB42FB9845D-6-2.png",
  20. "description": "简洁气泡框",
  21. "name": "简单气泡",
  22. "preview": "http://30.40.34.91:8080/?type=text&id=196",
  23. "sort": 2,
  24. "type": 2,
  25. "createTime": "2019-03-19 14:21:42.0"
  26. }
  27. ...
  28. ]
  29. }

根据字幕类别id查找字幕包信息

method get
url /resource/getTextPasterList
param
名称 类型 是否必需 描述
textPasterId String 字幕id
return param
名称 类型 描述
id int id
fontId int 字体id
icon string 图标
name string 名称
url string 下载路径
preview string 预览
sort int 排列序号
type int 类型
createTime string 创建时间

返回示例:

  1. {
  2. "result": "true",
  3. "requestId": "49ec9fc0-d2e2-4702-afe3-a1fadda7xxxx",
  4. "message": "",
  5. "code": "200",
  6. "data": [
  7. {
  8. "id": 963,
  9. "icon": "http://alivc-demo-vod.aliyuncs.com/image/default/4326259B143E4D5EB979CFE2D021608D-6-2.jpg",
  10. "mediaId": 1849,
  11. "url": "http://alivc-demo-vod.aliyuncs.com/video/material/599ED868D7DC405BB3EE093FFCFEF576-7-4.mat",
  12. "preview": "http://alivc-demo-vod.aliyuncs.com/image/default/B43F76D23D58401C9ABD90AD3C623BAC-6-2.gif",
  13. "name": "beiers",
  14. "duration": 0,
  15. "desc": "",
  16. "sort": 0,
  17. "type": 0,
  18. "fontId": 52,
  19. "createTime": "2019-03-19 14:21:42.0"
  20. },
  21. {
  22. "id": 964,
  23. "icon": "http://alivc-demo-vod.aliyuncs.com/image/default/1148257C961547848690C275B860B340-6-2.jpg",
  24. "mediaId": 1862,
  25. "url": "http://alivc-demo-vod.aliyuncs.com/video/material/15CD1557EAAC49B1BA2FD3C30236A657-7-4.mat",
  26. "preview": "http://alivc-demo-vod.aliyuncs.com/image/default/79DB242DD30446AC91DC74EAC3384271-6-2.gif",
  27. "name": "yajing",
  28. "duration": 0,
  29. "desc": "",
  30. "sort": 0,
  31. "type": 0,
  32. "fontId": 89,
  33. "createTime": "2019-03-19 14:21:43.0"
  34. }
  35. ...
  36. ]
  37. }

查找mv信息

method get
url /resource/getMv
param
名称 类型 是否必需 描述
return param
名称 类型 描述
id int id
icon string 图标
duration string 时长
name string 名称
previewPic string 播放预览图
previewMp4 string 播放链接
sort int 排列序号
createTime string 创建时间
aspectList List<Aspect> mv列表

Aspect

名称 类型 描述
aspect string 比例( 1:(1:1),2:(4:3),3:(16:9))
download string 下载地址

返回示例:

  1. {
  2. "result": "true",
  3. "requestId": "3dae0e53-39ff-4376-bc8d-e94c3380xxxx",
  4. "message": "",
  5. "code": "200",
  6. "data": [
  7. {
  8. "id": 104,
  9. "previewPic": "http://alivc-demo-vod.aliyuncs.com/image/default/FB35E16CC72C4B85AF6C776EB8034947-6-2.png",
  10. "previewMp4": "http://alivc-demo-vod.aliyuncs.com/video/material/EC8C09EB055248B1A1DD8803D08D4D16-7-4.mp4",
  11. "icon": "http://alivc-demo-vod.aliyuncs.com/image/default/DFB64DE1892B4DEAA34F01D594D5AE81-6-2.png",
  12. "duration": 15,
  13. "name": "relax",
  14. "sort": 8,
  15. "createTime": "2019-03-19 14:21:21.0",
  16. "aspectList": [
  17. {
  18. "aspect": 1,
  19. "download": "http://alivc-demo-vod.aliyuncs.com/video/material/14FF3D3297CF442A9A3E160C5F191752-7-4.mat"
  20. },
  21. {
  22. "aspect": 2,
  23. "download": "http://alivc-demo-vod.aliyuncs.com/video/material/53CC516C4B3A49CABD0B13A093CABCCE-7-4.mat"
  24. },
  25. {
  26. "aspect": 3,
  27. "download": "http://alivc-demo-vod.aliyuncs.com/video/material/CB7444406A0B4249A80897EFF6E40B8B-7-4.mat"
  28. }
  29. ]
  30. }
  31. ...
  32. ]
  33. }

字体

根据字体id获取字体信息。

method get
url /resource/getFont
param
名称 类型 是否必需 描述
fontId string 字体id(不传则查出全部)
return param
id int id
banner string 标语
name string 名称
url string 下载路径
icon string 图标
sort int 排列序号

返回示例:

  1. {
  2. "result": "true",
  3. "requestId": "b9c72eb4-9d42-4fda-934c-23c60493xxxx",
  4. "message": "",
  5. "code": "200",
  6. "data": {
  7. "id": 52,
  8. "name": "趣.憧憬",
  9. "banner": "http://alivc-demo-vod.aliyuncs.com/image/default/BD4E71CE644043019E89A5737A79AC51-6-2.jpg",
  10. "icon": "http://alivc-demo-vod.aliyuncs.com/image/default/C1F83D29D3B64C3C87CF7E3BDEF3B08F-6-2.jpg",
  11. "url": "http://alivc-demo-vod.aliyuncs.com/video/material/B12F02D94A184481A9DE629ECFCD8C0D-7-4.mat",
  12. "sort": 1
  13. }
  14. }