美文网首页
无标题文章

无标题文章

作者: jinganchuqi | 来源:发表于2016-04-06 16:24 被阅读0次

    # # 数据保全api文档数据保全api文档

    ##  3.1 获取用户授权令牌

    ###  接口名称:     getUserToken

    ###  接口作用:     获取用户授权令牌

    ###  请求路径:     http://datasecurity.com/api/Auth/getUserToken

    ###  method:    POST

    ###  请求参数:

    | key    | 参数类型 | 是否必须 | 参数解释  |

    | ------ | -------- | -------- | --------- |

    | appKey | string   | 是  | 用户key值 |

    ###  响应参数:

    | key    | 参数类型 | 参数解释  |

    | ------ | -------- |  --------- |

    | appKey | string   | 用户key值 |

    ###  返回数据:

    {

    code: 200,

    message: "成功",

    data: {

    appKey: "549527",

    expirseTime: 1459934437,

    token: "397e977436488b4ebb02851a3bf5ae6530192f0e"

    }

    }

    {

    code: 4005,

    message: "请求超时",

    data: [ ]

    }

    ----------

    ##    3.2数据保全

    ###  接口名称:     doSend

    ###  接口作用:     数据保全

    ###  请求路径:     http://datasecurity.com/api/Auth/doSend

    ###  method:     POST

    ###  请求参数:

    | key    | 参数类型 | 是否必须 | 参数解释  |

    | ------ | -------- | -------- | --------- |

    | appKey | string   | 是  | 用户key值 |

    | token  | string   | 是  | 授权令牌 |

    | fileName   | file   | 是  | 保全文件 |

    ###  响应参数:

    | key    | 参数类型 | 参数解释  |

    | ------ | -------- |  --------- |

    | securitySn | string   | 保全证书编号 |

    | securityExpires | int |  保全证书过期时间戳 |

    | securityTime | int    |保全证书时间戳 |

    ###  返回数据:

    
    

    {

    "code": 200,

    "message": "成功",

    "data": {

    "success": [

    {

    "securityTime": 1459928881,

    "securitySn": "14599288813355491367",

    "securityExpires": 2091080881

    }

    ]

    }

    }

    ----------

    ##    3.3 保全验证

    ###  接口名称:     doVerify

    ###  接口作用:     保全数据验证

    ###  请求路径:     http://datasecurity.com/api/Auth/doVerify

    ###  method:     POST

    ###  请求参数:

    | key    | 参数类型 | 是否必须 | 参数解释  |

    | ------ | -------- | -------- | --------- |

    | appKey | string   | 是  | 用户key值 |

    | token  | string   | 是  | 授权令牌 |

    | certSn  | string   | 是  | 证书编号 |

    | fileName   | file   | 是  | 验证文件 |

    ###  响应参数:

    | key    | 参数类型 | 参数解释  |

    | ------ | -------- |  --------- |

    | result | boolen   | 返回值 true false |

    ###  返回数据:

    
    

    {

    "code": 200,

    "message": "成功",

    "data": {

    "result": false

    }

    }

    ----------

    ##    3.4 获取保全证书详情

    ###  接口名称:     getCert

    ###  接口作用:     获取保全证书详情

    ###  请求路径:     http://datasecurity.com/api/Auth/getCert

    ###  method:     POST

    ###  请求参数:

    | key    | 参数类型 | 是否必须 | 参数解释  |

    | ------ | -------- | -------- | --------- |

    | appKey | string   | 是  | 用户key值 |

    | token  | string   | 是  | 授权令牌 |

    | certSn  | string   | 是  | 证书编号 |

    ###  响应参数:

    | key    | 参数类型 | 参数解释  |

    | ------ | -------- |  --------- |

    | result | boolen   | 返回值 true false |

    ###  返回数据:

    
    

    {

    "code": 200,

    "message": "成功",

    "data": {

    "cert_id": "20",

    "cert_sn": "14593338003986690274",

    "uid": "0",

    "security_user_type": "20",

    "security_user_name": "合同保test",

    "security_user_sn": "522122199202077435",

    "security_sn_type": "10",

    "data_type": "10",

    "data_name": "sms",

    "data_hash": "cb2b18e31d43881206a098fd19737575",

    "data_ext": "html",

    "data_size": "42216",

    "data_path": null,

    "salt": "E8970531G88M475A",

    "platform_hash": "de6a46a7dc0361620e2b2250518df92fda83d2533fbc6d553e5e56321add5b7bc3e9a0f46193bba994673a54b8ff67d056441559e283ae368ec69b6bd9f45440",

    "cert_hash": "2d43a7e74cac6d10d74b8428a7337aaa9b53d942cb2b85e3bea91f38d9e18e05124af595a2a2073b5a9ee333a64cbbb1aad190ff60c47fe057742faf49793047",

    "create_time": "1459333800",

    "expires_time": "2090485800",

    "cert_path": "",

    "pay_state": "20",

    "tpl_type": "10",

    "extras": [

    {

    "auto_id": "111",

    "extra_id": "20",

    "extra_key": "school",

    "extra_val": "测试大学"

    },

    {

    "auto_id": "112",

    "extra_id": "20",

    "extra_key": "profession",

    "extra_val": "测试专业"

    },

    {

    "auto_id": "113",

    "extra_id": "20",

    "extra_key": "student_id",

    "extra_val": "33557799"

    },

    {

    "auto_id": "114",

    "extra_id": "20",

    "extra_key": "unit",

    "extra_val": "测试单位1"

    },

    {

    "auto_id": "115",

    "extra_id": "20",

    "extra_key": "department",

    "extra_val": "测试部门"

    },

    {

    "auto_id": "116",

    "extra_id": "20",

    "extra_key": "position",

    "extra_val": "测试职位2"

    },

    {

    "auto_id": "117",

    "extra_id": "20",

    "extra_key": "address",

    "extra_val": "测试住址"

    },

    {

    "auto_id": "118",

    "extra_id": "20",

    "extra_key": "members",

    "extra_val": "测试成员"

    }

    ]

    }

    }

    ----------

    ##    3.3 根据用户SN返回用户保全证书列表

    ###  接口名称:     getList

    ###  接口作用:     保全数据验证

    ###  请求路径:     http://datasecurity.com/api/Auth/getList

    ###  method:     POST

    ###  请求参数:

    | key    | 参数类型 | 是否必须 | 参数解释  |

    | ------ | -------- | -------- | --------- |

    | appKey | string   | 是  | 用户key值 |

    | token  | string   | 是  | 授权令牌 |

    | userSn  | string   | 是  | 用户保全编号 |

    ###  响应参数:

    | key    | 参数类型 | 参数解释  |

    | ------ | -------- |  --------- |

    | count | int   | 总条数 |

    | list | array   | 返回列表 |

    | cert_sn | string   | 证书编号 |

    | data_name | string | 保全文件名 |

    | data_ext | string | 文件后缀名 |

    | create_time |int | 保全时间 |

    ###  返回数据:

    
    

    {

    "code": 200,

    "message": "成功",

    "data": {

    "count": "7",

    "list": [

    {

    "cert_id": "19",

    "cert_sn": "14593317064372221225",

    "data_name": "web合同状态",

    "data_type": "10",

    "data_ext": "html",

    "create_time": "1459331706",

    "expires_time": "2090483706"

    },

    {

    "cert_id": "20",

    "cert_sn": "14593338003986690274",

    "data_name": "sms",

    "data_type": "10",

    "data_ext": "html",

    "create_time": "1459333800",

    "expires_time": "2090485800"

    },

    {

    "cert_id": "21",

    "cert_sn": "14593343206571147103",

    "data_name": "PhpStorm",

    "data_type": "10",

    "data_ext": "rar",

    "create_time": "1459334320",

    "expires_time": "2090486320"

    },

    {

    "cert_id": "22",

    "cert_sn": "14593917592071977532",

    "data_name": "un",

    "data_type": "10",

    "data_ext": "sql",

    "create_time": "1459391759",

    "expires_time": "2090543759"

    },

    {

    "cert_id": "24",

    "cert_sn": "14594176574214814213",

    "data_name": "new  3",

    "data_type": "10",

    "data_ext": "phpa",

    "create_time": "1459417657",

    "expires_time": "2090569657"

    },

    {

    "cert_id": "25",

    "cert_sn": "14594178012357076099",

    "data_name": "user-dir/notify_url",

    "data_type": "10",

    "data_ext": "php",

    "create_time": "1459417801",

    "expires_time": "2090569801"

    },

    {

    "cert_id": "26",

    "cert_sn": "14599288813355491367",

    "data_name": "new  3",

    "data_type": "10",

    "data_ext": "php",

    "create_time": "1459928881",

    "expires_time": "2091080881"

    }

    ],

    "page": "

        "

    }

    }

    相关文章

      网友评论

          本文标题:无标题文章

          本文链接:https://www.haomeiwen.com/subject/zdlmlttx.html