### Example API Call Source: https://atlas.ripe.net/docs/apis/rest-api-manual/README An example GET request to retrieve a list of measurements with a specified page size. ```APIDOC ## Example API Call ### Description This example demonstrates how to fetch a list of measurements, limiting the results to three per page. ### Method GET ### Endpoint `/api/v2/measurements` ### Query Parameters - **page_size** (integer) - Optional - The number of items to return per page. ### Request Example `GET https://atlas.ripe.net/api/v2/measurements?page_size=3` ### Response #### Success Response (200) Returns a list of measurement objects. ``` -------------------------------- ### GET /api/v2/measurements/{measurement_id}/status-check Source: https://atlas.ripe.net/docs/apis/rest-api-manual/measurements/simple_example Get basic dashboard values for a RIPE Atlas measurement, useful for monitoring engines. ```APIDOC ## GET /api/v2/measurements/{measurement_id}/status-check ### Description Retrieves basic dashboard values for a RIPE Atlas measurement, including probe status, last round-trip time, and packet loss. This endpoint is suitable for integration with monitoring systems. ### Method GET ### Endpoint `https://atlas.ripe.net/api/v2/measurements/{measurement_id}/status-check/` ### Parameters #### Path Parameters - **measurement_id** (string) - Required - The unique identifier for the measurement. ### Request Example ``` GET https://atlas.ripe.net/api/v2/measurements/123456789/status-check ``` ### Response #### Success Response (200) - **global_alert** (boolean) - Indicates if there is a global alert for the measurement. - **probes** (object) - An object containing status information for each probe. - **probe_id** (string) - The ID of the probe. - **alert** (boolean) - Indicates if there is an alert for this specific probe. - **last** (number) - The last recorded round-trip time in milliseconds. - **last_packet_loss** (number) - The last recorded packet loss percentage. - **source** (string) - Information about the probe's source (e.g., country). #### Response Example ```json { "global_alert": false, "probes": { "123": { "alert": false, "last": 107.296, "last_packet_loss": 0.0, "source": "Country: NL" }, "234": { "alert": false, "last": 14.152, "last_packet_loss": 0.0, "source": "Country: GR" }, "345": { "alert": false, "last": 9.328, "last_packet_loss": 0.0, "source": "Country: CA" }, "456": { "alert": false, "last": 21.761, "last_packet_loss": 0.0, "source": "Country: BR" }, "567": { "alert": false, "last": 28.281, "last_packet_loss": 0.0, "source": "Country: AU" } } } ``` ``` -------------------------------- ### Get Measurement Information Source: https://atlas.ripe.net/docs/apis/rest-api-manual/measurements/simple_example This code snippet shows how to retrieve basic information about a RIPE Atlas measurement using its ID. It utilizes a GET request to the RIPE Atlas API v2. ```http GET https://atlas.ripe.net/api/v2/measurements/123456789/ ``` -------------------------------- ### GET /api/v2/measurements/{measurement_id}/ Source: https://atlas.ripe.net/docs/apis/rest-api-manual/measurements/simple_example Retrieve basic information about a specific RIPE Atlas measurement using its ID. ```APIDOC ## GET /api/v2/measurements/{measurement_id}/ ### Description Retrieves basic information about a specific RIPE Atlas measurement. ### Method GET ### Endpoint `https://atlas.ripe.net/api/v2/measurements/{measurement_id}/` ### Parameters #### Path Parameters - **measurement_id** (string) - Required - The unique identifier for the measurement. ``` -------------------------------- ### RIPE Atlas Measurement Payload Example (JSON) Source: https://atlas.ripe.net/docs/apis/rest-api-manual/measurements/types/a-full-example This JSON payload defines a RIPE Atlas measurement, including multiple measurement definitions with different parameters like target, type, protocol, and probe-specific settings. It also specifies probe selection criteria based on area, country, and specific probe IDs, along with global start and stop times. ```json { "definitions": [ { "target": "www.ripe.net", "description": "My Complex Measurement", "type": "traceroute", "af": 6, "resolve_on_probe": true, "is_public": true, "packets": 16, "protocol": "ICMP", "paris": 99, "firsthop": 30, "interval": 1800, "is_oneoff": false, "tags":["my-example-tag", "another-tag"] }, { "target": "www.ripe.net", "description": "My Complex Measurement", "type": "ping", "af": 4, "resolve_on_probe": false, "is_public": false } ], "probes": [ { "requested": 10, "type": "area", "value": "WW" }, { "requested": 5, "type": "country", "value": "GR" }, { "requested": 5, "type": "country", "value": "CA" }, { "requested": 3, "type": "probes", "value": [55,19,252] }, { "requested": 1, "type": "udm", "value": 1000002 } ], "start_time": 1461807395, "stop_time": "2018-01-01T12:00:00Z", "is_oneoff": true } ``` -------------------------------- ### GET /api/v2/measurements/{measurement_id}/ Source: https://atlas.ripe.net/docs/apis/rest-api-manual/measurements/status-checks/simple-example Retrieves basic information about a specific RIPE Atlas measurement using its unique ID. ```APIDOC ## GET /api/v2/measurements/{measurement_id}/ ### Description Retrieves basic information about a specific RIPE Atlas measurement. ### Method GET ### Endpoint https://atlas.ripe.net/api/v2/measurements/{measurement_id}/ ### Parameters #### Path Parameters - **measurement_id** (string) - Required - The unique identifier for the measurement. ### Request Example ``` GET https://atlas.ripe.net/api/v2/measurements/123456789/ ``` ### Response #### Success Response (200) - **id** (integer) - The measurement ID. - **type** (string) - The type of measurement (e.g., 'ping'). - **url** (string) - The URL being measured. - **probe_count** (integer) - The number of probes used in the measurement. #### Response Example ```json { "id": 123456789, "type": "ping", "url": "www.example.com", "probe_count": 5 } ``` ``` -------------------------------- ### Get Measurement Status Check Source: https://atlas.ripe.net/docs/apis/rest-api-manual/measurements/simple_example This snippet demonstrates how to fetch the status check for a RIPE Atlas measurement. The status check provides dashboard values for probes associated with the measurement, useful for monitoring engines. ```http GET https://atlas.ripe.net/api/v2/measurements/123456789/status-check ``` -------------------------------- ### Get Measurement Status Check API Request and Response Source: https://atlas.ripe.net/docs/apis/rest-api-manual/measurements/status-checks/simple-example This snippet demonstrates how to fetch the status check for a RIPE Atlas measurement, including probe details like latency and packet loss. It also shows a sample successful HTTP response with data for multiple probes across different countries. ```HTTP # Request GET https://atlas.ripe.net/api/v2/measurements/123456789/status-check # Response HTTP/1.1 200 OK Date: Tue, 29 Oct 2013 14:37:37 GMT X-RIPE-Atlas-Global-Alert: 0 Content-Type: text/plain Cache-Control: no-cache { "global_alert": false, "probes": { "123": { "alert": false, "last": 107.296, "last_packet_loss": 0.0, "source": "Country: NL" }, "234": { "alert": false, "last": 14.152, "last_packet_loss": 0.0, "source": "Country: GR" }, "345": { "alert": false, "last": 9.328, "last_packet_loss": 0.0, "source": "Country: CA" }, "456": { "alert": false, "last": 21.761, "last_packet_loss": 0.0, "source": "Country: BR" }, "567": { "alert": false, "last": 28.281, "last_packet_loss": 0.0, "source": "Country: AU" } } } ``` -------------------------------- ### Status Check Response Example Source: https://atlas.ripe.net/docs/apis/rest-api-manual/measurements/simple_example This is an example of a successful HTTP response for a RIPE Atlas measurement status check. It includes probe details such as alert status, last RTT, packet loss, and source location. ```http HTTP/1.1 200 OK Date: Tue, 29 Oct 2013 14:37:37 GMT X-RIPE-Atlas-Global-Alert: 0 Content-Type: text/plain Cache-Control: no-cache { "global_alert": false, "probes": { "123": { "alert": false, "last": 107.296, "last_packet_loss": 0.0, "source": "Country: NL" }, "234": { "alert": false, "last": 14.152, "last_packet_loss": 0.0, "source": "Country: GR" }, "345": { "alert": false, "last": 9.328, "last_packet_loss": 0.0, "source": "Country: CA" }, "456": { "alert": false, "last": 21.761, "last_packet_loss": 0.0, "source": "Country: BR" }, "567": { "alert": false, "last": 28.281, "last_packet_loss": 0.0, "source": "Country: AU" } } ``` -------------------------------- ### RIPE Atlas API Response Examples Source: https://atlas.ripe.net/docs/apis/rest-api-manual/measurements/types/example Illustrates the expected JSON responses from the RIPE Atlas API. Includes a success response with a measurement ID and error responses for authentication failures or invalid payload input. ```json {"measurements": []} ``` ```json {"error":{"status":403,"code":104,"detail":"Authentication credentials were not provided.","title":"Forbidden"}} ``` ```json { "error": { "status": 400, "code": 104, "detail": "Invalid input. Please check the documentation.", "title": "Bad Request" } } ``` -------------------------------- ### GET /api/v2/measurements/{measurement_id}/status-check/ Source: https://atlas.ripe.net/docs/apis/rest-api-manual/measurements/simple_example Retrieves the status check for a specific RIPE Atlas measurement. The response includes a JSON object detailing global alert status and probe-specific information, or can be configured to use HTTP status codes to indicate alerts. ```APIDOC ## GET /api/v2/measurements/{measurement_id}/status-check/ ### Description Retrieves the status check for a specific RIPE Atlas measurement. The response includes a JSON object detailing global alert status and probe-specific information, or can be configured to use HTTP status codes to indicate alerts. ### Method GET ### Endpoint `/api/v2/measurements/{measurement_id}/status-check/` ### Parameters #### Query Parameters - **change_http_status** (integer) - Optional - If set to `1`, the API will use HTTP status codes (200 or 418) to indicate the alert status instead of a JSON response. ### Request Example ``` GET https://atlas.ripe.net/api/v2/measurements/123456789/status-check/?change_http_status=1 Host: atlas.ripe.net ``` ### Response #### Success Response (200) - **global_alert** (boolean) - Indicates if any probe has triggered an alert. - **probes** (object) - A map of probe IDs to their status details. - **[probe_id]** (object) - **alert** (boolean) - Indicates if this specific probe has triggered an alert. - **last** (number or null) - The result of the last ping attempt. `null` if no packets were received. - **last_packet_loss** (number) - The percentage of packet loss in the last attempt. - **source** (string) - Geographical origin of the probe (e.g., "Country: NL"). - **alert_reasons** (array of strings, optional) - Reasons for the alert (e.g., `["loss"]`, `["latency"]`). - **all** (array, optional) - A list of all packet results used to calculate `last`. #### Response Example (JSON) ```json { "global_alert": true, "probes": { "123": { "alert": false, "last": 107.296, "last_packet_loss": 0.0, "source": "Country: NL" }, "567": { "alert": true, "alert_reasons": [ "loss" ], "all": [ null, null, null ], "last": null, "last_packet_loss": 100.0, "source": "Country: AU" } } } ``` #### Error Response (418 - when `change_http_status=1` is used and an alert is triggered) HTTP/1.1 418 UNKNOWN STATUS CODE Date: Tue, 29 Oct 2013 14:37:37 GMT X-RIPE-Atlas-Global-Alert: 1 Content-Type: text/plain Cache-Control: no-cache ### Notes - The `X-RIPE-Atlas-Global-Alert` header will be set to `1` when `global_alert` is true. - Monitoring systems like Nagios can use the `check_http` script with the `-H atlas.ripe.net` option to check the host header and alert on non-200 status codes when `change_http_status=1` is used. ``` -------------------------------- ### GET /api/v2/measurements/{measurement_id}/status-check/ Source: https://atlas.ripe.net/docs/apis/rest-api-manual/measurements/status-checks/simple-example Retrieves the status check information for a given RIPE Atlas measurement. The response includes details about probe statuses and an overall global alert status. An optional query parameter `change_http_status=1` can alter the HTTP response code to indicate alerts. ```APIDOC ## GET /api/v2/measurements/{measurement_id}/status-check/ ### Description Retrieves the status check information for a given RIPE Atlas measurement. The response includes details about probe statuses and an overall global alert status. An optional query parameter `change_http_status=1` can alter the HTTP response code to indicate alerts. ### Method GET ### Endpoint `/api/v2/measurements/{measurement_id}/status-check/` ### Parameters #### Path Parameters - **measurement_id** (string) - Required - The unique identifier of the measurement. #### Query Parameters - **change_http_status** (integer) - Optional - If set to `1`, the HTTP response code will be used to indicate alerts (e.g., 418 for alert, 200 for OK). ### Request Example ```bash HEAD https://atlas.ripe.net/api/v2/measurements/123456789/status-check/?change_http_status=1 ``` ### Response #### Success Response (200) - **global_alert** (boolean) - Indicates if any probe in the measurement has triggered a global alert. - **probes** (object) - A dictionary where keys are probe IDs and values contain probe-specific alert information. - **probe_id** (string) - The ID of the probe. - **alert** (boolean) - Indicates if this specific probe has triggered an alert. - **last** (number | null) - The result of the last ping attempt. - **last_packet_loss** (number) - The percentage of packet loss in the last attempt. - **source** (string) - Information about the probe's location (e.g., "Country: NL"). - **alert_reasons** (array of strings) - Optional - Reasons for the alert (e.g., "loss", "latency"). - **all** (array) - Optional - A list of all packet results used to calculate `last`. #### Response Example (JSON) ```json { "global_alert": true, "probes": { "123": { "alert": false, "last": 107.296, "last_packet_loss": 0.0, "source": "Country: NL" }, "567": { "alert": true, "alert_reasons": [ "loss" ], "all": [ null, null, null ], "last": null, "last_packet_loss": 100.0, "source": "Country: AU" } } } ``` #### Response Example (HTTP Status Code Abuse) ```http HTTP/1.1 418 UNKNOWN STATUS CODE Date: Tue, 29 Oct 2013 14:37:37 GMT X-RIPE-Atlas-Global-Alert: 1 Content-Type: text/plain Cache-Control: no-cache ``` ``` -------------------------------- ### RIPE Atlas API Status Check URL Examples Source: https://atlas.ripe.net/docs/apis/rest-api-manual/measurements/status-checks/complex-example These examples illustrate different ways to configure the `median_rtt_threshold` parameter in the RIPE Atlas API v2 status-check endpoint. The threshold can be specified as an integer, a percentage, a negative integer, or a negative percentage, allowing for flexible alert conditions based on RTT variations. ```url https://atlas.ripe.net/api/v2/measurements/123456789/status-check/?lookback=10&median_rtt_threshold=10 ``` ```url https://atlas.ripe.net/api/v2/measurements/123456789/status-check/?lookback=10&median_rtt_threshold=10% ``` ```url https://atlas.ripe.net/api/v2/measurements/123456789/status-check/?lookback=10&median_rtt_threshold=-10 ``` ```url https://atlas.ripe.net/api/v2/measurements/123456789/status-check/?lookback=10&median_rtt_threshold=-10% ``` -------------------------------- ### Atlas Traceroute v6 Example Output Source: https://atlas.ripe.net/docs/apis/measurement-result-format An example JSON output for an Atlas v6 traceroute measurement. This demonstrates the structure of the 'result' field, including hop number, source IP, round-trip time, packet size, and time-to-live. ```json { "af": 6, "dst_addr": "2001:7fd::1", "dst_name": "2001:7fd::1", "endtime": 1339665496, "from": "2001:67c:2e8:13:220:4aff:fec6:cd06", "fw": 4460, "msm_id": 6001, "paris_id": 4, "prb_id": 114, "proto": "UDP", "result": [ { "hop": 1, "result": [ { "from": "2001:67c:2e8:13::2", "rtt": 2.2989999999999999, "size": 96, "ttl": 63 }, { "from": "2001:67c:2e8:13::2", "rtt": 2.4990000000000001, "size": 96, "ttl": 63 }, { "from": "2001:67c:2e8:13::2", "rtt": 2.8719999999999999, "size": 96, "ttl": 63 } ] }, { "hop": 2, "result": [ { "from": "2001:7f8:1::a502:5152:1", "rtt": 2.4009999999999998, "size": 96, "ttl": 63 }, { "from": "2001:7f8:1::a502:5152:1", "rtt": 2.5409999999999999, "size": 96, "ttl": 63 }, { "from": "2001:7f8:1::a502:5152:1", "rtt": 2.6360000000000001, "size": 96, "ttl": 63 } ] }, { "hop": 3, "result": [ { "from": "2001:7fd::1", "rtt": 2.4060000000000001, "size": 96, "ttl": 62 }, { "from": "2001:7fd::1", "rtt": 2.3300000000000001, "size": 96, "ttl": 62 }, { "from": "2001:7fd::1", "rtt": 2.4060000000000001, "size": 96, "ttl": 62 } ] } ], "size": 40, "src_addr": "2001:67c:2e8:13:220:4aff:fec6:cd06", "timestamp": 1339665496, "type": "traceroute" } ``` -------------------------------- ### GET /api/v2/measurements/tags/ Source: https://atlas.ripe.net/docs/apis/rest-api-reference/measurements Lists all RIPE Atlas measurement tags. ```APIDOC ## GET /api/v2/measurements/tags/ ### Description Lists all RIPE Atlas measurement tags. ### Method GET ### Endpoint /api/v2/measurements/tags/ ### Parameters #### Query Parameters - **format** (enum) - Optional - Choose between available output formats (api, json). Accepted values: [api, json]. - **tag__startswith** (string) - Optional - Filter by tags starting with this string. ### Response #### Success Response (200) - **tag** (string) - A publicly visible and human-readable tag. #### Response Example (Example response not provided in the source text.) ``` -------------------------------- ### RIPE Atlas REST API Manual Source: https://atlas.ripe.net/docs/apis A complete guide to using the RIPE Atlas REST API, covering authentication, endpoints, and common use cases. ```APIDOC ## RIPE Atlas REST API Manual ### Description This section provides a comprehensive guide to using the RIPE Atlas REST API. It covers essential information for interacting with the API, including authentication methods, available endpoints, and examples of common operations. ### Method GET ### Endpoint /api/v2/ ### Parameters #### Query Parameters - **api_key** (string) - Required - Your API key for authentication. - **format** (string) - Optional - The desired output format (e.g., 'json', 'xml'). Defaults to 'json'. ### Request Example ```json { "example": "curl -H \"Key: YOUR_API_KEY\" https://atlas.ripe.net/api/v2/" } ``` ### Response #### Success Response (200) - **documentation_url** (string) - URL to the full API documentation. - **api_version** (string) - The current version of the API. #### Response Example ```json { "documentation_url": "https://atlas.ripe.net/docs/api/v2/", "api_version": "v2" } ``` ``` -------------------------------- ### Available Visualisations Source: https://atlas.ripe.net/docs/apis/streaming-api Links to various visualizations related to DNS root instances, probe connections, and real-time latency graphs. ```APIDOC ## Available Visualisations ### Description * Visualising which DNS root instance a probe ends up on: DNS root instances * Visualising probe connections and disconnections: Probe connections/disconnections * Real-time latency graphs (against AS3333): Real-time latency graphs ``` -------------------------------- ### Create Measurement Source: https://atlas.ripe.net/docs/apis/rest-api-manual/measurements/types/example This endpoint allows you to create new measurements on RIPE Atlas. You can specify the target, description, type of measurement, and the probes to be used. ```APIDOC ## POST /api/v2/measurements/ ### Description Creates a new measurement on RIPE Atlas. ### Method POST ### Endpoint `/api/v2/measurements/` ### Parameters #### Request Body - **definitions** (array) - Required - An array of measurement definitions. - **target** (string) - Required - The target for the measurement (e.g., a domain name or IP address). - **description** (string) - Required - A human-readable description of the measurement. - **type** (string) - Required - The type of measurement (e.g., "ping"). - **af** (integer) - Required - The address family (4 or 6). - **probes** (array) - Required - An array specifying the probes to be used. - **requested** (integer) - Required - The number of probes requested. - **type** (string) - Required - The type of probe selection (e.g., "area"). - **value** (string) - Required - The value for the probe selection (e.g., "WW" for worldwide). ### Request Example ```json { "definitions": [ { "target": "ripe.net", "description": "My First Measurement", "type": "ping", "af": 4 } ], "probes": [ { "requested": 50, "type": "area", "value": "WW" } ] } ``` ### Response #### Success Response (200) - **measurements** (array) - A list containing the ID(s) of the created measurement(s). #### Response Example ```json { "measurements": [ "" ] } ``` #### Error Responses - **403 Forbidden**: Authentication credentials were not provided or are invalid. - **400 Bad Request**: Invalid input in the request payload. ``` -------------------------------- ### Create Ping Measurement via cURL Source: https://atlas.ripe.net/docs/apis/rest-api-manual/measurements/types/example This snippet demonstrates how to create a ping measurement from 50 probes globally to ripe.net using cURL. It requires an API key for authorization and specifies the target, description, type, and probe request details in the JSON payload. ```shell curl --location 'https://atlas.ripe.net/api/v2/measurements/' \ --header 'Authorization: Key ********-****-****-****-************' \ --data '{ "definitions": [ { "target": "ripe.net", "description": "My First Measurement", "type": "ping", "af": 4 } ], "probes": [ { "requested": 5, "type": "area", "value": "WW" } ] }' ``` -------------------------------- ### Account Overview Source: https://atlas.ripe.net/docs/apis/rest-api-manual/credits/account-overview Retrieves the account overview, including balance and estimated daily income/expenditure. Requires a valid API key with read permissions. ```APIDOC ## GET /api/v2/credits/ ### Description Retrieves the fundamental account information, including your balance and your estimated daily income and expenditure. This endpoint also provides links to other related API endpoints for income, expense, and transaction history. ### Method GET ### Endpoint /api/v2/credits/ ### Parameters #### Query Parameters - **key** (string) - Required - The UUID of an API key with the necessary read permissions for this operation. ### Request Example ```json { "example": "/api/v2/credits/?key=YOUR_KEY_WITH_KEYS_READ_PERMISSION" } ``` ### Response #### Success Response (200) - **balance** (number) - The current credit balance of the account. - **estimated_daily_income** (number) - The estimated income per day. - **estimated_daily_expense** (number) - The estimated expenditure per day. - **links** (object) - Contains links to other related API endpoints for detailed history. - **income_history** (string) - URL for income transaction history. - **expense_history** (string) - URL for expense transaction history. - **transaction_history** (string) - URL for all transaction history. #### Response Example ```json { "balance": 1500.75, "estimated_daily_income": 5.20, "estimated_daily_expense": 3.10, "links": { "income_history": "/api/v2/credits/income/", "expense_history": "/api/v2/credits/expense/", "transaction_history": "/api/v2/credits/transactions/" } } ``` ``` -------------------------------- ### API Request: Get Specific Probe Fields Source: https://atlas.ripe.net/docs/apis/rest-api-manual/fields This example demonstrates how to use the `fields` query parameter to retrieve only specific fields for a given probe. It shows a GET request targeting a probe by its ID and specifying the desired fields. ```http GET /api/v2/probes/143/?fields=first_connected,status_since ``` -------------------------------- ### Fetch Latest Measurement Results (API GET Request) Source: https://atlas.ripe.net/docs/apis/rest-api-manual/measurements/latest This example demonstrates how to make a GET request to the RIPE Atlas API to retrieve the latest measurement results for a specific measurement ID and probe IDs. It shows the URL structure and query parameters. ```http GET /api/v2/measurements/2000000/latest/?probe_ids=10006 ``` -------------------------------- ### API Key Authentication Example Source: https://atlas.ripe.net/docs/apis/rest-api-manual/authentication/api-keys Demonstrates how to include an API key in the Authorization header when making a request to the RIPE Atlas API. ```APIDOC ## GET /api/v2/measurements/ ### Description This endpoint retrieves a list of measurements. Authentication is required using an API key. ### Method GET ### Endpoint https://atlas.ripe.net/api/v2/measurements/ ### Parameters #### Query Parameters None specified. #### Request Body None. ### Request Example ```shell curl -H "Authorization: Key 1233-3434-4556-565" "https://atlas.ripe.net/api/v2/measurements/" ``` ### Response #### Success Response (200) - **measurements** (array) - A list of measurement objects. #### Response Example ```json { "measurements": [ { "id": 12345, "name": "My Test Measurement", "type": "ping", "target": "example.com", "status": "active" } ] } ``` ### Error Handling A 403 Forbidden error will be returned if: - The API key does not provide the required permission. - The API key does not exist. - The API key is either not enabled or is outside of the defined `valid from` to `valid to` time range. ``` -------------------------------- ### GET /api/v2/measurements/{measurement_id}/status-check Source: https://atlas.ripe.net/docs/apis/rest-api-manual/measurements/status-checks/simple-example Retrieves status check dashboard values for a specific RIPE Atlas measurement, indicating network health. ```APIDOC ## GET /api/v2/measurements/{measurement_id}/status-check ### Description Retrieves status check dashboard values for a specific RIPE Atlas measurement, providing insights into availability and response times from various probe locations. ### Method GET ### Endpoint https://atlas.ripe.net/api/v2/measurements/{measurement_id}/status-check ### Parameters #### Path Parameters - **measurement_id** (string) - Required - The unique identifier for the measurement. ### Request Example ``` GET https://atlas.ripe.net/api/v2/measurements/123456789/status-check ``` ### Response #### Success Response (200) - **global_alert** (boolean) - Indicates if there is a global alert for the measurement. - **probes** (object) - An object where keys are probe IDs and values contain probe-specific alert status, last recorded RTT, last packet loss, and source information. - **probe_id** (object) - **alert** (boolean) - Indicates if there is an alert for this specific probe. - **last** (float) - The last recorded Round Trip Time (RTT) in milliseconds. - **last_packet_loss** (float) - The last recorded packet loss percentage. - **source** (string) - Information about the probe's source (e.g., 'Country: NL'). #### Response Example ```json { "global_alert": false, "probes": { "123": { "alert": false, "last": 107.296, "last_packet_loss": 0.0, "source": "Country: NL" }, "234": { "alert": false, "last": 14.152, "last_packet_loss": 0.0, "source": "Country: GR" }, "345": { "alert": false, "last": 9.328, "last_packet_loss": 0.0, "source": "Country: CA" }, "456": { "alert": false, "last": 21.761, "last_packet_loss": 0.0, "source": "Country: BR" }, "567": { "alert": false, "last": 28.281, "last_packet_loss": 0.0, "source": "Country: AU" } } } ``` ``` -------------------------------- ### API Request: Get Optional Measurement Fields Source: https://atlas.ripe.net/docs/apis/rest-api-manual/fields This example shows how to use the `optional_fields` query parameter to include additional, non-default fields in a measurement's API response. It illustrates a GET request for a measurement, requesting `participation_requests` and `probes` which are not returned by default. ```http GET /api/v2/measurements/2000000/?optional_fields=participation_requests,probes ``` -------------------------------- ### GET /api/v2/measurements/{measurement_id}/status-check/ Source: https://atlas.ripe.net/docs/apis/rest-api-manual/measurements/status-checks/complex-example Retrieves the status check for a given measurement. This endpoint allows for customization of alert thresholds and data visibility. ```APIDOC ## GET /api/v2/measurements/{measurement_id}/status-check/ ### Description Retrieves the status check for a given measurement, with options to control alert sensitivity and data display. ### Method GET ### Endpoint /api/v2/measurements/{measurement_id}/status-check/ ### Query Parameters - **max_packet_loss** (integer) - Optional - The acceptable percentage packet loss per probe. Defaults to 75. - **show_all** (boolean) - Optional - Whether to show all RTT responses. Defaults to false (only shows responses for alerting probes). - **permitted_total_alerts** (integer) - Optional - The total number of probes permitted to respond with an alert before a global alert is issued. Defaults to 0. - **lookback** (integer) - Optional - The number of measurement results to compare to generate a median RTT value. Defaults to 1. - **median_rtt_threshold** (number) - Optional - The threshold at which an alert should be issued when comparing the latest RTT value to median values. ### Request Example ``` GET https://atlas.ripe.net/api/v2/measurements/123456789/status-check/?max_packet_loss=95&show_all=true&permitted_total_alerts=3 ``` ### Response #### Success Response (200) - **probe_id** (string) - Identifier for the probe. - **alert** (boolean) - Indicates if an alert is triggered for the probe. - **all** (array) - Contains all RTT responses if `show_all` is true or if an alert is triggered. - **last** (number) - The last recorded RTT value. - **last_packet_loss** (number) - The last recorded packet loss percentage. - **source** (string) - Information about the probe's source. - **alert_reasons** (array) - Reasons for the alert, if any. #### Response Example ```json { "234": { "alert": false, "all": [ 12.123, 14.152, 17.321 ], "last": 14.152, "last_packet_loss": 0.0, "source": "Country: GR" } } ``` ``` -------------------------------- ### GET /api/v2/measurements/{measurement_id}/status-check/ Source: https://atlas.ripe.net/docs/apis/rest-api-manual/measurements/status-checks/complex-example Retrieves the status check for a given measurement, with options to filter by packet loss, number of alerts, and display RTT values. ```APIDOC ## GET /api/v2/measurements/{measurement_id}/status-check/ ### Description Retrieves the status check for a given measurement. This endpoint allows for flexible querying by combining various parameters to filter results based on packet loss, RTT thresholds, and the number of probes alerting. ### Method GET ### Endpoint `/api/v2/measurements/{measurement_id}/status-check/` ### Parameters #### Query Parameters - **permitted_total_alerts** (integer) - Optional - The maximum number of probes that can be alerting globally before a global alert is triggered. - **max_packet_loss** (integer) - Optional - The maximum allowed packet loss percentage for a probe to be considered non-alerting. - **show_all** (integer) - Optional - If set to 1, all RTT values will be shown, regardless of alert status. Defaults to showing only alerted probes. - **lookback** (integer) - Optional - The number of past results to consider for calculating medians and thresholds. - **median_rtt_threshold** (integer) - Optional - The percentage by which the latest RTT must exceed the median RTT to trigger an alert. ### Request Example ```json { "example": "GET https://atlas.ripe.net/api/v2/measurements/123456789/status-check/?permitted_total_alerts=3&max_packet_loss=50" } ``` ### Response #### Success Response (200) This endpoint returns a JSON object containing status information for the probes associated with the measurement. The exact structure may vary based on the query parameters used, but typically includes details on alerted probes, RTT values, and packet loss. #### Response Example ```json { "example": "{\"results\": [{\"probe_asn\": 64500, \"probe_country\": \"NL\", \"rtt\": 10.5, \"packet_loss\": 0.0, \"alert\": false}, {\"probe_asn\": 64501, \"probe_country\": \"DE\", \"rtt\": 50.2, \"packet_loss\": 10.0, \"alert\": true}]}" } ``` ``` -------------------------------- ### RIPE Atlas REST API Reference Source: https://atlas.ripe.net/docs/apis Detailed reference documentation for all available RIPE Atlas REST API endpoints, including parameters, request/response formats, and examples. ```APIDOC ## RIPE Atlas REST API Reference ### Description This is the detailed reference documentation for all endpoints within the RIPE Atlas REST API. Each endpoint is documented with its HTTP method, path, required and optional parameters (path, query, body), and example requests and responses. ### Method GET ### Endpoint /api/v2/{resource}/ ### Parameters #### Path Parameters - **resource** (string) - Required - The resource you want to access (e.g., 'measurements', 'probes', 'stats'). #### Query Parameters - **api_key** (string) - Required - Your API key for authentication. - **limit** (integer) - Optional - Maximum number of results to return. - **offset** (integer) - Optional - Number of results to skip. ### Request Example ```json { "example": "curl -H \"Key: YOUR_API_KEY\" https://atlas.ripe.net/api/v2/probes/" } ``` ### Response #### Success Response (200) - A JSON object containing a list of the requested resources. #### Response Example ```json { "example": "[ { \"id\": 12345, \"name\": \"Probe 12345\", ... }, ... ]" } ``` ``` -------------------------------- ### Filter Measurements by Status (API) Source: https://atlas.ripe.net/docs/apis/rest-api-manual/generic-query-parameters An example of a GET request to the RIPE Atlas API to filter measurements based on their status. This demonstrates the use of a specific query parameter for filtering list resources. ```http GET /api/v2/measurements/?status_name=Connected ``` -------------------------------- ### GET /api/v2/measurements/{measurement_id}/status-check/ Source: https://atlas.ripe.net/docs/apis/rest-api-manual/measurements/status-checks/complex-example Retrieves the status check for a given measurement, considering historical data to determine alerts. This endpoint is useful for detecting latency issues by comparing current RTT values against a historical median. ```APIDOC ## GET /api/v2/measurements/{measurement_id}/status-check/ ### Description This endpoint checks the status of a measurement by comparing the current median Round-Trip Time (RTT) with historical data. It allows for setting a lookback period and a threshold to trigger alerts based on RTT deviations. ### Method GET ### Endpoint `https://atlas.ripe.net/api/v2/measurements/{measurement_id}/status-check/` ### Parameters #### Path Parameters - **measurement_id** (integer) - Required - The ID of the measurement to check. #### Query Parameters - **lookback** (integer) - Optional - The number of past measurement results to consider for calculating the median RTT. Defaults to 1. Range: 1 to 10. - **median_rtt_threshold** (number or string) - Required - The threshold value to compare the calculated median RTT against. Can be an integer, percentage (e.g., '10%'), or a negative value. A sanity filter of ±5ms is applied for very low median values. ### Request Example ``` GET https://atlas.ripe.net/api/v2/measurements/123456789/status-check/?lookback=10&median_rtt_threshold=10 ``` ### Response #### Success Response (200) - **probe_id** (object) - An object where keys are probe IDs and values contain status information. - **alert** (boolean) - Indicates if an alert has been triggered for this probe. - **alert_reasons** (array of strings) - Reasons for the alert (e.g., 'latency', 'loss'). - **all** (array of numbers) - All RTT results within the lookback period. - **last** (number) - The most recent RTT value. - **last_packet_loss** (number) - The most recent packet loss value. - **median** (number) - The calculated median RTT based on the lookback period. - **source** (string) - Information about the probe's source (e.g., 'Country: GR'). #### Response Example ```json { "234": { "alert": true, "alert_reasons": [ "latency" ], "all": [ 43.103, 43.363, 43.517, 45.254, 45.303, 45.714, 45.72, 46.045, 46.907, 46.92, 47.338, 48.843, 49.831, 50.598, 50.834, 55.644, 65.612, 73.656, 78.739, 81.618, 101.793, 105.107, 111.606, 138.973, 144.736, 154.633, 159.825, 199.248, 206.075, 314.524 ], "last": 111.606, "last_packet_loss": 0.0, "median": 55.644, "source": "Country: GR" } } ``` ### Error Handling - **400 Bad Request**: Invalid `lookback` or `median_rtt_threshold` parameters. - **404 Not Found**: The specified `measurement_id` does not exist. ```