User operations

For newer versions (After 11000 onwards)

For older versions (Prior to 11000)

 

To perform the Get All operation  (For newer versions (After 11000 onwards)


Input the following URL pattern

 

 
<protocal>://<hostname>:<port number>/api/v3/users
 

 

Sample Output

 

{
  "response_status": [
    {
      "status_code": 2000,
      "status": "success"
    }
  ],
  "list_info": {
    "has_more_rows": false,
    "sort_field": "name",
    "start_index": 1,
    "sort_order": "asc",
    "row_count": 7
  },
  "users": [
    {
      "email_id": "guest@zoho.com",
      "purchase_approver": true,
      "ci_people_fields": {},
      "description": "End User of the software product",
      "is_vipuser": false,
      "reporting_to": {
        "email_id": null,
        "name": "administrator",
        "is_vipuser": false,
        "id": "4",
        "department": null
      },
      "type": "User",
      "citype": {
        "name": "User",
        "id": 3
      },
      "cost_per_hour": "500.00",
      "ci_default_fields": {
        "udf_pickref_1": {
          "name": "High",
          "id": 1
        },
        "udf_pick_165": "Team member",
        "udf_sline_164": null
      },
      "org_user_status": "ACTIVE",
      "id": "3",
      "department": {
        "site": null,
        "name": "Administration",
        "id": "1"
      },
      "first_name": null,
      "profile_pic_url": null,
      "service_request_approver": true,
      "created_time": {
        "display_value": "Sep 6, 2019 05:30 AM",
        "value": "1567728017353"
      },
      "is_technician": false,
      "jobtitle": null,
      "mobile": "1234567890",
      "project_roles": {
        "name": "Project Manager",
        "id": "3"
      },
      "last_name": null,
      "sms_mail_id": null,
      "middle_name": null,
      "ciid": "17",
      "purchase_approval_limit": "1000.00",
      "login_name": "guest",
      "phone": "8888",
      "employee_id": "888",
      "domain": {
        "name": "WORKGROUP",
        "id": "1"
      },
      "name": "Guest",
      "ci_user_fields": {
        "udf_pickref_160": null,
        "udf_pickref_161": {
          "name": "administrator",
          "id": 4
        },
        "udf_sline_158": "Software analyst",
        "udf_pickref_159": {
          "site": null,
          "name": "Engineering",
          "id": 2
        },
        "udf_pick_163": "5 th floor",
        "udf_sline_162": "12LE35"
      },
      "user_udf_fields": {
        "udf_pick_2": "support",
        "udf_long_3": "9823881",
        "udf_sline_1": "Active",
        "udf_date_4": {
          "display_value": "Sep 25, 2019 10:53 PM",
          "value": "1569432180000"
        }
      },
      "status": "ACTIVE",
      "requester_allowed_to_view": null
    },
    {
      "email_id": "heather@gmail.com",
      "purchase_approver": false,
      "ci_people_fields": {},
      "description": "Help Desk Executive",
      "is_vipuser": false,
      "reporting_to": {
        "email_id": null,
        "name": "administrator",
        "is_vipuser": false,
        "id": "4",
        "department": null
      },
      "type": "Technician",
      "citype": {
        "name": "User",
        "id": 3
      },
      "cost_per_hour": "12.00",
      "ci_default_fields": {
        "udf_pickref_1": {
          "name": "Medium",
          "id": 2
        },
        "udf_pick_165": "Project Manager",
        "udf_sline_164": "IT Help Desk"
      },
      "org_user_status": "ACTIVE",
      "id": "6",
      "department": {
        "site": null,
        "name": "IT Services",
        "id": "5"
      },
      "first_name": null,
      "profile_pic_url": null,
      "service_request_approver": null,
      "created_time": {
        "display_value": "Sep 6, 2019 05:30 AM",
        "value": "1567728017353"
      },
      "is_technician": true,
      "jobtitle": null,
      "mobile": "9289291991",
      "project_roles": {
        "name": "Project Manager",
        "id": "3"
      },
      "last_name": null,
      "sms_mail_id": "help@sms.com",
      "middle_name": null,
      "ciid": "20",
      "purchase_approval_limit": "-1.00",
      "login_name": "heather",
      "phone": "925-852-2602",
      "employee_id": "011",
      "domain": {
        "name": "ZOHOCORP",
        "id": "2"
      },
      "name": "Heather Graham",
      "ci_user_fields": {
        "udf_pickref_160": null,
        "udf_pickref_161": {
          "name": "administrator",
          "id": 4
        },
        "udf_sline_158": "Testing manager",
        "udf_pickref_159": {
          "site": null,
          "name": "Finance",
          "id": 4
        },
        "udf_pick_163": "Ground Floor",
        "udf_sline_162": "5FD92"
      },
      "user_udf_fields": {
        "udf_pick_2": "support",
        "udf_long_3": "9289291991",
        "udf_sline_1": "Help Desk Executive",
        "udf_date_4": {
          "display_value": "Sep 9, 2019 10:55 PM",
          "value": "1568049900000"
        }
      },
      "status": "ACTIVE"
    }
  ]
}

 

 

To Perform Get All operation with criteria and fields required, 

 

Input the following URL pattern:

<protocal>://<hostname>:<port number>/api/v3/users

 

 

Sample Input

 

{
  "list_info": {
    "sort_field": "name",
    "start_index": 1,
    "sort_order": "asc",
    "row_count": "25",
    "get_total_count": true,
    "search_fields": {
      "email_id": "guest@zoho.com"
    }
  },
  "fields_required": [
    "name",
    "is_technician",
    "citype",
    "login_name",
    "email_id",
    "department",
    "phone",
    "mobile",
    "jobtitle",
    "project_roles",
    "employee_id",
    "first_name",
    "middle_name",
    "last_name",
    "is_vipuser",
    "ciid"
  ]
}

 

Sample Output

 

{
  "list_info": {
    "sort_field": "name",
    "start_index": 1,
    "sort_order": "asc",
    "row_count": 1,
    "get_total_count": "true",
    "search_fields": {
      "email_id": "guest@zoho.com"
    },
    "has_more_rows": false,
    "total_count": 1
  },
  "response_status": [
    {
      "status_code": 2000,
      "status": "success"
    }
  ],
  "users": [
    {
      "email_id": "guest@zoho.com",
      "is_technician": false,
      "jobtitle": null,
      "ci_people_fields": {},
      "mobile": "1234567890",
      "project_roles": {
        "name": "Project Manager",
        "id": "3"
      },
      "last_name": null,
      "is_vipuser": false,
      "middle_name": null,
      "type": "User",
      "citype": {
        "name": "User",
        "id": 3
      },
      "ciid": "17",
      "ci_default_fields": {
        "udf_pickref_1": {
          "name": "High",
          "id": 1
        },
        "udf_pick_165": "Team member",
        "udf_sline_164": null
      },
      "login_name": "guest",
      "phone": "8888",
      "employee_id": "888",
      "name": "Guest",
      "ci_user_fields": {
        "udf_pickref_160": null,
        "udf_pickref_161": {
          "name": "administrator",
          "id": 4
        },
        "udf_sline_158": "Software analyst",
        "udf_pickref_159": {
          "site": null,
          "name": "Engineering",
          "id": 2
        },
        "udf_pick_163": "5 th floor",
        "udf_sline_162": "12LE35"
      },
      "id": "3",
      "department": {
        "site": null,
        "name": "Administration",
        "id": "1"
      },
      "first_name": null
    }
  ]
}

 

For older versions (Prior to 11000)

To get requester related information regarding all requesters, use the following URL pattern:

http://<servername>:<port number>/sdpapi/requester/

 

Example:

http://localhost:8080/sdpapi/requester/


 

Get All Requesters

Keypoints:

  1. The operation name "GET_ALL"  should be sent as a "POST attribute" with key "OPERATION_NAME".

  2. The input values are case sensitive

  3. AND Operation is applied in case you give more than the parameter.

  4. For contact number parameter, all the numbers associated with the requester (office/mobile) will be fetched.

  5. Values fetched (the result) would be based on the exact value provided; for example, you are searching for requester John, and there exists a requester by name Johnathan, then he would not be fetched; if you desire to fetch the requester Johnathan as well, you have to append "*" as suffix to John. Eg: <value>john*</value>. The same rule applies for prefix as well.

Note: Please note that the Input and Output XML formats have been changed. But for compatibility reasons, the Input operation will support both the formats.

 

Input Format

 

<Operation>

<Details>

<parameter>

<name>loginname</name>

<value>guest</value>

</parameter>

<parameter>

<name>domainname</name>

<value></value>

</parameter>

<parameter>

<name>department</name>

<value>administration</value>

</parameter>

<parameter>

<name>sitename</name>

<value>asd</value>

</parameter>

<parameter>

<name>contactnumber</name>

<value>1234567890</value>

</parameter>

<parameter>

<name>employeeid</name>

<value>888</value>

</parameter>

<parameter>

<name>name</name>

<value>GUEST</value>

</parameter>

<parameter>

<name>email</name>

<value>asd@asd.com</value>

</parameter>

<parameter>

<name>jobtitle</name>

<value>job title</value>

</parameter>

<parameter>

<name>noofrows</name>

<value>10</value>

</parameter>

</Details>

</Operation>

 

 

Note: Please note that the Input and Output XML formats have been changed. But for compatibility reasons, the Input operation will support both the formats.

 

Output Format

 

<Operation>

<Details type="Requester" >

<record URI="http://vivin-0415:8080/sdpapi/requester/3/">

<parameter>

<name>userid</name>

<value>3</value>

</parameter>

<parameter>

<name>username</name>

<value>guest</value>

</parameter>

<parameter>

<name>emailid</name>

<value>asd@asd.com</value>

</parameter>

<parameter>

<name>department</name>

<value>Administration</value>

</parameter>

<parameter>

<name>sitename</name>

<value>asd</value>

</parameter>

<parameter>

<name>domainname</name>

<value>-</value>

</parameter>

<parameter>

<name>employeeid</name>

<value>888</value>

</parameter>

<parameter>

<name>jobtitle</name>

<value>job title</value>

</parameter>

<parameter>

<name>landline</name>

<value>8888</value>

</parameter>

<parameter>

<name>mobile</name>

<value>1234567890</value>

</parameter>

</Details>

</Operation>