38
DATAMETRIE REST API USER DOCUMENTATION VERSION 15.2.3 CONTACT: ip-label Tel: 01 77 49 53 00 | Fax: 01 49 64 03 80 90 boulevard National, 92250 La Garenne-Colombes | www.ip-label.com SAS with capital of 549,728 € | RCS Nanterre B 327 139 309 | [email protected] Reproduction or communication of any part of this document is not allowed without express permission from ip-label.

Datametrie REST API€¦ · DATAMETRIE REST API USER DOCUMENTATION VERSION 15.2.3 CONTACT: ip-label Tel: 01 77 49 53 00 | Fax: 01 49 64 03 80 90 boulevard National, 92250 La Garenne-Colombes

  • Upload
    others

  • View
    13

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Datametrie REST API€¦ · DATAMETRIE REST API USER DOCUMENTATION VERSION 15.2.3 CONTACT: ip-label Tel: 01 77 49 53 00 | Fax: 01 49 64 03 80 90 boulevard National, 92250 La Garenne-Colombes

DATAMETRIE REST API USER DOCUMENTATION

VERSION 15.2.3

CONTACT:

ip-label

Tel: 01 77 49 53 00 | Fax: 01 49 64 03 80

90 boulevard National, 92250 La Garenne-Colombes | www.ip-label.com

SAS with capital of 549,728 € | RCS Nanterre B 327 139 309 | [email protected]

Reproduction or communication of any part of this document is not allowed without express permission from ip-label.

Page 2: Datametrie REST API€¦ · DATAMETRIE REST API USER DOCUMENTATION VERSION 15.2.3 CONTACT: ip-label Tel: 01 77 49 53 00 | Fax: 01 49 64 03 80 90 boulevard National, 92250 La Garenne-Colombes

2/38

Contents

1 Introduction ........................................................................................... 5

1.1 Authentication....................................................................................................... 5

1.2 Errors .................................................................................................................. 5

1.3 Date/Time ............................................................................................................ 5

2 Reference methods .................................................................................. 6

2.1 Ref_Get_Typeanomalie_List ..................................................................................... 6

2.1.1 Description ........................................................................................................ 6

2.1.2 Call ................................................................................................................ 6

2.1.3 Parameters ........................................................................................................ 6

2.1.4 Return .............................................................................................................. 6

2.2 Ref_Get_Codeanomalie_List ..................................................................................... 7

2.2.1 Description ........................................................................................................ 7

2.2.2 Call ................................................................................................................ 7

2.2.3 Parameters ........................................................................................................ 7

2.2.4 Return .............................................................................................................. 7

2.3 Ref_Get_Measurements_List ..................................................................................... 8

2.3.1 Description ........................................................................................................ 8

2.3.2 Call ................................................................................................................ 8

2.3.3 Parameters ........................................................................................................ 8

2.3.4 Return .............................................................................................................. 8

2.4 Ref_Get_Locations_List ........................................................................................... 9

2.4.1 Description ........................................................................................................ 9

2.4.2 Call ................................................................................................................ 9

2.4.3 Parameters ........................................................................................................ 9

2.4.4 Return .............................................................................................................. 9

3 Global methods ...................................................................................... 10

3.1 Get_Monitors....................................................................................................... 10

3.1.1 Description ...................................................................................................... 10

3.1.2 Call .............................................................................................................. 10

3.1.3 Parameters ...................................................................................................... 10

3.1.4 Return ............................................................................................................ 10

4 Alarm retrieval methods ........................................................................... 12

4.1 Get_Status_All_Monitors ........................................................................................ 12

Page 3: Datametrie REST API€¦ · DATAMETRIE REST API USER DOCUMENTATION VERSION 15.2.3 CONTACT: ip-label Tel: 01 77 49 53 00 | Fax: 01 49 64 03 80 90 boulevard National, 92250 La Garenne-Colombes

3/38

4.1.1 Description ...................................................................................................... 12

4.1.2 Call .............................................................................................................. 12

4.1.3 Parameters ...................................................................................................... 12

4.1.4 Return ............................................................................................................ 12

4.2 Get_Alarm_Description .......................................................................................... 13

4.2.1 Description ...................................................................................................... 13

4.2.2 Call .............................................................................................................. 13

4.2.3 Parameters ...................................................................................................... 13

4.2.4 Return ............................................................................................................ 13

4.3 Get_Current_Alarms_All_Monitors ........................................................................... 14

4.3.1 Description ...................................................................................................... 14

4.3.2 Call .............................................................................................................. 14

4.3.3 Parameters ...................................................................................................... 14

4.3.4 Return ............................................................................................................ 15

4.4 Get_Current_Alarms_Per_Monitor ............................................................................ 16

4.4.1 Description ...................................................................................................... 16

4.4.2 Call .............................................................................................................. 16

4.4.3 Parameters ...................................................................................................... 16

4.4.4 Return ............................................................................................................ 16

5 Measurement retrieval methods ................................................................. 18

5.1 Get_Live_Measures ............................................................................................... 18

5.1.1 Description ...................................................................................................... 18

5.1.2 Call .............................................................................................................. 18

5.1.3 Parameters ...................................................................................................... 18

5.1.4 Return ............................................................................................................ 18

5.2 Get_Last_Measures ............................................................................................... 21

5.2.1 Description ...................................................................................................... 21

5.2.2 Call .............................................................................................................. 21

5.2.3 Parameters ...................................................................................................... 21

5.2.4 Return ............................................................................................................ 21

5.3 Get_Last_Measures_Date ....................................................................................... 24

5.3.1 Description ...................................................................................................... 24

5.3.2 Call .............................................................................................................. 24

5.3.3 Parameters ...................................................................................................... 24

5.3.4 Return ............................................................................................................ 24

5.4 Get_Measures_Per_Date ........................................................................................ 25

5.4.1 Description ...................................................................................................... 25

Page 4: Datametrie REST API€¦ · DATAMETRIE REST API USER DOCUMENTATION VERSION 15.2.3 CONTACT: ip-label Tel: 01 77 49 53 00 | Fax: 01 49 64 03 80 90 boulevard National, 92250 La Garenne-Colombes

4/38

5.4.2 Call .............................................................................................................. 25

5.4.3 Parameters ...................................................................................................... 25

5.4.4 Return ............................................................................................................ 25

5.5 Get_Measures_Between_Dates ................................................................................ 28

5.5.1 Description ...................................................................................................... 28

5.5.2 Call .............................................................................................................. 28

5.5.3 Parameters ...................................................................................................... 28

5.5.4 Return ............................................................................................................ 28

6 Method for retrieving monitor configurations ................................................. 31

6.1 Get_Monitor_Configuration .................................................................................... 31

6.1.1 Description ...................................................................................................... 31

6.1.2 Call .............................................................................................................. 31

6.1.3 Parameters ...................................................................................................... 31

6.1.4 Return ............................................................................................................ 31

7 Examples of web service uses .................................................................... 34

7.1 Retrieval of measurements for a monitor ................................................................... 34

7.2 Retrieval of alarms in progress ................................................................................ 34

8 Calculation of indicators ........................................................................... 35

8.1 Web metrics ........................................................................................................ 35

8.1.1 Time stamp ..................................................................................................... 35

8.1.1.1 Conversion examples: PHP ................................................................................. 35

8.1.1.2 Conversion examples: Oracle .............................................................................. 35

8.1.1.3 Conversion examples: C# ................................................................................... 35

8.1.2 IP address ....................................................................................................... 36

8.1.2.1 Conversion examples: PHP ................................................................................. 36

8.1.2.2 Conversion examples: Oracle .............................................................................. 36

8.1.2.3 Conversion examples: C# ................................................................................... 36

9 Remarks ............................................................................................... 37

9.1 Miscellaneous ...................................................................................................... 37

9.2 Notion of error (anomaly) ....................................................................................... 37

