Routes API help you to get the performance metrics of any route.

Getting a list of routes

To get a list of routes and its metrics for a specific duration, send the following request:

GET /v2/projects/:projectId/routes

Sample

copy
icon/buttons/copy
curl -H "X-API-KEY: <YOUR_API_KEY>" \
     "https://api.atatus.com/v2/projects/<projectId>/routes?timeDur=7d"
copy
icon/buttons/copy
curl -H "X-API-KEY: 79769089efbb4767a542e0696448e34c" \
     "https://api.atatus.com/v2/projects/5c7cb42cdbe639200c330e52/routes?timeDur=7d"

Parameters

Name Description
apiKey (Required) API Key to read data. See here to generate new API Key.
projectId (Required) A unique identifier of the project. See here to locate the Project ID
timeDur (Required) The time duration. Example: 30m, 60m, 6h, 12h, 1d, 2d, 3d, 7d, 14d, 1M
timeStart & timeEnd Instead of timeDur, you can give custom timeStart and timeEnd. Format: YYYY-MM-DD+HH:mm Eg: timeStart=2020-03-01+00:00&timeEnd=2020-03-06+00:00

Response

{
  "stats": {
    "routeTime": 1074.06,
    "throughput": 10
  },
  "data": [
    {
      "id": "f437819cfc6bd9c821fbd87794e4f0ca",
      "url": "https://www.acme.com/feed",
      "throughput": 3,
      "routeTime": 323.6667,
      "min": 231,
      "max": 410,
      "spa": {
        "routeTime": 323.6667,
        "throughput": 3
      },
      "routeName": "https://www.acme.com/feed",
      "timeConsumedPercentage": 0,
      "throughputPercentage": 18.75,
      "underOnePercent": false
    },
    {
      "id": "1ab3a451a05a649b3cca215c696d49b8",
      "url": "https://www.acme.com/login",
      "throughput": 4,
      "routeTime": 278.25,
      "min": 175,
      "max": 336,
      "spa": {
        "routeTime": 278.25,
        "throughput": 4
      },
      "routeName": "https://www.acme.com/login",
      "timeConsumedPercentage": 0,
      "throughputPercentage": 25,
      "underOnePercent": false
    },
    {
      "id": "311efa79354a49d27d9c584af921e619",
      "url": "https://www.acme.com/dashboard",
      "throughput": 3,
      "routeTime": 192.3333,
      "min": 130,
      "max": 310,
      "spa": {
        "routeTime": 192.3333,
        "throughput": 3
      },
      "routeName": "https://www.acme.com/dashboard",
      "timeConsumedPercentage": 0,
      "throughputPercentage": 18.75,
      "underOnePercent": false
    }
  ]
}

Getting a specific route by Id

To get a route and metrics for a specific time duration, send the following request:

GET /v2/projects/:projectId/routes/:routeId

Sample

copy
icon/buttons/copy
curl -H "X-API-KEY: <YOUR_API_KEY>" \
     "https://api.atatus.com/v2/projects/<projectId>/routes/<routeId>?timeDur=7d"
copy
icon/buttons/copy
curl -H "X-API-KEY: 79769089efbb4767a542e0696448e34c" \
     "https://api.atatus.com/v2/projects/5c7cb42cdbe639200c330e52/routes/s36de4ef5dcbefed333099b3dece0534?timeDur=7d"

Parameters

Name Description
apiKey (Required) API Key to read data. See here to generate new API Key.
projectId (Required) A unique identifier of the project. See here to locate the Project ID
routeId (Required) ID of the specific route
timeDur (Required) The time duration. Example: 30m, 60m, 6h, 12h, 1d, 2d, 3d, 7d, 14d, 1M
timeStart & timeEnd Instead of timeDur, you can give custom timeStart and timeEnd. Format: YYYY-MM-DD+HH:mm Eg: timeStart=2020-03-01+00:00&timeEnd=2020-03-06+00:00

Response

{
  "stats": {
    "routeTime": 617.25,
    "throughput": 4
  },
  "data": [
    {
      "id": "s36de4ef5dcbefed333099b3dece0534",
      "url": "https://www.acme.com/app/dashboard",
      "throughput": 4,
      "routeTime": 617.25,
      "min": 34,
      "max": 1615,
      "spa": {
        "routeTime": 617.25,
        "throughput": 4
      },
      "routeName": "https://www.acme.com/app/dashboard",
      "timeConsumedPercentage": 0,
      "throughputPercentage": 100,
      "underOnePercent": false
    }
  ]
}

Getting a route with specific path

You can search for specific route with search query parameter. It allows you to search for a specific keyword in the path field.

GET /v2/projects/:projectId/routes?search=keyword

Sample

copy
icon/buttons/copy
curl -H "X-API-KEY: <YOUR_API_KEY>" \
     "https://api.atatus.com/v2/projects/<projectId>/routes?search=<KEY_WORD>&timeDur=7d"
copy
icon/buttons/copy
curl -H "X-API-KEY: 79769089efbb4767a542e0696448e34c" \
     "https://api.atatus.com/v2/projects/5c7cb42cdbe639200c330e52/routes?search=dashboard&timeDur=7d"

Parameters

Name Description
apiKey (Required) API Key to read data. See here to generate new API Key.
projectId (Required) A unique identifier of the project. See here to locate the Project ID
search Keyword for search routes.
timeDur (Required) The time duration. Example: 30m, 60m, 6h, 12h, 1d, 2d, 3d, 7d, 14d, 1M
timeStart & timeEnd Instead of timeDur, you can give custom timeStart and timeEnd. Format: YYYY-MM-DD+HH:mm Eg: timeStart=2020-03-01+00:00&timeEnd=2020-03-06+00:00

Response

{
  "stats": {
    "routeTime": 617.25,
    "throughput": 4
  },
  "data": [
    {
      "id": "1ab3a451a05a649b3cca215c696d49b8",
      "url": "https://www.acme.com/app/dashboard",
      "throughput": 4,
      "routeTime": 278.25,
      "min": 175,
      "max": 336,
      "spa": {
        "routeTime": 278.25,
        "throughput": 4
      },
      "routeName": "https://www.acme.com/app/dashboard",
      "timeConsumedPercentage": 0,
      "throughputPercentage": 25,
      "underOnePercent": false
    },
    {
      "id": "311efa79354a49d27d9c584af921e619",
      "url": "https://www.acme.com/dashboard-one",
      "throughput": 3,
      "routeTime": 192.3333,
      "min": 130,
      "max": 310,
      "spa": {
        "routeTime": 192.3333,
        "throughput": 3
      },
      "routeName": "https://www.acme.com/dashboard-one",
      "timeConsumedPercentage": 0,
      "throughputPercentage": 18.75,
      "underOnePercent": false
    }
  ]
}