Jump to: navigation, search

Export Services to JSON Stream by Date

GET /maintenance/services/stream

Description

Your application can use this operation to export service data to a JSON stream for a given time range. You can filter the list of returned services according to their date, inner state, or even events. The service information is returned in the response's body and can include service information in addition to service IDs.


See also the export features page for further details about filters and usage of this query.

Important
According to the amount of data to return, in particular, if you include service information, this query can take long to provide your application with a response. In this case, you should rather export a list of service IDs, then use the standard Query Service by ID to retrieve information.

Operation

Export services to a JSON stream
Method GET
URL /genesys/1/cs/maintenance/services/stream
Name   Type   Mandatory Description
URI Parameters
time_from date/time[1] yes Filters the service IDs which match the event and/or state filters starting from the given date/time.

Example : 2014-09-02T08:00:00.000Z

time_to date/time[1] no Filters the service IDs which match the event and/or state filters ending to the given date/time.

By default, current time is taken as end range. Example : 2014-09-02T08:00:00.000Z

filter_events any, started, completed no Filters on either types of service event occurrence.
  • any (default): The response includes the services for which an event occurred in the given time range.
  • started: The response includes services for which a start event occurred during the given time range.
  • completed: The response includes services for which a complete event occurred during the given time range.
export_content boolean no
  • "true" to include all service data in the JSON response.
  • "false" (default) to include service IDs only.
filter_state any, active, inactive no
Important
You can use this parameter only if the export_content parameter is set to true.
  • any (default): The response includes the service information for all of the selection.
  • active: The response includes the conversation (or service information) if some event (specified by the filter_events parameter) occurred during the specified time range AND if the service is still active at the time of the request.
  • inactive: The response includes the conversation (or service information) if some event (specified by the filter_events parameter) occurred during the specified time range AND if the conversation is completed at the time of the request.

<references />

Response

The Context Management Service API answers with HTTP codes for every request. The following table shows the correct response for a successful request. See HTTP Response Codes and Errors for further details on the possible codes that this operation can return.

Response
HTTP code 200
HTTP Title OK
Body String[]

Example

Operation
The following code sample associates the customer with a service, and specifies attached data as json arrays for "Feedback" and "Satisfaction".

GET http://localhost:8080/genesys/1/cs/maintenance/services/stream?time_from=2014-07-22T12:00:00.000Z&time_to=2014-07-22T18:00:00.000Z&export_content=false

Result

200 OK
[
    "361-93ae6d6b-8ea6-476a-bc2f-235ddc029994",
    "361-b552fb93-4b10-4761-9d50-850890bcab02",
    "361-0aaa7023-2db6-4fd3-8cf6-8e32619a0df8",
    "361-0b6b586f-1815-47b8-8a84-16d66162ff1c",
    "361-96d081b2-1918-46a5-b497-c235f882b33f",
    "361-9131cb94-2829-4fb0-9ae2-f9fd53639d1c",
    "361-5a4db9b7-8ee4-4848-97e7-7144cabe6790",
    "361-acf20476-d938-4583-b3cc-8b1568309247",
    "361-c1f24f0d-3e74-4194-90bb-5d330a9614c8",
    "361-cdd9bf74-4fb4-403a-aeb3-0d8875f963bb",
    "361-1ef7641d-6003-4210-b4d0-cc1cafa8411d",
    "361-1ee58ee2-4b54-4d22-8cbc-d000363b2282",
    "361-3ab5e8bc-adc1-494a-a4c6-b925da319dcc",
    "361-6fee8b55-607b-4731-aba5-6681a992d184",
    "361-ddd8e44a-3fdc-4da8-91a7-c709ba654877",
    "361-b021209c-f86c-4ea5-b991-51d6b848d920",
    "361-66808d00-6328-4332-a4c7-936094babdb6",
    "361-fe54ea55-f7e9-44d1-aafd-0a213a9b1bd1",
    "361-604b6ad4-308d-4d60-8a2a-ba59cc3d84cd",
    "361-c4925764-cef0-4ce0-b4d7-4e96023d1c62",
    "361-7d8caf1f-0136-483e-bfef-bf2257e4a25c",
    "361-a222846a-67f5-47e5-b5c9-d5c88bd2775b",
    "361-779d75da-7d64-4ffd-808b-9ccd6cf39a66"
]
This page was last edited on September 7, 2018, at 10:34.
Comments or questions about this documentation? Contact us for support!