9.3 Notion of contract and mission ................................................................................ 37

9.3.1 Contract ......................................................................................................... 37

9.3.2 Mission ........................................................................................................... 38

Page 5: Datametrie REST API€¦ · DATAMETRIE REST API USER DOCUMENTATION VERSION 15.2.3 CONTACT: ip-label Tel: 01 77 49 53 00 | Fax: 01 49 64 03 80 90 boulevard National, 92250 La Garenne-Colombes

5/38

1 INTRODUCTION

The purpose of this document is to describe the various functionalities that Datametrie REST API has to offer.

The first part of this document describes the available methods as well as the objects handled.

All responses are in JSON format, including error messages.

1.1 AUTHENTICATION

The Datametrie API is available for all active Datametrie accounts.

Authentication is performed with a username/password. You can use the same username/password as for the Datametrie extranet.

Authentication credentials are transmitted by HTTP Basic.

1.2 ERRORS

When a request fails, ‘failed’ status is sent in a JSON response and supplemented by an error message.

1.3 DATE/TIME

For all of the methods of the API, dates can be transmitted (and retrieved) in local time or GMT.

To use dates applying GMT time, call methods take the suffix ‘/GMT’ in the URL of the call.

Page 6: Datametrie REST API€¦ · DATAMETRIE REST API USER DOCUMENTATION VERSION 15.2.3 CONTACT: ip-label Tel: 01 77 49 53 00 | Fax: 01 49 64 03 80 90 boulevard National, 92250 La Garenne-Colombes

6/38

2 REFERENCE METHODS

Methods that retrieve reference information, in other words the labels associated with the IDs manipulated in the context of the web service.

2.1 REF_GET_TYPEANOMALIE_LIST

2.1.1 DESCRIPTION

Retrieves the list of Datametrie error categories. Correlation between ID and label.

2.1.2 CALL

2.1.3 PARAMETERS

None

2.1.4 RETURN

Returns a list of JSDN documents containing the following fields:

NAME DESCRIPTION

TYPEANOMALIE ID of the error category

DESCRIPTION Label of the error category

EXAMPLE

