Get Service Requests List

Method: GET

Url: /ServiceRequests
Header: DPApiAuthenticationToken={YOUR_API_TOKEN}

Query String:

Parameter Name Data Type Description
Parameter Name:

Parameter Name

Data Type:

Data Type

Description:

Description

Parameter Name:

Status (optional)

Data Type:

String

Description:

Filter service requests based on status "Open" or "Closed"

Default: "Open"

Parameter Name:

DateFrom (optional)

Data Type:

Date

Description:

Filter service requests opened on or after the specified date

Default: Null
Example: 2020-01-01

Parameter Name:

DateTo (optional)

Data Type:

Date

Description:

Filter service requests opened on or before the specified date

Default: Null
Example: 2020-01-31

Parameter Name:

GetContentInHTML

Data Type:

Boolean

Description:

Whether to get the service request's description as HTML.

Default: True

Parameter Name:

JMS_Query (optional)

Data Type:

String

Description:

Any 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''

Parameter Name:

PageNumber (optional)

Data Type:

Integer

Description:

The number of page to retrieve considering the PageSize parameter.

Default: 1
Example: 4

Parameter Name:

PageSize (optional)

Data Type:

Integer

Description:

The 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

Parameter Name:

SortBy (optional)

Data Type:

String

Description:

The field name to sort the response by.

Default: Empty string
Example: FirstName

Parameter Name:

SortOrder (optional)

Data Type:

String

Description:

Sort order. Can be either “ASC” or “DESC” or empty string denoting “ASC”.

Default: Empty string
Example: DESC

Parameter Name:

tbl_columns (optional)

Data Type:

String

Description:

A 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-10

Header: "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 Name Data Type Remarks
Column Name:

IncidentID

Data Type:

Integer

Remarks:

The unique ID of the record.

Column Name:

IncidentNo

Data Type:

String

Remarks:

A unique alphanumeric key assigned to each incident

Column Name:

OpenDate

Data Type:

DateTime

Remarks:

The datetime the incident was opened

Column Name:

ShortDescription

Data Type:

String

Remarks:

A short title of the incident

Column Name:

LongDescription

Data Type:

String

Remarks:

Incident details. May contain HTML

Column Name:

IncidentClassID

Data Type:

Integer

Remarks:

The ClassID of the incident

Column Name:

Status

Data Type:

String

Remarks:

The current status of the incident. May contain either “Open” or “Closed”

Column Name:

RequestType

Data Type:

String

Remarks:

The type of the request. May contain “General Service”, “To Do” etc.

Column Name:

CCWebUserID

Data Type:

Integer

Remarks:

The ID of the user the service request is assigned to

Column Name:

AssignedTo

Data Type:

String

Remarks:

The name of the user the service request is assigned to

Column Name:

TargetContactID

Data Type:

Integer

Remarks:

The ID of the target contact of the service request

Column Name:

TargetDeviceID

Data Type:

Integer

Remarks:

The ID of the target device of the service request

Column Name:

ResolvedDate

Data Type:

DateTime

Remarks:

The datetime the service request was resolved, only applicable if the service request is closed or set to resolved.

Column Name:

CustomFields

Data Type:

List<CustomField>

Remarks:

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": ""
            }
        ]
    }
]