C / DocuSign Admin API / Returns a text/csv file with user details for a User Import request
Back to Collection Items
#include <C_CkHttp.h>
#include <C_CkStringBuilder.h>
void ChilkatSample(void)
{
HCkHttp http;
BOOL success;
HCkStringBuilder sbResponseBody;
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
http = CkHttp_Create();
CkHttp_SetRequestHeader(http,"Content-Type","application/json");
// Adds the "Authorization: Bearer {{accessToken}}" header.
CkHttp_putAuthToken(http,"{{accessToken}}");
CkHttp_SetRequestHeader(http,"Accept","text/csv");
sbResponseBody = CkStringBuilder_Create();
success = CkHttp_QuickGetSb(http,"https://{{hostenv}}/Management/v2/organizations/{{organizationId}}/imports/bulk_users/{{importId}}/results_csv",sbResponseBody);
if (success == FALSE) {
printf("%s\n",CkHttp_lastErrorText(http));
CkHttp_Dispose(http);
CkStringBuilder_Dispose(sbResponseBody);
return;
}
printf("Response status code = %d\n",CkHttp_getLastStatus(http));
printf("%s\n",CkStringBuilder_getAsString(sbResponseBody));
CkHttp_Dispose(http);
CkStringBuilder_Dispose(sbResponseBody);
}
Curl Command
curl -X GET
-H "Accept: text/csv"
-H "Content-Type: application/json"
-H "Authorization: Bearer {{accessToken}}"
https://{{hostenv}}/Management/v2/organizations/{{organizationId}}/imports/bulk_users/{{importId}}/results_csv
Postman Collection Item JSON
{
"name": "Returns a text/csv file with user details for a User Import request",
"request": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "text/csv"
},
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{accessToken}}"
}
],
"url": {
"raw": "https://{{hostenv}}/Management/v2/organizations/{{organizationId}}/imports/bulk_users/{{importId}}/results_csv",
"protocol": "https",
"host": [
"{{hostenv}}"
],
"path": [
"Management",
"v2",
"organizations",
"{{organizationId}}",
"imports",
"bulk_users",
"{{importId}}",
"results_csv"
],
"variable": [
{
"key": "organizationId",
"value": "{{organizationId}}"
},
{
"key": "importId",
"value": "{{importId}}"
}
]
},
"description": "Required scopes: user_read"
},
"response": [
]
}