{"Ipln_WS_REST_datametrie":

{"Ref_Get_Typeanomalie_List":

{"key_0":

{"TYPEANOMALIE":"1","DESCRIPTION":"Communication","MANDATORY_PROPERTIES":""},

"key_1":

{"TYPEANOMALIE":"2","DESCRIPTION":"HTTP","MANDATORY_PROPERTIES},

"status":"success"

}

}

}

curl –u %LOGIN%:%PASSWORD% -request GET ‘https://ws.ip-label.net/ REST/Ref_Get_Typeanomalie_List/’

https://ws.ip-label.net/REST/Ref_Get_Typeanomalie_List/

Page 7: Datametrie REST API€¦ · DATAMETRIE REST API USER DOCUMENTATION VERSION 15.2.3 CONTACT: ip-label Tel: 01 77 49 53 00 | Fax: 01 49 64 03 80 90 boulevard National, 92250 La Garenne-Colombes

7/38

2.2 REF_GET_CODEANOMALIE_LIST

2.2.1 DESCRIPTION

Retrieves the list of codes (subcategories) associated with Datametrie anomalies along with the corresponding labels.

2.2.2 CALL

2.2.3 PARAMETERS

None

2.2.4 RETURN

Returns a list of JSON documents containing the following fields:

NAME DESCRIPTION

CODEANOMALIE ID of the error subcategory

TYPEANOMALIE ID of the error category

DESCRIPTION Label of the error category

EXAMPLE

{"Ipln_WS_REST_datametrie":

{"Ref_Get_Codeanomalie_List":

{"key_0":

{"CODEANOMALIE":"1","TYPEANOMALIE":"1","DESCRIPTION":"Unable to reach server",

"MANDATORY_PROPERTIES":""},

"key_1":

{"CODEANOMALIE":"400","TYPEANOMALIE":"2","DESCRIPTION":"Syntax error (400)",

"MANDATORY_PROPERTIES},

"status":"success"

}

}

}

curl –u %LOGIN%:%PASSWORD% -request GET ‘https://ws.ip-label.net/ REST/Ref_Get_Codeanomalie_List/’

https://ws.ip-label.net/REST/Ref_Get_Codeanomalie_List/

Page 8: Datametrie REST API€¦ · DATAMETRIE REST API USER DOCUMENTATION VERSION 15.2.3 CONTACT: ip-label Tel: 01 77 49 53 00 | Fax: 01 49 64 03 80 90 boulevard National, 92250 La Garenne-Colombes

8/38

2.3 REF_GET_MEASUREMENTS_LIST

2.3.1 DESCRIPTION

Retrieves the list of available measures, correlating a label with the ID used in the web service.

2.3.2 CALL

2.3.3 PARAMETERS

None

2.3.4 RETURN

Returns a list of JSON documents containing the following fields:

NAME DESCRIPTION

ID_DONNEEMESURE ID of the measure

DESC_DONNEEMESURE Description of the measure

EXAMPLE

{"Ipln_WS_REST_datametrie":

{"Ref_Get_Measurements_List":

{"key_0":

{"ID_DONNEEMESURE":"3","DESC_DONNEEMESURE":"Page loading time",

"MANDATORY_PROPERTIES":""},

"key_1":

{"ID_DONNEEMESURE":"4","DESC_DONNEEMESURE":"Loading time of the page and its objects",

"MANDATORY_PROPERTIES":""},

"status":"success"

}

}

}

curl –u %LOGIN%:%PASSWORD% -request GET ‘https://ws.ip-label.net/ REST/Ref_Get_Measurements_List/’

https://ws.ip-label.net/REST/Ref_Get_Measurements_List/

Page 9: Datametrie REST API€¦ · DATAMETRIE REST API USER DOCUMENTATION VERSION 15.2.3 CONTACT: ip-label Tel: 01 77 49 53 00 | Fax: 01 49 64 03 80 90 boulevard National, 92250 La Garenne-Colombes

9/38

2.4 REF_GET_LOCATIONS_LIST

2.4.1 DESCRIPTION

Retrieves the list of sites available for the current account.

2.4.2 CALL

2.4.3 PARAMETERS

None

2.4.4 RETURN

Returns a list of JSON documents containing the following fields:

NAME DESCRIPTION

SITEID ID of the measurement site

NOMSITE Label of the measurement site

EXAMPLE

{"Ipln_WS_REST_datametrie":

{"Ref_Get_Locations_List":

{"key_0":

{"MANDATORY_PROPERTIES":{"key_0":"SITEID"},

"SITEID":"1","NOMSITE":"Paris (Iliad)"},

"key_1":

{"MANDATORY_PROPERTIES":{"key_0":"SITEID"},

"SITEID":"61","NOMSITE":"Paris (Orange)"},

"status":"success"

}

}

}

curl –u %LOGIN%:%PASSWORD% -request GET ‘https://ws.ip-label.net/ REST/Ref_Get_Locations_List/’

https://ws.ip-label.net/REST/Ref_Get_Locations_List/

Page 10: Datametrie REST API€¦ · DATAMETRIE REST API USER DOCUMENTATION VERSION 15.2.3 CONTACT: ip-label Tel: 01 77 49 53 00 | Fax: 01 49 64 03 80 90 boulevard National, 92250 La Garenne-Colombes

10/38

3 GLOBAL METHODS

3.1 GET_MONITORS

3.1.1 DESCRIPTION

Retrieves the list of monitors available to the connected user account.

When a monitor is stopped, it takes a maximum of 2 hours for ETATCONTRAT to shift from ‘processing’ to ‘stopped’.

3.1.2 CALL

3.1.3 PARAMETERS

None

3.1.4 RETURN

Returns a list of JSON documents containing the following fields:

NAME DESCRIPTION

IDCONTRAT ID of the monitor

NOMCONTRAT Name of the monitor

IDCLIENT Customer account ID

DESCRIPTION_OFFRE Label of the type of monitor

SHAREDMONITOR Indicates whether the monitor is shared (True, False)

ETATCONTRAT Monitor status (0 creation, 3 generation, 4 execution, 5 suspended, 10 stopped)

PERIODICITE Measurement frequency

LOCATIONS List of measurement locations : list of JSON documents containing the field SITEID

curl –u %LOGIN%:%PASSWORD% -request GET ‘https://ws.ip-label.net/REST/Get_Monitors/’

https://ws.ip-label.net/REST/Get_Monitors/

Page 11: Datametrie REST API€¦ · DATAMETRIE REST API USER DOCUMENTATION VERSION 15.2.3 CONTACT: ip-label Tel: 01 77 49 53 00 | Fax: 01 49 64 03 80 90 boulevard National, 92250 La Garenne-Colombes

11/38

EXAMPLE

{"Ipln_WS_REST_datametrie":

{"Get_Monitors":

{"key_0":

{"MANDATORY_PROPERTIES":{"key_0":"IDCONTRAT","key_1":"IDCLIENT"},

"IDCONTRAT":"1000",

"NOMCONTRAT":"Home ip-label",

"IDCLIENT":"1000",

"DESCRIPTION_OFFRE":"Total",

"SHAREDMONITOR":"TRUE",

"ETATCONTRAT":"STOPPED",

"PERIODICITE":"10",

"LOCATIONS":{"key_0":{"MANDATORY_PROPERTIES":{"key_0":"SITEID"},"SITEID":"45"}}

},

"key_1":

{"MANDATORY_PROPERTIES":{"key_0":"IDCONTRAT","key_1":"IDCLIENT"},

"IDCONTRAT":"1001",

"NOMCONTRAT":"Reporting",

"IDCLIENT":"1000",

"DESCRIPTION_OFFRE":"Scenario",

"SHAREDMONITOR":"FALSE",

"ETATCONTRAT":"PROCESSING",

"PERIODICITE":"10",

"LOCATIONS":

{"key_0":{"MANDATORY_PROPERTIES":{"key_0":"SITEID"},"SITEID":"1243"},

"key_1":{"MANDATORY_PROPERTIES":{"key_0":"SITEID"},"SITEID":"21"}

}

},

"status":"success"

}

}

}

Page 12: Datametrie REST API€¦ · DATAMETRIE REST API USER DOCUMENTATION VERSION 15.2.3 CONTACT: ip-label Tel: 01 77 49 53 00 | Fax: 01 49 64 03 80 90 boulevard National, 92250 La Garenne-Colombes

12/38

4 ALARM RETRIEVAL METHODS

4.1 GET_STATUS_ALL_MONITORS

4.1.1 DESCRIPTION

Retrieves the alarm status of the monitor.

4.1.2 CALL

4.1.3 PARAMETERS

None

4.1.4 RETURN

Returns a list of JSON documents containing the following fields:

Monitors which are down for maintenance show OK status because no alarm has been detected.

Likewise, monitors that have been stopped continue to show OK status until their status is refreshed (from ‘processing’ to ‘stopped’).

NAME DESCRIPTION

IDCONTRAT ID of the monitor

IDALARMECONTRAT ID of the alarm

TYPEALARME Alarm level (OK, Black, Red, Orange)

curl –u %LOGIN%:%PASSWORD% -request GET ‘https://ws.ip-label.net/ REST/Get_Status_All_Monitors/’

https://ws.ip-label.net/REST/Get_Status_All_Monitors/

Page 13: Datametrie REST API€¦ · DATAMETRIE REST API USER DOCUMENTATION VERSION 15.2.3 CONTACT: ip-label Tel: 01 77 49 53 00 | Fax: 01 49 64 03 80 90 boulevard National, 92250 La Garenne-Colombes

13/38

EXAMPLE

4.2 GET_ALARM_DESCRIPTION

4.2.1 DESCRIPTION

Retrieves all information about an identified alarm.

4.2.2 CALL

4.2.3 PARAMETERS

Alarm ID:

NAME DESCRIPTION

IDALARMECONTRAT ID of the alarm

4.2.4 RETURN

Returns the alarm in JSON format containing the following fields:

NAME DESCRIPTION

IDCONTRAT ID of the monitor

curl –u %LOGIN%:%PASSWORD% -request GET ‘https://ws.ip-label.net/REST/Get_Alarm_Description/ ?idalarmecontrat=%ID_ALARM%’

https://ws.ip-label.net/REST/Get_Alarm_Description/?idalarmecontrat=%ID_ALARM%

{"Ipln_WS_REST_datametrie":

{"Get_Status_All_Monitors":

{"key_0":

{"IDCONTRAT":"1000","IDALARMECONTRAT":"","TYPEALARME":"OK",

"MANDATORY_PROPERTIES":""},

"key_1":

{"IDCONTRAT":"1001","IDALARMECONTRAT":"123456","TYPEALARME":"BLACK",

"MANDATORY_PROPERTIES":""},

"status":"success"

}

}

}

Page 14: Datametrie REST API€¦ · DATAMETRIE REST API USER DOCUMENTATION VERSION 15.2.3 CONTACT: ip-label Tel: 01 77 49 53 00 | Fax: 01 49 64 03 80 90 boulevard National, 92250 La Garenne-Colombes

14/38

TYPEALARME Alarm level (OK, Black, Red, Orange)

DATEALARME Start date of alarm

DATEALARME_GMT Start date of alarm, in GMT

DATEESSAI Date of the test for which the alarm was issued

DATEESSAI_GMT Date of the test for which the alarm was issued, in GMT

DATEALARMEFIN End date of the alarm

DATEALARMEFIN_GMT End date of the alarm, in GMT

EXAMPLE

4.3 GET_CURRENT_ALARMS_ALL_MONITORS

4.3.1 DESCRIPTION

Retrieves the alarms in progress for all of the monitors of the connected user account.

4.3.2 CALL

4.3.3 PARAMETERS

None

curl –u %LOGIN%:%PASSWORD% -request GET ‘https://ws.ip-label.net/REST/ Get_Current_Alarms_All_Monitors/’

https://ws.ip-label.net/REST/Get_Current_Alarms_All_Monitors/

{"Ipln_WS_REST_datametrie":

{"Get_Alarm_Description":

{"IDCONTRAT":"1000","TYPEALARME":"ORANGE",

"DATEALARME":"07\/09\/2015 16:27:51","DATEALARME_GMT":"07\/09\/2015 14:27:51",

"DATEESSAI":"07\/09\/2015 16:15:00","DATEESSAI_GMT":"07\/09\/2015 14:15:00",

"DATEALARMEFIN":"","DATEALARMEFIN_GMT":"",

"MANDATORY_PROPERTIES":"","status":"success"

}

}

}

Page 15: Datametrie REST API€¦ · DATAMETRIE REST API USER DOCUMENTATION VERSION 15.2.3 CONTACT: ip-label Tel: 01 77 49 53 00 | Fax: 01 49 64 03 80 90 boulevard National, 92250 La Garenne-Colombes

15/38

4.3.4 RETURN

Returns a list of JSON documents containing the following fields:

NAME DESCRIPTION

IDCONTRAT ID of the monitor

TYPEALARME Alarm level (OK, Black, Red, Orange)

DATEALARME Start date of alarm

DATEALARME_GMT Start date of alarm, in GMT

DATEESSAI Date of the test for which the alarm was issued

DATEESSAI_GMT Date of the test for which the alarm was issued, in GMT

DATEALARMEFIN End date of the alarm

DATEALARMEFIN_GMT End date of the alarm, in GMT

EXAMPLE

The fields DATEALARMEFIN and DATEALARMEFIN_GMT are not used because only alarms in progress are shown. The fields are kept to preserve homogeneity with the other methods.

{"Ipln_WS_REST_datametrie":

{"Get_Current_Alarms_All_Monitors":

{"key_0":

{"IDCONTRAT":"1000","TYPEALARME":"ORANGE",

"DATEALARME":"07\/09\/2015 16:27:51","DATEALARME_GMT":"07\/09\/2015 14:27:51",

"DATEESSAI":"07\/09\/2015 16:15:00","DATEESSAI_GMT":"07\/09\/2015 14:15:00",

"DATEALARMEFIN":"","DATEALARMEFIN_GMT":"","MANDATORY_PROPERTIES":""},

"key_1":

{"IDCONTRAT":"1001","TYPEALARME":"BLACK",

"DATEALARME":"11\/09\/2015 16:08:06","DATEALARME_GMT":"11\/09\/2015 14:08:06",

"DATEESSAI":"11\/09\/2015 16:00:00","DATEESSAI_GMT":"11\/09\/2015 14:00:00",

"DATEALARMEFIN":"","DATEALARMEFIN_GMT":"","MANDATORY_PROPERTIES":""},

"status":"success"

}

}

}

Page 16: Datametrie REST API€¦ · DATAMETRIE REST API USER DOCUMENTATION VERSION 15.2.3 CONTACT: ip-label Tel: 01 77 49 53 00 | Fax: 01 49 64 03 80 90 boulevard National, 92250 La Garenne-Colombes

16/38

4.4 GET_CURRENT_ALARMS_PER_MONITOR

4.4.1 DESCRIPTION

Retrieves the alarms in progress on a given monitor.

4.4.2 CALL

4.4.3 PARAMETERS

NAME DESCRIPTION

IDCONTRAT ID of the monitor

4.4.4 RETURN

Returns a JSON document containing the following fields:

NAME DESCRIPTION

IDCONTRAT ID of the monitor

TYPEALARME Alarm level (OK, Black, Red, Orange)

DATEALARME Start date of alarm

DATEALARME_GMT Start date of alarm, in GMT

DATEESSAI Date of the test for which the alarm was issued

DATEESSAI_GMT Date of the test for which the alarm was issued, in GMT

DATEALARMEFIN End date of the alarm

DATEALARMEFIN_GMT End date of the alarm, in GMT

curl –u %LOGIN%:%PASSWORD% -request GET ‘https://ws.ip-label.net/REST/ Get_Current_Alarms_Per_Monitor/?idcontrat=%IDCONTRAT%’

https://ws.ip-label.net/REST/Get_Current_Alarms_Per_Monitor/?idcontrat=%IDCONTRAT%

Page 17: Datametrie REST API€¦ · DATAMETRIE REST API USER DOCUMENTATION VERSION 15.2.3 CONTACT: ip-label Tel: 01 77 49 53 00 | Fax: 01 49 64 03 80 90 boulevard National, 92250 La Garenne-Colombes

17/38

EXAMPLE

The fields DATEALARMEFIN and DATEALARMEFIN_GMT are not used because only alarms in progress are shown. The fields are kept to preserve homogeneity with the other methods.

{"Ipln_WS_REST_datametrie":

{"Get_Current_Alarms_Per_Monitor":

{"key_0":

{"IDCONTRAT":"1000","TYPEALARME":"ORANGE",

"DATEALARME":"07\/09\/2015 16:27:51",

"DATEALARME_GMT":"07\/09\/2015 14:27:51",

"DATEESSAI":"07\/09\/2015 16:15:00",

"DATEESSAI_GMT":"07\/09\/2015 14:15:00",

"DATEALARMEFIN":"","DATEALARMEFIN_GMT":"","MANDATORY_PROPERTIES":""},

"status":"success"

}

}

}

Page 18: Datametrie REST API€¦ · DATAMETRIE REST API USER DOCUMENTATION VERSION 15.2.3 CONTACT: ip-label Tel: 01 77 49 53 00 | Fax: 01 49 64 03 80 90 boulevard National, 92250 La Garenne-Colombes

18/38

5 MEASUREMENT RETRIEVAL METHODS

5.1 GET_LIVE_MEASURES

5.1.1 DESCRIPTION

Retrieves all measures conducted since the first request to the web service. This method applies to a given monitor, for a given measurement site.

5.1.2 CALL

5.1.3 PARAMETERS

NAME DESCRIPTION

IDCONTRAT ID of the monitor

SITEID ID of the measurement site

5.1.4 RETURN

Returns a list of JSON documents containing the following fields:

NAME DESCRIPTION

TEST_DATE Date of the test for which measures are being retrieved (local or GMT)

LOCATION Measurement site

MEASURE_LIST Table of measurements

ERROR_LIST Table of errors

Fields in MEASURE_LIST

NAME DESCRIPTION

DATE_ESSAI Theoretical date of the test in local time

DATE_ESSAI_GMT Theoretical date of the test in GMT

IDCONTRAT ID of the monitor

IDMISSION ID of the mission

curl –u %LOGIN%:%PASSWORD% -request GET ‘https://ws.ip-label.net/REST/ Get_Live_Measures/?idcontrat=%IDCONTRAT%&siteid=%SITEID%’

curl –u %LOGIN%:%PASSWORD% -request GET ‘https://ws.ip-label.net/REST/GMT/ Get_Live_Measures/?idcontrat=%IDCONTRAT%&siteid=%SITEID%’

curl –u %LOGIN%:%PASSWORD% -request GET ‘http://ws.ip-label.net/REST/GMT/ Get_Live_Measures/?idcontrat=%IDCONTRAT%&idsite=%IDSITE%’

https://ws.ip-label.net/REST/Get_Live_Measures/?idcontrat=%IDCONTRAT%&siteid=%SITEID%

https://ws.ip-label.net/REST/GMT/Get_Live_Measures/?idcontrat=%IDCONTRAT%&siteid=%SITEID%

Page 19: Datametrie REST API€¦ · DATAMETRIE REST API USER DOCUMENTATION VERSION 15.2.3 CONTACT: ip-label Tel: 01 77 49 53 00 | Fax: 01 49 64 03 80 90 boulevard National, 92250 La Garenne-Colombes

19/38

ID_ISP ID of the provider (used in place of the site ID)

ID_DONNEEMESURE ID of the measured data

VALEURMESUREE Result measured

Fields in ERROR_LIST

NAME DESCRIPTION

DATE_ESSAI Theoretical date of the test in local time

DATE_ESSAI_GMT Theoretical date of the test in GMT

IDCONTRAT ID of the monitor

IDMISSION ID of the mission

DATE_ANOMALIE Date when the error was observed (local time)

DATE_ANOMALIE_GMT Date when the error was observed (GMT)

TYPEANOMALIE ID of the error category

CODEANOMALIE ID of the error subcategory

IDANOMALIEMISSION Error ID

MESSAGE Message associated with the error

REQUETE Request/step where an error was observed

Page 20: Datametrie REST API€¦ · DATAMETRIE REST API USER DOCUMENTATION VERSION 15.2.3 CONTACT: ip-label Tel: 01 77 49 53 00 | Fax: 01 49 64 03 80 90 boulevard National, 92250 La Garenne-Colombes

20/38

EXAMPLE

{"Ipln_WS_REST_datametrie":

{"Get_Live_Measures":

{"key_0":

{"TEST_DATE":

{"DATE":"11\/09\/2015 17:00:00","IS_LOCAL":"1","MANDATORY_PROPERTIES":""},

"LOCATION":{"MANDATORY_PROPERTIES":{"key_0":"SITEID"},"SITEID":"1200"},

"MEASURE_LIST":

{"key_0":{

"DATE_ESSAI":"11\/09\/2015 17:00:00","DATE_ESSAI_GMT":"11\/09\/2015 15:00:00",

"IDCONTRAT":"1000","IDMISSION":"123456","ID_ISP":"",

"ID_DONNEEMESURE":"297","VALEURMESUREE":"1441984313","REQUETE":"1",

"MANDATORY_PROPERTIES":""},

"key_1":{

"DATE_ESSAI":"11\/09\/2015 17:00:00","DATE_ESSAI_GMT":"11\/09\/2015 15:00:00",

"IDCONTRAT":"1000","IDMISSION":"123456","ID_ISP":"",

"ID_DONNEEMESURE":"6","VALEURMESUREE":"47","REQUETE":"1",

"MANDATORY_PROPERTIES},

"ERROR_LIST":

{"key_0":{

"DATE_ESSAI":"11\/09\/2015 17:00:00","DATE_ESSAI_GMT":"11\/09\/2015 15:00:00",

"IDCONTRAT":"1000","REQUETE":"1",

"DATE_ANOMALIE":"11\/09\/2015 17:00:00",

"DATE_ANOMALIE_GMT":"11\/09\/2015 15:00:00",

"IDMISSION":"123456","TYPEANOMALIE":"102","CODEANOMALIE":"404",

"IDANOMALIEMISSION":"13276446196",

"MESSAGE":"http:\/\/www.ip-label.co.uk",

"MANDATORY_PROPERTIES":""}

},"MANDATORY_PROPERTIES":""},

"status":"success"

}

}

}

Page 21: Datametrie REST API€¦ · DATAMETRIE REST API USER DOCUMENTATION VERSION 15.2.3 CONTACT: ip-label Tel: 01 77 49 53 00 | Fax: 01 49 64 03 80 90 boulevard National, 92250 La Garenne-Colombes

21/38

5.2 GET_LAST_MEASURES

5.2.1 DESCRIPTION

Retrieves the measurements of the latest test carried out.

5.2.2 CALL

5.2.3 PARAMETERS

NAME DESCRIPTION

IDCONTRAT ID of the monitor

SITEID ID of the measurement site

5.2.4 RETURN

Returns a list of JSON documents containing the following fields:

NAME DESCRIPTION

TEST_DATE Date of the test for which measures are being retrieved (local or GMT)

LOCATION Measurement site

MEASURE_LIST Table of measurements

ERROR_LIST Table of errors

Fields in MEASURE_LIST

NAME DESCRIPTION

DATE_ESSAI Theoretical date of the test in local time

DATE_ESSAI_GMT Theoretical date of the test in GMT

IDCONTRAT ID of the monitor

IDMISSION ID of the mission

ID_ISP ID of the provider (used in place of the site ID)

ID_DONNEEMESURE ID of the measured data

VALEURMESUREE Result measured

curl –u %LOGIN%:%PASSWORD% -request GET ‘https://ws.ip-label.net/REST/Get_Last_Measures/ ?idcontrat=%IDCONTRAT%&siteid=%SITEID%’

curl –u %LOGIN%:%PASSWORD% -request GET ‘https://ws.ip-label.net/REST/GMT/ Get_Last_Measures/?idcontrat=%IDCONTRAT%&siteid=%SITEID%’

https://ws.ip-label.net/REST/Get_Last_Measures/?idcontrat=%IDCONTRAT%&siteid=%SITEID%

https://ws.ip-label.net/REST/GMT/Get_Last_Measures/?idcontrat=%IDCONTRAT%&siteid=%SITEID%

Page 22: Datametrie REST API€¦ · DATAMETRIE REST API USER DOCUMENTATION VERSION 15.2.3 CONTACT: ip-label Tel: 01 77 49 53 00 | Fax: 01 49 64 03 80 90 boulevard National, 92250 La Garenne-Colombes

22/38

Fields in ERROR_LIST

NAME DESCRIPTION

DATE_ESSAI Theoretical date of the test in local time

DATE_ESSAI_GMT Theoretical date of the test in GMT

IDCONTRAT ID of the monitor

IDMISSION ID of the mission

DATE_ANOMALIE Date when the error was observed (local time)

DATE_ANOMALIE_GMT Date when the error was observed (GMT)

TYPEANOMALIE ID of the error category

CODEANOMALIE ID of the error subcategory

IDANOMALIEMISSION Error ID

MESSAGE Message associated with the error

REQUETE Request/step where an error was observed

EXAMPLE

Page 23: Datametrie REST API€¦ · DATAMETRIE REST API USER DOCUMENTATION VERSION 15.2.3 CONTACT: ip-label Tel: 01 77 49 53 00 | Fax: 01 49 64 03 80 90 boulevard National, 92250 La Garenne-Colombes

23/38

{"Ipln_WS_REST_datametrie":

{"Get_Last_Measures":

{"TEST_DATE":

{"DATE":"14\/09\/2015 09:30:00","IS_LOCAL":"1","MANDATORY_PROPERTIES":""},

"LOCATION":{"MANDATORY_PROPERTIES":{"key_0":"SITEID"},"SITEID":"1"},

"MEASURE_LIST":

{"key_0":{

"DATE_ESSAI":"14\/09\/2015 09:30:00","DATE_ESSAI_GMT":"14\/09\/2015 07:30:00",

"IDCONTRAT":"1000","IDMISSION":"123456","ID_ISP":"",

"ID_DONNEEMESURE":"297","VALEURMESUREE":"1442216524","REQUETE":"1",

"MANDATORY_PROPERTIES":""},

"key_1":{

"DATE_ESSAI":"14\/09\/2015 09:30:00","DATE_ESSAI_GMT":"14\/09\/2015 07:30:00",

"IDCONTRAT":"1000","IDMISSION":"123456","ID_ISP":"",

"ID_DONNEEMESURE":"6","VALEURMESUREE":"0","REQUETE":"1",

"MANDATORY_PROPERTIES":""},

},

"ERROR_LIST":{

"key_0":{

"DATE_ESSAI":"14\/09\/2015 09:30:00","DATE_ESSAI_GMT":"14\/09\/2015 07:30:00",

"IDCONTRAT":"1000","REQUETE":"1",

"DATE_ANOMALIE":"14\/09\/2015 09:30:00",

"DATE_ANOMALIE_GMT":"14\/09\/2015 07:30:00",

"IDMISSION":"123456","TYPEANOMALIE":"102","CODEANOMALIE":"404",

"IDANOMALIEMISSION":"13282504375",

"MESSAGE":"http:\/\/www.ip-label.co.uk",

"MANDATORY_PROPERTIES":""}

},

"MANDATORY_PROPERTIES":"",

"status":"success"}

}

}

}

Page 24: Datametrie REST API€¦ · DATAMETRIE REST API USER DOCUMENTATION VERSION 15.2.3 CONTACT: ip-label Tel: 01 77 49 53 00 | Fax: 01 49 64 03 80 90 boulevard National, 92250 La Garenne-Colombes

24/38

5.3 GET_LAST_MEASURES_DATE

5.3.1 DESCRIPTION

Retrieves the date of the most recent test conducted for a given monitor and site.

5.3.2 CALL

5.3.3 PARAMETERS

NAME DESCRIPTION

IDCONTRAT ID of the monitor

SITEID ID of the measurement site

5.3.4 RETURN

Returns a JSON date type object.

EXAMPLE

{"Ipln_WS_REST_datametrie":

{"Get_Last_Measures_Date":

{"DATE":"14\/09\/2015 10:00:00",

"IS_LOCAL":"1",

"MANDATORY_PROPERTIES":"",

"status":"success"

}

}

}

curl –u %LOGIN%:%PASSWORD% -request GET ‘https://ws.ip-label.net/REST/ Get_Last_Measures_Date/?idcontrat=%IDCONTRAT%&siteid=%SITEID%’

curl –u %LOGIN%:%PASSWORD% -request GET ‘https://ws.ip-label.net/REST/GMT/ Get_Last_Measures_Date/?idcontrat=%IDCONTRAT%&siteid=%SITEID%’

https://ws.ip-label.net/REST/Get_Last_Measures_Date/?idcontrat=%IDCONTRAT%&siteid=%SITEID%

https://ws.ip-label.net/REST/GMT/Get_Last_Measures_Date/?idcontrat=%IDCONTRAT%&siteid=%SITEID%

Page 25: Datametrie REST API€¦ · DATAMETRIE REST API USER DOCUMENTATION VERSION 15.2.3 CONTACT: ip-label Tel: 01 77 49 53 00 | Fax: 01 49 64 03 80 90 boulevard National, 92250 La Garenne-Colombes

25/38

5.4 GET_MEASURES_PER_DATE

5.4.1 DESCRIPTION

Retrieves measurements of a specific date and test for a given monitor and site.

5.4.2 CALL

5.4.3 PARAMETERS

NAME DESCRIPTION

IDCONTRAT ID of the monitor

SITEID ID of the measurement site

TEST_DATE Date of the test for which measures are being retrieved (local or GMT)

5.4.4 RETURN

Returns a list of JSON documents containing the following fields:

NAME DESCRIPTION

TEST_DATE Date of the test for which measures are being retrieved (local or GMT)

LOCATION Measurement site

MEASURE_LIST Table of measurements

ERROR_LIST Table of errors

Fields in MEASURE_LIST

NAME DESCRIPTION

DATE_ESSAI Theoretical date of the test in local time

DATE_ESSAI_GMT Theoretical date of the test in GMT

IDCONTRAT ID of the monitor

IDMISSION ID of the mission

ID_ISP ID of the provider (used in place of the site ID)

ID_DONNEEMESURE ID of the measured data

curl –u %LOGIN%:%PASSWORD% -request GET ‘https://ws.ip-label.net/REST/ Get_Measures_Per_Date/?idcontrat=%IDCONTRAT%&siteid=%SITEID%&test_date=%TEST_DATE%’

curl –u %LOGIN%:%PASSWORD% -request GET ‘https://ws.ip-label.net/REST/GMT/ Get_Measures_Per_Date/?idcontrat=%IDCONTRAT%&siteid=%SITEID%&test_date=%TEST_DATE%’

https://ws.ip-label.net/REST/Get_Measures_Per_Date/?idcontrat=%IDCONTRAT% &siteid=%SITEID%&test_date=%TEST_DATE%

https://ws.ip-label.net/REST/GMT/Get_Measures_Per_Date/?idcontrat=%IDCONTRAT% &siteid=%SITEID%&test_date=%TEST_DATE%

Page 26: Datametrie REST API€¦ · DATAMETRIE REST API USER DOCUMENTATION VERSION 15.2.3 CONTACT: ip-label Tel: 01 77 49 53 00 | Fax: 01 49 64 03 80 90 boulevard National, 92250 La Garenne-Colombes

26/38

VALEURMESUREE Result measured

Fields in ERROR_LIST

NAME DESCRIPTION

DATE_ESSAI Theoretical date of the test in local time

DATE_ESSAI_GMT Theoretical date of the test in GMT

IDCONTRAT ID of the monitor

IDMISSION ID of the mission

DATE_ANOMALIE Date when the error was observed (local time)

DATE_ANOMALIE_GMT Date when the error was observed (GMT)

TYPEANOMALIE ID of the error category

CODEANOMALIE ID of the error subcategory

IDANOMALIEMISSION Error ID

MESSAGE Message associated with the error

REQUETE Request/step where an error was observed

Page 27: Datametrie REST API€¦ · DATAMETRIE REST API USER DOCUMENTATION VERSION 15.2.3 CONTACT: ip-label Tel: 01 77 49 53 00 | Fax: 01 49 64 03 80 90 boulevard National, 92250 La Garenne-Colombes

27/38

EXAMPLE

{"Ipln_WS_REST_datametrie":

{"Get_Measures_Per_Date":

{"TEST_DATE":

{"DATE":"14\/09\/2015 10:00:00","IS_LOCAL":"1","MANDATORY_PROPERTIES":""},

"LOCATION":{"MANDATORY_PROPERTIES":{"key_0":"SITEID"},"SITEID":"1"},

"MEASURE_LIST":{

"key_0":{

"DATE_ESSAI":"14\/09\/2015 10:00:00","DATE_ESSAI_GMT":"14\/09\/2015 08:00:00",

"IDCONTRAT":"1000","IDMISSION":"123456","ID_ISP":"",

"ID_DONNEEMESURE":"297","VALEURMESUREE":"1442217839","REQUETE":"1",

"MANDATORY_PROPERTIES":""},

"key_1":{

"DATE_ESSAI":"14\/09\/2015 10:00:00","DATE_ESSAI_GMT":"14\/09\/2015 08:00:00",

"IDCONTRAT":"1000","IDMISSION":"123456","ID_ISP":"",

"ID_DONNEEMESURE":"6","VALEURMESUREE":"15","REQUETE":"1",

"MANDATORY_PROPERTIES":""}

},

"ERROR_LIST":{

"key_0":{

"DATE_ESSAI":"14\/09\/2015 10:00:00","DATE_ESSAI_GMT":"14\/09\/2015 08:00:00",

"IDCONTRAT":"1000","REQUETE":"1",

"DATE_ANOMALIE":"14\/09\/2015 10:00:00",

"DATE_ANOMALIE_GMT":"14\/09\/2015 08:00:00",

"IDMISSION":"123456","TYPEANOMALIE":"102","CODEANOMALIE":"404",

"IDANOMALIEMISSION":"13282539525",

"MESSAGE":"http:\/\/www.ip-label.co.uk\/","MANDATORY_PROPERTIES":""}

}

"MANDATORY_PROPERTIES":"",

"status":"success"

}

}

}

Page 28: Datametrie REST API€¦ · DATAMETRIE REST API USER DOCUMENTATION VERSION 15.2.3 CONTACT: ip-label Tel: 01 77 49 53 00 | Fax: 01 49 64 03 80 90 boulevard National, 92250 La Garenne-Colombes

28/38

5.5 GET_MEASURES_BETWEEN_DATES

5.5.1 DESCRIPTION

Retrieves measurements from an interval of test dates for a given monitor and location.

5.5.2 CALL

5.5.3 PARAMETERS

NAME DESCRIPTION

IDCONTRAT ID of the monitor

SITEID ID of the measurement site

TEST_DATE1 Date of the test for which measures are being retrieved (local or GMT)

TEST_DATE2 Date of the test for which measures are being retrieved (local or GMT)

Dates can be expressed in local time or GMT. Measurements from date at the end of the interval are not included.

5.5.4 RETURN

Returns a list of JSON documents containing the following fields:

NAME DESCRIPTION

TEST_DATE Date of the test for which measures are being retrieved (local or GMT)

LOCATION Measurement site

MEASURE_LIST Table of measurements

ERROR_LIST Table of errors

Fields in MEASURE_LIST

NAME DESCRIPTION

DATE_ESSAI Theoretical date of the test in local time

DATE_ESSAI_GMT Theoretical date of the test in GMT

IDCONTRAT ID of the monitor

curl –u %LOGIN%:%PASSWORD% -request GET ‘https://ws.ip-label.net/REST/ Get_Measures_Between_Dates/?idcontrat=%IDCONTRAT%&siteid=%SITEID% &test_date1=%TEST_DATE1%&test_date2=%TEST_DATE2%’

curl –u %LOGIN%:%PASSWORD% -request GET ‘https://ws.ip-label.net/REST/GMT/ Get_Measures_Between_Dates/?idcontrat=%IDCONTRAT%&siteid=%SITEID% &test_date1=%TEST_DATE1%&test_date2=%TEST_DATE2%’

https://ws.ip-label.net/REST/Get_Measures_Between_Dates/?idcontrat=%IDCONTRAT% &siteid=%SITEID%&test_date1=%TEST_DATE1%&test_date2=%TEST_DATE2%

https://ws.ip-label.net/REST/GMT/Get_Measures_Between_Dates/?idcontrat==%IDCONTRAT% &siteid=%SITEID%&test_date1=%TEST_DATE1%&test_date2=%TEST_DATE2%

Page 29: Datametrie REST API€¦ · DATAMETRIE REST API USER DOCUMENTATION VERSION 15.2.3 CONTACT: ip-label Tel: 01 77 49 53 00 | Fax: 01 49 64 03 80 90 boulevard National, 92250 La Garenne-Colombes

29/38

IDMISSION ID of the mission

ID_ISP ID of the provider (used in place of the site ID)

ID_DONNEEMESURE ID of the measured data

VALEURMESUREE Result measured

Fields in ERROR_LIST

NAME DESCRIPTION

DATE_ESSAI Theoretical date of the test in local time

DATE_ESSAI_GMT Theoretical date of the test in GMT

IDCONTRAT ID of the monitor

IDMISSION ID of the mission

DATE_ANOMALIE Date when the error was observed (local time)

DATE_ANOMALIE_GMT Date when the error was observed (GMT)

TYPEANOMALIE ID of the error category

CODEANOMALIE ID of the error subcategory

IDANOMALIEMISSION Error ID

MESSAGE Message associated with the error

REQUETE Request/step where an error was observed

Page 30: Datametrie REST API€¦ · DATAMETRIE REST API USER DOCUMENTATION VERSION 15.2.3 CONTACT: ip-label Tel: 01 77 49 53 00 | Fax: 01 49 64 03 80 90 boulevard National, 92250 La Garenne-Colombes

30/38

EXAMPLE

{"Ipln_WS_REST_datametrie":

{"Get_Measures_Between_Dates":

{"TEST_DATE":

{"DATE":"14\/09\/2015 10:00:00","IS_LOCAL":"1","MANDATORY_PROPERTIES":""},

"LOCATION":{"MANDATORY_PROPERTIES":{"key_0":"SITEID"},"SITEID":"1"},

"MEASURE_LIST":{

"key_0":{

"DATE_ESSAI":"14\/09\/2015 10:00:00","DATE_ESSAI_GMT":"14\/09\/2015 08:00:00",

"IDCONTRAT":"1000","IDMISSION":"123456","ID_ISP":"",

"ID_DONNEEMESURE":"297","VALEURMESUREE":"1442217839","REQUETE":"1",

"MANDATORY_PROPERTIES":""},

"key_1":{

"DATE_ESSAI":"14\/09\/2015 10:00:00","DATE_ESSAI_GMT":"14\/09\/2015 08:00:00",

"IDCONTRAT":"1000","IDMISSION":"123456","ID_ISP":"",

"ID_DONNEEMESURE":"6","VALEURMESUREE":"15","REQUETE":"1",

"MANDATORY_PROPERTIES":""}

},

"ERROR_LIST":{

"key_0":{

"DATE_ESSAI":"14\/09\/2015 10:00:00","DATE_ESSAI_GMT":"14\/09\/2015 08:00:00",

"IDCONTRAT":"1000","REQUETE":"1",

"DATE_ANOMALIE":"14\/09\/2015 10:00:00",

"DATE_ANOMALIE_GMT":"14\/09\/2015 08:00:00",

"IDMISSION":"123456","TYPEANOMALIE":"102","CODEANOMALIE":"404",

"IDANOMALIEMISSION":"13282539525",

"MESSAGE":"http:\/\/www.ip-label.co.uk\/ ",

"MANDATORY_PROPERTIES":""}

}

"MANDATORY_PROPERTIES":"",

"status":"success"

}

}

}

Page 31: Datametrie REST API€¦ · DATAMETRIE REST API USER DOCUMENTATION VERSION 15.2.3 CONTACT: ip-label Tel: 01 77 49 53 00 | Fax: 01 49 64 03 80 90 boulevard National, 92250 La Garenne-Colombes

31/38

6 METHOD FOR RETRIEVING MONITOR CONFIGURATIONS

6.1 GET_MONITOR_CONFIGURATION

6.1.1 DESCRIPTION

For a given monitor, retrieves the monitor’s entire configuration:

Global settings

Control parameters for a step

Alert settings

Maintenance settings

6.1.2 CALL

6.1.3 PARAMETERS

NAME DESCRIPTION

IDCONTRAT ID of the monitor

6.1.4 RETURN

Returns a list of JSON documents containing the following fields:

NAME DESCRIPTION

IDCONTRAT ID of the monitor

PARAMETER_LIST

List of the monitor’s parameters:

Text control: checks for text presence (ID 19) or absence (ID 192)

Accept-language: language settings (ID 275)

Domaine d'exclusion de mesure: list of domains to exclude (ID

215)

User agent: user-agent configuration (ID 274).

STEPPARAMETER_LIST

List of parameters by step:

Asservissement texte: text check (ID 8)

Asservissement Absence de texte: check for the absence of text

(ID 30)

HTML wait for – element: wait for HTML item (ID 110)

ALERTCONF_LIST List of configured alerts

curl –u %LOGIN%:%PASSWORD% -request GET ‘https://ws.ip-label.net/REST/ Get_Monitor_Configuration/?idcontrat=%IDCONTRAT%’

curl –u %LOGIN%:%PASSWORD% -request GET ‘https://ws.ip-label.net/REST/GMT/ Get_Monitor_Configuration/?idcontrat=%IDCONTRAT%’

https://ws.ip-label.net/REST/Get_Monitor_Configuration/?idcontrat=%IDCONTRAT%

https://ws.ip-label.net/REST/GMT/Get_Monitor_Configuration/?idcontrat=%IDCONTRAT%

Page 32: Datametrie REST API€¦ · DATAMETRIE REST API USER DOCUMENTATION VERSION 15.2.3 CONTACT: ip-label Tel: 01 77 49 53 00 | Fax: 01 49 64 03 80 90 boulevard National, 92250 La Garenne-Colombes

32/38

ACTIVEMAINTENANCE_LIST List of scheduled active maintenance periods

Fields in PARAMETER_LIST

NAME DESCRIPTION

ID ID of the parameter

NAME Name of the parameter

VALUE Value of the parameter

Fields in STEPPARAMETER_LIST

NAME DESCRIPTION

ID ID of the request parameter

NAME Name of the request parameter

STEP Monitor step

VALUE Value of the parameter

Fields in ALERTCONF_LIST

NAME DESCRIPTION

TYPEALARME Level of the alarm (all, black, red, orange)

TIMEPERIOD Alarm issuing period (all, week, Saturday, Sunday and public holidays)

CALENDARPERIOD Start and end time range

RECIPIENTS Alarm recipients

Fields in ACTIVEMAINTENANCE_LIST

NAME DESCRIPTION

TYPE Type of maintenance (Non recurring, Daily, Weekly, Monthly)

START_DATE Start date of maintenance or reference day for periodical maintenance

END_DATE End date of maintenance or reference day for periodical maintenance

Page 33: Datametrie REST API€¦ · DATAMETRIE REST API USER DOCUMENTATION VERSION 15.2.3 CONTACT: ip-label Tel: 01 77 49 53 00 | Fax: 01 49 64 03 80 90 boulevard National, 92250 La Garenne-Colombes

33/38

EXAMPLE

{"Ipln_WS_REST_datametrie":

{"Get_Monitor_Configuration":

{"IDCONTRAT":"1000",

"PARAMETER_LIST":"",

"STEPPARAMETER_LIST":"",

"ALERTCONF_LIST":{

"key_0":{

"TYPEALARME":"ALL","TIMEPERIOD":"ALL","CALENDARPERIOD":"00h-00h",

"RECIPIENTS":"[email protected]","MANDATORY_PROPERTIES":""},

"key_1":{

"TYPEALARME":"ALL","TIMEPERIOD":"ALL","CALENDARPERIOD":"00h-00h",

"RECIPIENTS":"192.168.0.0","MANDATORY_PROPERTIES":""},

},

"ACTIVEMAINTENANCE_LIST":"",

"MANDATORY_PROPERTIES":"",

"status":"success"}

}

}

Page 34: Datametrie REST API€¦ · DATAMETRIE REST API USER DOCUMENTATION VERSION 15.2.3 CONTACT: ip-label Tel: 01 77 49 53 00 | Fax: 01 49 64 03 80 90 boulevard National, 92250 La Garenne-Colombes

34/38

7 EXAMPLES OF WEB SERVICE USES

7.1 RETRIEVAL OF MEASUREMENTS FOR A MONITOR

The method Get_Monitors retrieves all of the account’s monitors. Each monitor is identified by its IDCONTRAT which can then be passed as a parameter to measurement retrieval methods, some of which associated with an SITEID.

7.2 RETRIEVAL OF ALARMS IN PROGRESS

The method Get_Status_All_Monitors retrieves alarm statuses (alarm in progress or not) of all of the account’s monitors. For a monitor showing an alarm (black alert, for instance), it is then possible to retrieve the alarm’s description by passing IDALARMECONTRAT as a parameter to the method Get_Alarm_Description.

Get_Status_All_Monitors

IDALARMECONTRAT

Get_Alarm_Description

MONITOR_STATUS

GMT

GMT

GMT

Date1

Date2

Date

Get_Monitors

IDCONTRAT SITEID

Get_Last_Measures

Get_Live_Measures

Get_Last_Measures_Date

Get_Measures_Between_Dates

Get_Measures_Per_Date

Get_Current_Alarms_Per_Monitor

Page 35: Datametrie REST API€¦ · DATAMETRIE REST API USER DOCUMENTATION VERSION 15.2.3 CONTACT: ip-label Tel: 01 77 49 53 00 | Fax: 01 49 64 03 80 90 boulevard National, 92250 La Garenne-Colombes

35/38

8 CALCULATION OF INDICATORS

All Datametrie metrics are stored in the form of numeric values, and are propagated as such by the web service. Some of these indicators must be transformed so that they can be interpreted.

8.1 WEB METRICS

8.1.1 TIME STAMP

The timestamp of the measurement is expressed in numeric values of type timestamp (number of seconds elapsed since 01/01/1970).

8.1.1.1 CONVERSION EXAMPLES: PHP

string date ( string format, int timestamp)

The first argument represents the date format. Several characters can be used to specify the format. Here are some of them (extracted from the official documentation):

d - date in the month, two digits (with a zero when called for): "01" to "31"

D - day of week, in three letters (in English): for instance, "Fri" (for Friday)

F - month in English, spelled out in full: e.g. "January"

H - hour, in 24-hour format: "00" to "23"

i - minutes: "00" to "59"

j - date in the month without preceding zero: "1" à "31"

m - number of the month: from "01" to "12"

M - month, in three letters (in English): for instance, "Apr" (for April)

s - seconds: "00" to "59"

Y - year in four digits: eg. "1999"

The second argument is the timestamp to convert.

8.1.1.2 CONVERSION EXAMPLES: ORACLE

SELECT TO_DATE('19700101000000','YYYYMMDDHH24MISS') +

NUMTODSINTERVAL(:timestamp, 'SECOND') FROM dual;

or SELECT TO_DATE('01.01.1970', 'DD.MM.YYYY') + :timestamp/3600/24 FROM dual;

8.1.1.3 CONVERSION EXAMPLES: C#

static DateTime ConvertFromUnixTimestamp(double timestamp)

{

DateTime origin = new DateTime(1970, 1, 1, 0, 0, 0, 0);

return origin.AddSeconds(timestamp);

}

Page 36: Datametrie REST API€¦ · DATAMETRIE REST API USER DOCUMENTATION VERSION 15.2.3 CONTACT: ip-label Tel: 01 77 49 53 00 | Fax: 01 49 64 03 80 90 boulevard National, 92250 La Garenne-Colombes

36/38

8.1.2 IP ADDRESS

IP addresses are also expressed in numeric values. Below are a few examples of calculations for conversion to “standard” format.

8.1.2.1 CONVERSION EXAMPLES: PHP

$text=implode('.',array_reverse(explode('.',long2ip($Adresse))));

8.1.2.2 CONVERSION EXAMPLES: ORACLE

SELECT MOD( :iAdresse,256) || '.' || MOD(TRUNC( :iAdresse/256),256) || '.' ||

MOD(TRUNC( :iAdresse/(256*256)),256) || '.' ||

MOD(TRUNC(:iAdresse/(256*256*256)),256) FROM dual;

8.1.2.3 CONVERSION EXAMPLES: C#

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Net; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { long longIP = 101230784; IPAddress addr; addr = new IPAddress(longIP); string ip = addr.ToString(); Console.WriteLine(ip); } } }

