{
  "apis": [
    {
      "path": "/stats/applications/{application_id}/usage.{format}",
      "operations": [
        {
          "httpMethod": "GET",
          "summary": "Application Usage by Metric",
          "description": "Returns the usage data for a given metric (or method) of an application.",
          "group": "application_ops",
          "parameters": [
            {
              "description": "Response format.",
              "name": "format",
              "dataType": "string",
              "defaultValue": "json",
              "required": true,
              "paramType": "path",
              "allowableValues": {
                "values": [
                  "json",
                  "xml"
                ],
                "valueType": "LIST"
              }
            },
            {
              "name": "access_token",
              "description": "A personal Access Token",
              "dataType": "string",
              "required": true,
              "paramType": "query",
              "threescale_name": "access_token"
            },
            {
              "name": "application_id",
              "description": "ID of the application",
              "dataType": "int",
              "required": true,
              "paramType": "path",
              "threescale_name": "application_ids"
            },
            {
              "description": "System name of metric to get data for.",
              "name": "metric_name",
              "dataType": "string",
              "defaultValue": "hits",
              "required": true,
              "paramType": "query",
              "threescale_name": "metric_names"
            },
            {
              "name": "since",
              "description": "Time range start. Format YYYY-MM-DD HH:MM:SS, '2012-02-22', '2012-02-22 23:49:00'.",
              "dataType": "string",
              "required": true,
              "paramType": "query"
            },
            {
              "name": "period",
              "description": "Period combined with since time gives stats for the time range [since .. since + period]. It is required if until time is not passed.",
              "dataType": "string",
              "required": false,
              "paramType": "query",
              "defaultValue": "",
              "allowableValues": {
                "values": [
                  "year",
                  "month",
                  "week",
                  "day"
                ],
                "valueType": "LIST"
              }
            },
            {
              "name": "until",
              "description": "Time range end. Format YYYY-MM-DD HH:MM:SS",
              "dataType": "string",
              "required": false,
              "paramType": "query"
            },
            {
              "name": "granularity",
              "description": "Granularity of results, each period has an associated granularity.",
              "dataType": "string",
              "required": true,
              "paramType": "query",
              "defaultValue": "month",
              "allowableValues": {
                "values": [
                  "month",
                  "day",
                  "hour"
                ],
                "valueType": "LIST"
              }
            },
            {
              "description": "Time zone for calculations.",
              "name": "timezone",
              "dataType": "string",
              "defaultValue": "UTC",
              "required": false,
              "paramType": "query",
              "allowableValues": {
                "values": [
                  "International Date Line West",
                  "Midway Island",
                  "American Samoa",
                  "Hawaii",
                  "Alaska",
                  "Pacific Time (US & Canada)",
                  "Tijuana",
                  "Mountain Time (US & Canada)",
                  "Arizona",
                  "Chihuahua",
                  "Mazatlan",
                  "Central Time (US & Canada)",
                  "Saskatchewan",
                  "Guadalajara",
                  "Mexico City",
                  "Monterrey",
                  "Central America",
                  "Eastern Time (US & Canada)",
                  "Indiana (East)",
                  "Bogota",
                  "Lima",
                  "Quito",
                  "Atlantic Time (Canada)",
                  "Caracas",
                  "La Paz",
                  "Santiago",
                  "Newfoundland",
                  "Brasilia",
                  "Buenos Aires",
                  "Georgetown",
                  "Greenland",
                  "Mid-Atlantic",
                  "Azores",
                  "Cape Verde Is.",
                  "Dublin",
                  "Edinburgh",
                  "Lisbon",
                  "London",
                  "Casablanca",
                  "Monrovia",
                  "UTC",
                  "Belgrade",
                  "Bratislava",
                  "Budapest",
                  "Ljubljana",
                  "Prague",
                  "Sarajevo",
                  "Skopje",
                  "Warsaw",
                  "Zagreb",
                  "Brussels",
                  "Copenhagen",
                  "Madrid",
                  "Paris",
                  "Amsterdam",
                  "Berlin",
                  "Bern",
                  "Rome",
                  "Stockholm",
                  "Vienna",
                  "West Central Africa",
                  "Bucharest",
                  "Cairo",
                  "Helsinki",
                  "Kyiv",
                  "Riga",
                  "Sofia",
                  "Tallinn",
                  "Vilnius",
                  "Athens",
                  "Istanbul",
                  "Minsk",
                  "Jerusalem",
                  "Harare",
                  "Pretoria",
                  "Moscow",
                  "St. Petersburg",
                  "Volgograd",
                  "Kuwait",
                  "Riyadh",
                  "Nairobi",
                  "Baghdad",
                  "Tehran",
                  "Abu Dhabi",
                  "Muscat",
                  "Baku",
                  "Tbilisi",
                  "Yerevan",
                  "Kabul",
                  "Ekaterinburg",
                  "Islamabad",
                  "Karachi",
                  "Tashkent",
                  "Chennai",
                  "Kolkata",
                  "Mumbai",
                  "New Delhi",
                  "Kathmandu",
                  "Astana",
                  "Dhaka",
                  "Sri Jayawardenepura",
                  "Almaty",
                  "Novosibirsk",
                  "Rangoon",
                  "Bangkok",
                  "Hanoi",
                  "Jakarta",
                  "Krasnoyarsk",
                  "Beijing",
                  "Chongqing",
                  "Hong Kong",
                  "Urumqi",
                  "Kuala Lumpur",
                  "Singapore",
                  "Taipei",
                  "Perth",
                  "Irkutsk",
                  "Ulaan Bataar",
                  "Seoul",
                  "Osaka",
                  "Sapporo",
                  "Tokyo",
                  "Yakutsk",
                  "Darwin",
                  "Adelaide",
                  "Canberra",
                  "Melbourne",
                  "Sydney",
                  "Brisbane",
                  "Hobart",
                  "Vladivostok",
                  "Guam",
                  "Port Moresby",
                  "Magadan",
                  "Solomon Is.",
                  "New Caledonia",
                  "Fiji",
                  "Kamchatka",
                  "Marshall Is.",
                  "Auckland",
                  "Wellington",
                  "Nuku'alofa",
                  "Tokelau Is.",
                  "Samoa"
                ],
                "valueType": "LIST"
              }
            },
            {
              "description": "Skip period over period calculations (defaults to true).",
              "name": "skip_change",
              "dataType": "boolean",
              "allowMultiple": "false",
              "defaultValue": "true",
              "required": false,
              "paramType": "query"
            }
          ]
        }
      ]
    },
    {
      "path": "/stats/services/{service_id}/usage.{format}",
      "operations": [
        {
          "httpMethod": "GET",
          "summary": "Service Usage by Metric",
          "description": "Returns the usage data of a given metric (or method) of a service.",
          "group": "service_ops",
          "parameters": [
            {
              "description": "Response format.",
              "name": "format",
              "dataType": "string",
              "defaultValue": "json",
              "required": true,
              "paramType": "path",
              "allowableValues": {
                "values": [
                  "json",
                  "xml"
                ],
                "valueType": "LIST"
              }
            },
            {
              "name": "access_token",
              "description": "A personal Access Token",
              "dataType": "string",
              "required": true,
              "paramType": "query",
              "threescale_name": "access_token"
            },
            {
              "name": "service_id",
              "description": "ID of the service.",
              "dataType": "int",
              "required": true,
              "paramType": "path",
              "threescale_name": "service_ids"
            },
            {
              "description": "System name of metric to get data for.",
              "name": "metric_name",
              "dataType": "string",
              "defaultValue": "hits",
              "required": true,
              "paramType": "query",
              "threescale_name": "metric_names"
            },
            {
              "name": "since",
              "description": "Time range start. Format YYYY-MM-DD HH:MM:SS, '2012-02-22', '2012-02-22 23:49:00'.",
              "dataType": "string",
              "required": true,
              "paramType": "query"
            },
            {
              "name": "period",
              "description": "Period combined with since time gives stats for the time range [since .. since + period]. It is required if until time is not passed.",
              "dataType": "string",
              "required": false,
              "paramType": "query",
              "defaultValue": "",
              "allowableValues": {
                "values": [
                  "year",
                  "month",
                  "week",
                  "day"
                ],
                "valueType": "LIST"
              }
            },
            {
              "name": "until",
              "description": "Time range end. Format YYYY-MM-DD HH:MM:SS",
              "dataType": "string",
              "required": false,
              "paramType": "query"
            },
            {
              "name": "granularity",
              "description": "Granularity of results, each period has an associated granularity.",
              "dataType": "string",
              "required": true,
              "paramType": "query",
              "defaultValue": "month",
              "allowableValues": {
                "values": [
                  "month",
                  "day",
                  "hour"
                ],
                "valueType": "LIST"
              }
            },
            {
              "description": "Time zone for calculations.",
              "name": "timezone",
              "dataType": "string",
              "defaultValue": "UTC",
              "required": false,
              "paramType": "query",
              "allowableValues": {
                "values": [
                  "International Date Line West",
                  "Midway Island",
                  "American Samoa",
                  "Hawaii",
                  "Alaska",
                  "Pacific Time (US & Canada)",
                  "Tijuana",
                  "Mountain Time (US & Canada)",
                  "Arizona",
                  "Chihuahua",
                  "Mazatlan",
                  "Central Time (US & Canada)",
                  "Saskatchewan",
                  "Guadalajara",
                  "Mexico City",
                  "Monterrey",
                  "Central America",
                  "Eastern Time (US & Canada)",
                  "Indiana (East)",
                  "Bogota",
                  "Lima",
                  "Quito",
                  "Atlantic Time (Canada)",
                  "Caracas",
                  "La Paz",
                  "Santiago",
                  "Newfoundland",
                  "Brasilia",
                  "Buenos Aires",
                  "Georgetown",
                  "Greenland",
                  "Mid-Atlantic",
                  "Azores",
                  "Cape Verde Is.",
                  "Dublin",
                  "Edinburgh",
                  "Lisbon",
                  "London",
                  "Casablanca",
                  "Monrovia",
                  "UTC",
                  "Belgrade",
                  "Bratislava",
                  "Budapest",
                  "Ljubljana",
                  "Prague",
                  "Sarajevo",
                  "Skopje",
                  "Warsaw",
                  "Zagreb",
                  "Brussels",
                  "Copenhagen",
                  "Madrid",
                  "Paris",
                  "Amsterdam",
                  "Berlin",
                  "Bern",
                  "Rome",
                  "Stockholm",
                  "Vienna",
                  "West Central Africa",
                  "Bucharest",
                  "Cairo",
                  "Helsinki",
                  "Kyiv",
                  "Riga",
                  "Sofia",
                  "Tallinn",
                  "Vilnius",
                  "Athens",
                  "Istanbul",
                  "Minsk",
                  "Jerusalem",
                  "Harare",
                  "Pretoria",
                  "Moscow",
                  "St. Petersburg",
                  "Volgograd",
                  "Kuwait",
                  "Riyadh",
                  "Nairobi",
                  "Baghdad",
                  "Tehran",
                  "Abu Dhabi",
                  "Muscat",
                  "Baku",
                  "Tbilisi",
                  "Yerevan",
                  "Kabul",
                  "Ekaterinburg",
                  "Islamabad",
                  "Karachi",
                  "Tashkent",
                  "Chennai",
                  "Kolkata",
                  "Mumbai",
                  "New Delhi",
                  "Kathmandu",
                  "Astana",
                  "Dhaka",
                  "Sri Jayawardenepura",
                  "Almaty",
                  "Novosibirsk",
                  "Rangoon",
                  "Bangkok",
                  "Hanoi",
                  "Jakarta",
                  "Krasnoyarsk",
                  "Beijing",
                  "Chongqing",
                  "Hong Kong",
                  "Urumqi",
                  "Kuala Lumpur",
                  "Singapore",
                  "Taipei",
                  "Perth",
                  "Irkutsk",
                  "Ulaan Bataar",
                  "Seoul",
                  "Osaka",
                  "Sapporo",
                  "Tokyo",
                  "Yakutsk",
                  "Darwin",
                  "Adelaide",
                  "Canberra",
                  "Melbourne",
                  "Sydney",
                  "Brisbane",
                  "Hobart",
                  "Vladivostok",
                  "Guam",
                  "Port Moresby",
                  "Magadan",
                  "Solomon Is.",
                  "New Caledonia",
                  "Fiji",
                  "Kamchatka",
                  "Marshall Is.",
                  "Auckland",
                  "Wellington",
                  "Nuku'alofa",
                  "Tokelau Is.",
                  "Samoa"
                ],
                "valueType": "LIST"
              }
            },
            {
              "description": "Skip period over period calculations (defaults to true).",
              "name": "skip_change",
              "dataType": "boolean",
              "allowMultiple": "false",
              "defaultValue": "true",
              "required": false,
              "paramType": "query"
            }
          ]
        }
      ]
    },
    {
      "path": "/stats/services/{service_id}/top_applications.{format}",
      "operations": [
        {
          "httpMethod": "GET",
          "summary": "Service Top Applications",
          "description": "Returns usage and application data for the top 10 most active applications of a service.",
          "group": "service_ops",
          "parameters": [
            {
              "description": "Response format.",
              "name": "format",
              "dataType": "string",
              "defaultValue": "json",
              "required": true,
              "paramType": "path",
              "allowableValues": {
                "values": [
                  "json",
                  "xml"
                ],
                "valueType": "LIST"
              }
            },
            {
              "name": "access_token",
              "description": "A personal Access Token",
              "dataType": "string",
              "required": true,
              "paramType": "query",
              "threescale_name": "access_token"
            },
            {
              "name": "service_id",
              "description": "ID of the service.",
              "dataType": "int",
              "required": true,
              "paramType": "path",
              "threescale_name": "service_ids"
            },
            {
              "name": "since",
              "description": "Time range start. Format YYYY-MM-DD HH:MM:SS, '2012-02-22', '2012-02-22 23:49:00'.",
              "dataType": "string",
              "required": true,
              "paramType": "query"
            },
            {
              "name": "period",
              "description": "Period combined with since time gives stats for the time range [since .. since + period]. It is required if until time is not passed.",
              "dataType": "string",
              "required": false,
              "paramType": "query",
              "defaultValue": "",
              "allowableValues": {
                "values": [
                  "year",
                  "month",
                  "week",
                  "day"
                ],
                "valueType": "LIST"
              }
            },
            {
              "description": "System name of metric to get data for.",
              "name": "metric_name",
              "dataType": "string",
              "defaultValue": "hits",
              "required": true,
              "paramType": "query",
              "threescale_name": "metric_names"
            }
          ]
        }
      ]
    }
  ],
  "basePath": "",
  "swaggerVersion": "0.1a",
  "apiVersion": "1.0"
}
