Export Features
This page details the export features available for GMS/CS services. |
Contents
Introduction
You can export services data by performing one of the following queries:
These two export features will select the exported services for a given time-range, based on given time_from and time_to parameters.
By default, any services which received a start or completed event during the given period are exported, regardless their current state.
Setting Filters
If you set the state filter, the response filters the services according to their current status, active or not, and regardless the given time range.
The table below provide examples of filter values and their results according to the above figure.
Filter - filter_events | Filter - filter_state | Details | Result |
---|---|---|---|
filter_events = any | filter_state = any | The response includes the services which received events between T1 and T2. | S1, S2, S3 |
filter_events = any | filter_state = active | The response includes the services which received events between T1 and T2, AND which are still active at T3. | S2 |
filter_events = any | filter_state = inactive | The response includes the services which received events between T1 and T2, AND which are no longer active at T3: | S1, S3 |
filter_events = started | filter_state = any | The response includes the services which received a start event between T1 and T2. | S1, S2 |
filter_events = started | filter_state = active | The response includes the services which received a start event between T1 and T2, AND which are still active at T3. | S2 |
filter_events = started | filter_state = inactive | The response includes the services which received a start event between T1 and T2, AND which are no longer active at T3. | S1 |
filter_events = completed | filter_state = any | The response includes the services which received a end event between T1 and T2 | S3 |
filter_events = completed | filter_state = active | The response includes the services which received a end event between T1 and T2, AND which are still active at T3.
Tip This combination can not return results. You should not use it. |
N/A |
filter_events = completed | filter_state = inactive | The response includes the services which received a end event between T1 and T2, AND which are no longer active at T3. | S3 |
Exporting to the JSON Stream
If you export the services stream to JSON, you can either export a list of IDs or the whole data. Be careful: exporting the whole data can consume a lot of resources and delay the response. This query is intended to be used to retrieve a list of IDs, and you should then query the service data based on the service ID.
If you think that your query may retrieve a long list of IDs and if you need the service data, you may export the service stream to JSON et CSV files instead of setting the export_content option to true.
Exporting to the Files Stream
If you need to export a wide collection of service data, you should export the services stream to CSV or JSON files. In this case, you can still use filters to select the exported content and you should not face timeout issues.