Page 37: Datametrie REST API€¦ · DATAMETRIE REST API USER DOCUMENTATION VERSION 15.2.3 CONTACT: ip-label Tel: 01 77 49 53 00 | Fax: 01 49 64 03 80 90 boulevard National, 92250 La Garenne-Colombes

37/38

9 REMARKS

9.1 MISCELLANEOUS

At present, data are stored for a rolling 30-day period. This duration may, however, be shortened by ip-label. Please contact ip-label if your needs call for retrieval of data over long periods.

The user’s language is not taken into account in labels (measurements, errors, etc.). It will be taken into account in a future version. Please contact Customer Support for further information on such labels.

Measurements from Network and Traceroute monitors are not available with the current version of the web service.

The web service allows access to monitors that have conducted measurements over the past two months.

Only the sites associated with the geographical area at the time the web service is queried are accessible (if the area has been changed, the old measurement sites become inaccessible).

When web service access has been activated for an account, that account can retrieve measurements from all of its own monitors as well as from shared monitors. For main administrator accounts that have activated the option, the monitors of the associated sub-accounts can also be accessed.

When someone stops or restarts a monitor, this is taken into account by the web service for measurement propagation within a maximum of10 minutes. Nevertheless, the monitor’s status may remain unchanged for up to 2 hours.

