Skip to content
huang wei edited this page Jul 16, 2018 · 14 revisions

目录

授权

  • 1、创建一个ApiApplication,获得appidappsecret

  • 2、获得Namespace的id

  • 3、构建Authorization header

    形式:appid:encoded_data

    encoded_data:以appsecret为key,用JWT的HS256进行加密,加密payload为{"namespace_id":id}

分页

  • 参数
    • per_page 每页多少个,默认24,范围1~100
    • page 页数
  • 接口返回 Header
    • X-SLP-Current-Page: 当前页数
    • X-SLP-Total-Pages: 总页数
    • X-SLP-Total-Count: 总个数
  • 例:GET /api/v4/yaw/flows/:id/journeys?per_page=30&page=3

错误码

Error Code Meaning
403 Unauthorized - 授权失败,参考上方的2种授权方式
404 Not Found - 没有找到请求的资源
422 Unprocessable - 更新资源时,验证失败
500 Internal Server Error - 服务器有问题,请联系我们

Api列表

Clone this wiki locally