Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description

Gets a list of service requests by services. This list allows for pagination if a page or page size is provided. Service requests can be excluded.

Package Details

Interface

IServiceRequestManager

Syntax

Code Block
languagec#
Task<ICollection<ServiceRequest>> GetByServices<T>(ICollection<int> serviceIds, int page, int pageSizes, bool includeRegulatedEntities) where T : IServiceRequestMetadata;

Returns

ICollection<ServiceRequest>

API

/api/v1/servicerequests

Parameters

Parameter

Description

Parameter Type

services (required)

Coma delimited list of service ids we want to retrieve service requests for.

query

page

Specific page to retrieve.

query

pageSize

Size of the page to retrieve.

query

excludeMetadata

Exclude the Service Request metadata. Default value is false.

query

excludeServiceRequests

Exclude all the Service Requests (used to retrieve the Service Request count). Default value is false.

query

includeRegulatedEntities

True if the Service Request payload should contain its associated regulated entities, false otherwise. Default value is false.

query

Returns

200 - OK

Returns a list of service requests, the count of service requests found, page number and if there’s more records.

...

"Message": "Services:{id} couldn't be retrieved."

Example

Code Block
languagec#
var services = int[] {230, 231, 232};
var includeRegulatedEntities = true;
const int page = 1;
const int pageSize = 10;

//get service requests with metadata.
var servicesRequests = await ServiceManager.GetByServices<ServiceRequestMetadata>(services, page, pageSize, includeRegulatedEntities);

//get service requests with no metadata.
var servicesRequests = await ServiceManager.GetByServices<NoMetadata>(services, page, pageSize, includeRegulatedEntities)

...