The time it takes for measurements to become accessible via the web service is about 10 minutes with respect to propagation of measurements on the extranet.

For VoIP monitors, the Speech Quality indicator is calculated and inserted into the database separately from Connection Time measurements. Therefore they may take 5 minutes longer to transmit than Connection Time measurements.

For TV monitors the MOS score and FREEZE are not propagated.

9.2 NOTION OF ERROR (ANOMALY)

Datametrie errors are divided into two groups: major errors and minor anomalies.

Major errors are considered to be those that block operation and impact the monitor’s availability rate. In Datametrie codification, these errors have a “typeanomalie” under 100.

Minor anomalies do not block operation and do not impact the monitor’s availability rate. In Datametrie codification, they have a “typeanomalie” above 100.

9.3 NOTION OF CONTRACT AND MISSION

9.3.1 CONTRACT

The contract corresponds to a monitor. It is represented by a unique ID (IdContrat).

Page 38: Datametrie REST API€¦ · DATAMETRIE REST API USER DOCUMENTATION VERSION 15.2.3 CONTACT: ip-label Tel: 01 77 49 53 00 | Fax: 01 49 64 03 80 90 boulevard National, 92250 La Garenne-Colombes

38/38

9.3.2 MISSION

A mission is an execution schedule for a type of test on a given measurement site.

For example:

A ‘Single’ type monitor, running every 15 minutes from 5 measurement sites, has 5 separate missions (one per site).

A monitor running every 60 minutes from 1 measurement site has 1 mission only.

Comment:

Traceroute measurements are considered as separate missions. However, these measurements are not available in the current version of the Web Service.