Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/vim/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Docusignapi 如何检索DocuSign共享模板列表_Docusignapi - Fatal编程技术网

Docusignapi 如何检索DocuSign共享模板列表

Docusignapi 如何检索DocuSign共享模板列表,docusignapi,Docusignapi,我的DocuSign帐户中有2个共享模板。我想检索共享模板的列表。我正在做下面的ajax调用 我收到一个200状态调用,因此调用成功,但DocuSign返回的是HTML而不是JSON var DSTemplateURL = localStorage.getItem("ls_DSurl") + "/v2/accounts/" + localStorage.getItem("ls_DS_accountid") + "/templates?"; var DSData = 'folder=Shared

我的DocuSign帐户中有2个共享模板。我想检索共享模板的列表。我正在做下面的ajax调用

我收到一个200状态调用,因此调用成功,但DocuSign返回的是HTML而不是JSON

var DSTemplateURL = localStorage.getItem("ls_DSurl") + "/v2/accounts/" + localStorage.getItem("ls_DS_accountid") + "/templates?";
var DSData = 'folder=Shared Templates';

request = $.ajax({
    headers: { 'Authorization': 'Bearer ' + localStorage.getItem('ls_DSaccess_token') },
    type: 'GET',
    url: DSTemplateURL,
    data: DSData,
    //dataType: 'json',
    contentType: "application/json",
    cache: false
});
传递查询字符串参数

GET /v2/accounts/{accountId}/templates?user_filter=shared_with_me
以下是用户过滤器参数的可能值

GET /v2/accounts/{accountId}/templates?user_filter=shared_with_me
  • 由我拥有:仅显示用户拥有的模板
  • 与我共享:仅显示与用户共享的模板
  • all:显示用户拥有或共享的所有模板
按如下方式更改代码

var DSTemplateURL = localStorage.getItem("ls_DSurl") + "/v2/accounts/" + localStorage.getItem("ls_DS_accountid") + "/templates?user_filter=shared_with_me";

request = $.ajax({
  headers: { 'Authorization': 'Bearer ' +   localStorage.getItem('ls_DSaccess_token') },
  type: 'GET',
  url: DSTemplateURL,
  //dataType: 'json',
  contentType: "application/json",
  cache: false
});
传递查询字符串参数

GET /v2/accounts/{accountId}/templates?user_filter=shared_with_me
以下是用户过滤器参数的可能值

GET /v2/accounts/{accountId}/templates?user_filter=shared_with_me
  • 由我拥有:仅显示用户拥有的模板
  • 与我共享:仅显示与用户共享的模板
  • all:显示用户拥有或共享的所有模板
按如下方式更改代码

var DSTemplateURL = localStorage.getItem("ls_DSurl") + "/v2/accounts/" + localStorage.getItem("ls_DS_accountid") + "/templates?user_filter=shared_with_me";

request = $.ajax({
  headers: { 'Authorization': 'Bearer ' +   localStorage.getItem('ls_DSaccess_token') },
  type: 'GET',
  url: DSTemplateURL,
  //dataType: 'json',
  contentType: "application/json",
  cache: false
});

我用错了网址。这是错误的ajax代码:我使用了{base uri}/v2/accounts/{accountId}/templates而不是{base uri}/restapi/v2/accounts/{accountId}/templates。上面的代码在使用正确的URL时有效。我使用了错误的URL。这是错误的ajax代码:我使用了{base uri}/v2/accounts/{accountId}/templates而不是{base uri}/restapi/v2/accounts/{accountId}/templates。以上代码在使用正确的URL时有效。