Skip to content

Get list of service requests

Method: GET

Url: /ServiceRequests
Header: DPApiAuthenticationToken={YOUR_API_TOKEN}

Query String:

Parameter NameData TypeDescription
Parameter NameData TypeDescription
Status (optional)StringFilter service requests based on status “Open” or “Closed”

Default: “Open”
DateFrom (optional)DateFilter service requests opened on or after the specified date

Default: Null
Example: 2020-01-01
DateTo (optional)DateFilter service requests opened on or before the specified date

Default: Null
Example: 2020-01-31
GetContentInHTMLBooleanWhether to get the service request’s description as HTML.

Default: True
JMS_Query (optional)StringAny SQL-compliant string to filter the records.

If the query contains any special or reserved characters, it must be properly escaped

Default: Empty string
Example: Status=”Open”
PageNumber (optional)IntegerThe number of page to retrieve considering the PageSize parameter.

Default: 1
Example: 4
PageSize (optional)IntegerThe number of records to retrieve per request.

The page size cannot exceed the limit set for your account by Dataprise, which is usually around 100 records per request.

Default: 20
Example: 25
SortBy (optional)StringThe field name to sort the response by.

Default: Empty string
Example: FirstName
SortOrder (optional)StringSort order. Can be either “ASC” or “DESC” or empty string denoting “ASC”.

Default: Empty string
Example: DESC
tbl_columns (optional)StringA comma separated string containing the names of the columns to retrieve, instead of all columns.

Default: Empty string
Example: FirstName, LastName, EmailAddress
Request Examples:
Using Filter Parameters:
GET “https://api.dataprise.com/api/v1/ServiceRequests/?Status=Open&DateFrom=2020-01-01&DateTo=2020-01-10Header: “DPApiAuthenticationToken=abcxyz0123456789”
Using JMS_Query:
GET “https://api.dataprise.com/api/v1/ServiceRequests/?JMS_Query=Status=’Open’%20AND%20ShortDesc%20LIKE%20’%25Test%25′”Header: “DPApiAuthenticationToken=abcxyz0123456789”
Paging & Sorting:
GET “https://api.dataprise.com/api/v1/ServiceRequests/?PageNumber=2&PageSize=50&SortBy=ShortDesc&SortOrder=DESC”Header: “DPApiAuthenticationToken=abcxyz0123456789”

Response:

The API will return the list of matching service requests from your organization in JSON format. The response will by default contain the following fields for each record, however you can change that using the “tbl_columns” request parameter as mentioned above.

Column NameData TypeRemarks
IncidentIDIntegerThe unique ID of the record.
IncidentNoStringA unique alphanumeric key assigned to each incident
OpenDateDateTimeThe datetime the incident was opened
ShortDescriptionStringA short title of the incident
LongDescriptionStringIncident details. May contain HTML
IncidentClassIDIntegerThe ClassID of the incident
StatusStringThe current status of the incident. May contain either “Open” or “Closed”
RequestTypeStringThe type of the request. May contain “General Service”, “To Do” etc.
CCWebUserIDIntegerThe ID of the user the service request is assigned to
AssignedToStringThe name of the user the service request is assigned to
TargetContactIDIntegerThe ID of the target contact of the service request
TargetDeviceIDIntegerThe ID of the target device of the service request
ResolvedDateDateTimeThe datetime the service request was resolved, only applicable if the service request is closed or set to resolved.
CustomFieldsList<CustomField>List of custom fields (key-value pair) for this record
Sample Response:
[ { “IncidentID”: 342559, “IncidentNo”: “SRI202001230005”, “OpenDate”: “2020-01-23T08:26:09.517”, “ResolvedDate”: “0001-01-01T00:00:00”, “ShortDescription”: “Test request by parameters from API”, “LongDescription”: “”, “IncidentClassID”: -1, “Status”: “Open”, “CCWebUserID”: -1, “AssignedTo”: “”, “TargetContactID”: 73995, “TargetDeviceID”: -1, “CustomFields”: [ { “FieldLabel”: “Project”, “FieldValue”: “” }, { “FieldLabel”: “Priority”, “FieldValue”: “” }, { “FieldLabel”: “Impact”, “FieldValue”: “” } ] }, { “IncidentID”: 342557, “IncidentNo”: “SRI202001230003”, “OpenDate”: “2020-01-23T08:25:50.227”, “ResolvedDate”: “0001-01-01T00:00:00”, “ShortDescription”: “Test service request by parameters from API”, “LongDescription”: “”, “IncidentClassID”: -1, “Status”: “Open”, “CCWebUserID”: -1, “AssignedTo”: “”, “TargetContactID”: 73995, “TargetDeviceID”: -1, “CustomFields”: [ { “FieldLabel”: “Project”, “FieldValue”: “” }, { “FieldLabel”: “Priority”, “FieldValue”: “” }, { “FieldLabel”: “Impact”, “FieldValue”: “” } ] } ]