PureBasic / DocuSign REST API / Gets the specified Cloud Storage Provider configuration for the User.
        
        Back to Collection Items
        IncludeFile "CkJsonObject.pb"
IncludeFile "CkHttp.pb"
IncludeFile "CkHttpResponse.pb"
Procedure ChilkatExample()
    ; This example assumes the Chilkat API to have been previously unlocked.
    ; See Global Unlock Sample for sample code.
    http.i = CkHttp::ckCreate()
    If http.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf
    success.i
    queryParams.i = CkJsonObject::ckCreate()
    If queryParams.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf
    CkJsonObject::ckUpdateString(queryParams,"redirectUrl","{{redirectUrl}}")
    ; Adds the "Authorization: Bearer {{accessToken}}" header.
    CkHttp::setCkAuthToken(http, "{{accessToken}}")
    CkHttp::ckSetRequestHeader(http,"Accept","application/json")
    resp.i = CkHttpResponse::ckCreate()
    If resp.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf
    success = CkHttp::ckHttpParams(http,"GET","https://domain.com/v2.1/accounts/{{accountId}}/users/{{userId}}/cloud_storage/{{serviceId}}",queryParams,resp)
    If success = 0
        Debug CkHttp::ckLastErrorText(http)
        CkHttp::ckDispose(http)
        CkJsonObject::ckDispose(queryParams)
        CkHttpResponse::ckDispose(resp)
        ProcedureReturn
    EndIf
    Debug Str(CkHttpResponse::ckStatusCode(resp))
    Debug CkHttpResponse::ckBodyStr(resp)
    CkHttp::ckDispose(http)
    CkJsonObject::ckDispose(queryParams)
    CkHttpResponse::ckDispose(resp)
    ProcedureReturn
EndProcedure
        Curl Command
        curl -G -d "redirectUrl=%7B%7BredirectUrl%7D%7D"
	-H "Accept: application/json"
	-H "Authorization: Bearer {{accessToken}}"
https://domain.com/v2.1/accounts/{{accountId}}/users/{{userId}}/cloud_storage/{{serviceId}}
        Postman Collection Item JSON
        {
  "name": "Gets the specified Cloud Storage Provider configuration for the User.",
  "request": {
    "method": "GET",
    "header": [
      {
        "key": "Accept",
        "value": "application/json"
      },
      {
        "key": "Authorization",
        "value": "Bearer {{accessToken}}"
      }
    ],
    "url": {
      "raw": "{{baseUrl}}/v2.1/accounts/{{accountId}}/users/{{userId}}/cloud_storage/{{serviceId}}?redirectUrl={{redirectUrl}}",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "v2.1",
        "accounts",
        "{{accountId}}",
        "users",
        "{{userId}}",
        "cloud_storage",
        "{{serviceId}}"
      ],
      "query": [
        {
          "key": "redirectUrl",
          "value": "{{redirectUrl}}"
        }
      ],
      "variable": [
        {
          "key": "accountId",
          "value": "{{accountId}}"
        },
        {
          "key": "serviceId",
          "value": "{{serviceId}}"
        },
        {
          "key": "userId",
          "value": "{{userId}}"
        }
      ]
    },
    "description": "Retrieves the list of cloud storage providers enabled for the account and the configuration information for the user."
  },
  "response": [
  ]
}