Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
firstline1
titleAcceptHTTP header
linenumberstrue
Accept:application/nova.vnnox.v1+json

...

所有请求均通过HTTPS协议,API请求链接为https://cn.vnnox.com,所有数据的请求及相应均通过json格式。

Request Header

Code Block
firstline1
titleHTTP Request Header
linenumberstrue
Content-Type:application/json;charset=utf-8


Response数据结构

Code Block
firstline1
titledata structure
linenumberstrue
collapsetrue
{
    "http_code": 200,            //http状态码(重要:请使用http协议本身的状态码做异常捕获,response data中http_code字段后期会取消掉)
    "data": {...some data...},   //数据部分
    "status": [10000001]         //业务相关状态码
}

...

如上面的例子,本文档所有涉及{host}均指https://cn.vnnox.com/,建议第三方开发者将com,建议第三方开发者将{host}信息作为可配置项

错误调试
Anchor
cuowu
cuowu

...

Code Block
firstline1
titleRequest HeaderHTTP header
token:5c1354529946bc49360641f7f321611698deb371

...

所有的API请求一般都会包含User-Agent header,例如浏览器会默认设定为`Mozilla/5.0`等,如果第三方应用对接VNNOX REST API,请参数如下设置:API,请参照如下设置:

Code Block
firstline1
titleUser AgentHTTP header
User-Agent: Vnnox-User-App

...