Chilkat Online Tools

DataFlex / DocuSign eSignature REST API / Reserved: Gets the shared item status for one or more users.

Back to Collection Items

Use ChilkatAx-win32.pkg

Procedure Test
    Handle hoHttp
    Boolean iSuccess
    Variant vQueryParams
    Handle hoQueryParams
    Variant vResp
    Handle hoResp
    String sTemp1
    Integer iTemp1
    Boolean bTemp1

    // This example assumes the Chilkat API to have been previously unlocked.
    // See Global Unlock Sample for sample code.

    Get Create (RefClass(cComChilkatHttp)) To hoHttp
    If (Not(IsComObjectCreated(hoHttp))) Begin
        Send CreateComObject of hoHttp
    End

    Get Create (RefClass(cComChilkatJsonObject)) To hoQueryParams
    If (Not(IsComObjectCreated(hoQueryParams))) Begin
        Send CreateComObject of hoQueryParams
    End
    Get ComUpdateString Of hoQueryParams "count" "{{count}}" To iSuccess
    Get ComUpdateString Of hoQueryParams "envelopes_not_shared_user_status" "{{envelopes_not_shared_user_status}}" To iSuccess
    Get ComUpdateString Of hoQueryParams "folder_ids" "{{folder_ids}}" To iSuccess
    Get ComUpdateString Of hoQueryParams "item_type" "{{item_type}}" To iSuccess
    Get ComUpdateString Of hoQueryParams "search_text" "{{search_text}}" To iSuccess
    Get ComUpdateString Of hoQueryParams "shared" "{{shared}}" To iSuccess
    Get ComUpdateString Of hoQueryParams "start_position" "{{start_position}}" To iSuccess
    Get ComUpdateString Of hoQueryParams "user_ids" "{{user_ids}}" To iSuccess

    // Adds the "Authorization: Bearer {{accessToken}}" header.
    Set ComAuthToken Of hoHttp To "{{accessToken}}"
    Send ComSetRequestHeader To hoHttp "Accept" "application/json"

    Get pvComObject of hoQueryParams to vQueryParams
    Get ComQuickRequestParams Of hoHttp "GET" "https://domain.com/v2.1/accounts/{{accountId}}/shared_access" vQueryParams To vResp
    If (IsComObject(vResp)) Begin
        Get Create (RefClass(cComChilkatHttpResponse)) To hoResp
        Set pvComObject Of hoResp To vResp
    End
    Get ComLastMethodSuccess Of hoHttp To bTemp1
    If (bTemp1 = False) Begin
        Get ComLastErrorText Of hoHttp To sTemp1
        Showln sTemp1
        Procedure_Return
    End

    Get ComStatusCode Of hoResp To iTemp1
    Showln iTemp1
    Get ComBodyStr Of hoResp To sTemp1
    Showln sTemp1
    Send Destroy of hoResp


End_Procedure

Curl Command

curl -G -d "count=%7B%7Bcount%7D%7D"
	-d "envelopes_not_shared_user_status=%7B%7Benvelopes_not_shared_user_status%7D%7D"
	-d "folder_ids=%7B%7Bfolder_ids%7D%7D"
	-d "item_type=%7B%7Bitem_type%7D%7D"
	-d "search_text=%7B%7Bsearch_text%7D%7D"
	-d "shared=%7B%7Bshared%7D%7D"
	-d "start_position=%7B%7Bstart_position%7D%7D"
	-d "user_ids=%7B%7Buser_ids%7D%7D"
	-H "Accept: application/json"
	-H "Authorization: Bearer {{accessToken}}"
https://domain.com/v2.1/accounts/{{accountId}}/shared_access

Postman Collection Item JSON

{
  "name": "Reserved: Gets the shared item status for one or more users.",
  "request": {
    "method": "GET",
    "header": [
      {
        "key": "Accept",
        "value": "application/json"
      },
      {
        "key": "Authorization",
        "value": "Bearer {{accessToken}}"
      }
    ],
    "url": {
      "raw": "{{baseUrl}}/v2.1/accounts/{{accountId}}/shared_access?count={{count}}&envelopes_not_shared_user_status={{envelopes_not_shared_user_status}}&folder_ids={{folder_ids}}&item_type={{item_type}}&search_text={{search_text}}&shared={{shared}}&start_position={{start_position}}&user_ids={{user_ids}}",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "v2.1",
        "accounts",
        "{{accountId}}",
        "shared_access"
      ],
      "query": [
        {
          "key": "count",
          "value": "{{count}}"
        },
        {
          "key": "envelopes_not_shared_user_status",
          "value": "{{envelopes_not_shared_user_status}}"
        },
        {
          "key": "folder_ids",
          "value": "{{folder_ids}}"
        },
        {
          "key": "item_type",
          "value": "{{item_type}}"
        },
        {
          "key": "search_text",
          "value": "{{search_text}}"
        },
        {
          "key": "shared",
          "value": "{{shared}}"
        },
        {
          "key": "start_position",
          "value": "{{start_position}}"
        },
        {
          "key": "user_ids",
          "value": "{{user_ids}}"
        }
      ],
      "variable": [
        {
          "key": "accountId",
          "value": "{{accountId}}",
          "type": "string"
        }
      ]
    },
    "description": "Reserved: Retrieves shared item status for one or more users and types of items.\n\nUsers with account administration privileges can retrieve shared access information for all account users. Users without account administrator privileges can only retrieve shared access information for themselves and the returned information is limited to the retrieving the status of all members of the account that are sharing their folders to the user. This is equivalent to setting the shared=shared_from."
  },
  "response": [
  ]
}