Amazon Forecast Query Service icon

Amazon Forecast Query Service

Provides APIs for creating and managing Amazon Forecast resources

COMMUNITYAPI KEY0 INSTALLS
API Docs
OpenAPI Specificationv3.0
{
  "openapi": "3.0.0",
  "info": {
    "version": "2018-06-26",
    "x-release": "v4",
    "title": "Amazon Forecast Query Service",
    "description": "Provides APIs for creating and managing Amazon Forecast resources.",
    "x-logo": {
      "url": "https://api.apis.guru/v2/cache/logo/https_twitter.com_awscloud_profile_image.png",
      "backgroundColor": "#FFFFFF"
    },
    "termsOfService": "https://aws.amazon.com/service-terms/",
    "contact": {
      "name": "Mike Ralphson",
      "email": "mike.ralphson@gmail.com",
      "url": "https://github.com/mermade/aws2openapi",
      "x-twitter": "PermittedSoc"
    },
    "license": {
      "name": "Apache 2.0 License",
      "url": "http://www.apache.org/licenses/"
    },
    "x-providerName": "amazonaws.com",
    "x-serviceName": "forecastquery",
    "x-aws-signingName": "forecast",
    "x-origin": [
      {
        "contentType": "application/json",
        "url": "https://raw.githubusercontent.com/aws/aws-sdk-js/master/apis/forecastquery-2018-06-26.normal.json",
        "converter": {
          "url": "https://github.com/mermade/aws2openapi",
          "version": "1.0.0"
        },
        "x-apisguru-driver": "external"
      }
    ],
    "x-apiClientRegistration": {
      "url": "https://portal.aws.amazon.com/gp/aws/developer/registration/index.html?nc2=h_ct"
    },
    "x-apisguru-categories": [
      "cloud"
    ],
    "x-preferred": true
  },
  "externalDocs": {
    "description": "Amazon Web Services documentation",
    "url": "https://docs.aws.amazon.com/forecastquery/"
  },
  "servers": [
    {
      "url": "http://forecastquery.{region}.amazonaws.com",
      "variables": {
        "region": {
          "description": "The AWS region",
          "enum": [
            "us-east-1",
            "us-east-2",
            "us-west-1",
            "us-west-2",
            "us-gov-west-1",
            "us-gov-east-1",
            "ca-central-1",
            "eu-north-1",
            "eu-west-1",
            "eu-west-2",
            "eu-west-3",
            "eu-central-1",
            "eu-south-1",
            "af-south-1",
            "ap-northeast-1",
            "ap-northeast-2",
            "ap-northeast-3",
            "ap-southeast-1",
            "ap-southeast-2",
            "ap-east-1",
            "ap-south-1",
            "sa-east-1",
            "me-south-1"
          ],
          "default": "us-east-1"
        }
      },
      "description": "The Amazon Forecast Query Service multi-region endpoint"
    },
    {
      "url": "https://forecastquery.{region}.amazonaws.com",
      "variables": {
        "region": {
          "description": "The AWS region",
          "enum": [
            "us-east-1",
            "us-east-2",
            "us-west-1",
            "us-west-2",
            "us-gov-west-1",
            "us-gov-east-1",
            "ca-central-1",
            "eu-north-1",
            "eu-west-1",
            "eu-west-2",
            "eu-west-3",
            "eu-central-1",
            "eu-south-1",
            "af-south-1",
            "ap-northeast-1",
            "ap-northeast-2",
            "ap-northeast-3",
            "ap-southeast-1",
            "ap-southeast-2",
            "ap-east-1",
            "ap-south-1",
            "sa-east-1",
            "me-south-1"
          ],
          "default": "us-east-1"
        }
      },
      "description": "The Amazon Forecast Query Service multi-region endpoint"
    },
    {
      "url": "http://forecastquery.{region}.amazonaws.com.cn",
      "variables": {
        "region": {
          "description": "The AWS region",
          "enum": [
            "cn-north-1",
            "cn-northwest-1"
          ],
          "default": "cn-north-1"
        }
      },
      "description": "The Amazon Forecast Query Service endpoint for China (Beijing) and China (Ningxia)"
    },
    {
      "url": "https://forecastquery.{region}.amazonaws.com.cn",
      "variables": {
        "region": {
          "description": "The AWS region",
          "enum": [
            "cn-north-1",
            "cn-northwest-1"
          ],
          "default": "cn-north-1"
        }
      },
      "description": "The Amazon Forecast Query Service endpoint for China (Beijing) and China (Ningxia)"
    }
  ],
  "x-hasEquivalentPaths": true,
  "paths": {
    "/#X-Amz-Target=AmazonForecastRuntime.QueryForecast": {
      "post": {
        "operationId": "QueryForecast",
        "description": "<p>Retrieves a forecast for a single item, filtered by the supplied criteria.</p> <p>The criteria is a key-value pair. The key is either <code>item_id</code> (or the equivalent non-timestamp, non-target field) from the <code>TARGET_TIME_SERIES</code> dataset, or one of the forecast dimensions specified as part of the <code>FeaturizationConfig</code> object.</p> <p>By default, <code>QueryForecast</code> returns the complete date range for the filtered forecast. You can request a specific date range.</p> <p>To get the full forecast, use the <a href=\"https://docs.aws.amazon.com/en_us/forecast/latest/dg/API_CreateForecastExportJob.html\">CreateForecastExportJob</a> operation.</p> <note> <p>The forecasts generated by Amazon Forecast are in the same timezone as the dataset that was used to create the predictor.</p> </note>",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueryForecastResponse"
                }
              }
            }
          },
          "480": {
            "description": "ResourceNotFoundException",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFoundException"
                }
              }
            }
          },
          "481": {
            "description": "ResourceInUseException",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceInUseException"
                }
              }
            }
          },
          "482": {
            "description": "InvalidInputException",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvalidInputException"
                }
              }
            }
          },
          "483": {
            "description": "LimitExceededException",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LimitExceededException"
                }
              }
            }
          },
          "484": {
            "description": "InvalidNextTokenException",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvalidNextTokenException"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QueryForecastRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-Amz-Target",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "AmazonForecastRuntime.QueryForecast"
              ]
            }
          }
        ]
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/X-Amz-Content-Sha256"
        },
        {
          "$ref": "#/components/parameters/X-Amz-Date"
        },
        {
          "$ref": "#/components/parameters/X-Amz-Algorithm"
        },
        {
          "$ref": "#/components/parameters/X-Amz-Credential"
        },
        {
          "$ref": "#/components/parameters/X-Amz-Security-Token"
        },
        {
          "$ref": "#/components/parameters/X-Amz-Signature"
        },
        {
          "$ref": "#/components/parameters/X-Amz-SignedHeaders"
        }
      ]
    },
    "/#X-Amz-Target=AmazonForecastRuntime.QueryWhatIfForecast": {
      "post": {
        "operationId": "QueryWhatIfForecast",
        "description": "Retrieves a what-if forecast.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueryWhatIfForecastResponse"
                }
              }
            }
          },
          "480": {
            "description": "ResourceNotFoundException",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFoundException"
                }
              }
            }
          },
          "481": {
            "description": "ResourceInUseException",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceInUseException"
                }
              }
            }
          },
          "482": {
            "description": "InvalidInputException",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvalidInputException"
                }
              }
            }
          },
          "483": {
            "description": "LimitExceededException",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LimitExceededException"
                }
              }
            }
          },
          "484": {
            "description": "InvalidNextTokenException",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvalidNextTokenException"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QueryWhatIfForecastRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-Amz-Target",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "AmazonForecastRuntime.QueryWhatIfForecast"
              ]
            }
          }
        ]
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/X-Amz-Content-Sha256"
        },
        {
          "$ref": "#/components/parameters/X-Amz-Date"
        },
        {
          "$ref": "#/components/parameters/X-Amz-Algorithm"
        },
        {
          "$ref": "#/components/parameters/X-Amz-Credential"
        },
        {
          "$ref": "#/components/parameters/X-Amz-Security-Token"
        },
        {
          "$ref": "#/components/parameters/X-Amz-Signature"
        },
        {
          "$ref": "#/components/parameters/X-Amz-SignedHeaders"
        }
      ]
    }
  },
  "components": {
    "parameters": {
      "X-Amz-Content-Sha256": {
        "name": "X-Amz-Content-Sha256",
        "in": "header",
        "schema": {
          "type": "string"
        },
        "required": false
      },
      "X-Amz-Date": {
        "name": "X-Amz-Date",
        "in": "header",
        "schema": {
          "type": "string"
        },
        "required": false
      },
      "X-Amz-Algorithm": {
        "name": "X-Amz-Algorithm",
        "in": "header",
        "schema": {
          "type": "string"
        },
        "required": false
      },
      "X-Amz-Credential": {
        "name": "X-Amz-Credential",
        "in": "header",
        "schema": {
          "type": "string"
        },
        "required": false
      },
      "X-Amz-Security-Token": {
        "name": "X-Amz-Security-Token",
        "in": "header",
        "schema": {
          "type": "string"
        },
        "required": false
      },
      "X-Amz-Signature": {
        "name": "X-Amz-Signature",
        "in": "header",
        "schema": {
          "type": "string"
        },
        "required": false
      },
      "X-Amz-SignedHeaders": {
        "name": "X-Amz-SignedHeaders",
        "in": "header",
        "schema": {
          "type": "string"
        },
        "required": false
      }
    },
    "securitySchemes": {
      "hmac": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header",
        "description": "Amazon Signature authorization v4",
        "x-amazon-apigateway-authtype": "awsSigv4"
      }
    },
    "schemas": {
      "QueryForecastResponse": {
        "type": "object",
        "properties": {
          "Forecast": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Forecast"
              },
              {
                "description": "The forecast."
              }
            ]
          }
        }
      },
      "QueryForecastRequest": {
        "type": "object",
        "required": [
          "ForecastArn",
          "Filters"
        ],
        "title": "QueryForecastRequest",
        "properties": {
          "ForecastArn": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Arn"
              },
              {
                "description": "The Amazon Resource Name (ARN) of the forecast to query."
              }
            ]
          },
          "StartDate": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DateTime"
              },
              {
                "description": "The start date for the forecast. Specify the date using this format: yyyy-MM-dd'T'HH:mm:ss (ISO 8601 format). For example, 2015-01-01T08:00:00."
              }
            ]
          },
          "EndDate": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DateTime"
              },
              {
                "description": "The end date for the forecast. Specify the date using this format: yyyy-MM-dd'T'HH:mm:ss (ISO 8601 format). For example, 2015-01-01T20:00:00. "
              }
            ]
          },
          "Filters": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Filters"
              },
              {
                "description": "<p>The filtering criteria to apply when retrieving the forecast. For example, to get the forecast for <code>client_21</code> in the electricity usage dataset, specify the following:</p> <p> <code>{\"item_id\" : \"client_21\"}</code> </p> <p>To get the full forecast, use the <a href=\"https://docs.aws.amazon.com/en_us/forecast/latest/dg/API_CreateForecastExportJob.html\">CreateForecastExportJob</a> operation.</p>"
              }
            ]
          },
          "NextToken": {
            "allOf": [
              {
                "$ref": "#/components/schemas/NextToken"
              },
              {
                "description": "If the result of the previous request was truncated, the response includes a <code>NextToken</code>. To retrieve the next set of results, use the token in the next request. Tokens expire after 24 hours."
              }
            ]
          }
        }
      },
      "ResourceNotFoundException": {},
      "ResourceInUseException": {},
      "InvalidInputException": {},
      "LimitExceededException": {},
      "InvalidNextTokenException": {},
      "QueryWhatIfForecastResponse": {
        "type": "object",
        "properties": {
          "Forecast": {
            "$ref": "#/components/schemas/Forecast"
          }
        }
      },
      "QueryWhatIfForecastRequest": {
        "type": "object",
        "required": [
          "WhatIfForecastArn",
          "Filters"
        ],
        "title": "QueryWhatIfForecastRequest",
        "properties": {
          "WhatIfForecastArn": {
            "allOf": [
              {
                "$ref": "#/components/schemas/LongArn"
              },
              {
                "description": "The Amazon Resource Name (ARN) of the what-if forecast to query."
              }
            ]
          },
          "StartDate": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DateTime"
              },
              {
                "description": "The start date for the what-if forecast. Specify the date using this format: yyyy-MM-dd'T'HH:mm:ss (ISO 8601 format). For example, 2015-01-01T08:00:00."
              }
            ]
          },
          "EndDate": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DateTime"
              },
              {
                "description": "The end date for the what-if forecast. Specify the date using this format: yyyy-MM-dd'T'HH:mm:ss (ISO 8601 format). For example, 2015-01-01T20:00:00. "
              }
            ]
          },
          "Filters": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Filters"
              },
              {
                "description": "<p>The filtering criteria to apply when retrieving the forecast. For example, to get the forecast for <code>client_21</code> in the electricity usage dataset, specify the following:</p> <p> <code>{\"item_id\" : \"client_21\"}</code> </p> <p>To get the full what-if forecast, use the <a href=\"https://docs.aws.amazon.com/en_us/forecast/latest/dg/API_CreateWhatIfForecastExport.html\">CreateForecastExportJob</a> operation.</p>"
              }
            ]
          },
          "NextToken": {
            "allOf": [
              {
                "$ref": "#/components/schemas/NextToken"
              },
              {
                "description": "If the result of the previous request was truncated, the response includes a <code>NextToken</code>. To retrieve the next set of results, use the token in the next request. Tokens expire after 24 hours."
              }
            ]
          }
        }
      },
      "Arn": {
        "type": "string",
        "pattern": "arn:([a-z\\d-]+):forecast:.*:.*:.+",
        "maxLength": 256
      },
      "AttributeName": {
        "type": "string",
        "pattern": "^[a-zA-Z0-9\\_\\-]+$",
        "maxLength": 256
      },
      "AttributeValue": {
        "type": "string",
        "maxLength": 256
      },
      "Timestamp": {
        "type": "string"
      },
      "Double": {
        "type": "number",
        "format": "double"
      },
      "DataPoint": {
        "type": "object",
        "properties": {
          "Timestamp": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Timestamp"
              },
              {
                "description": "The timestamp of the specific forecast."
              }
            ]
          },
          "Value": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Double"
              },
              {
                "description": "The forecast value."
              }
            ]
          }
        },
        "description": "The forecast value for a specific date. Part of the <a>Forecast</a> object."
      },
      "DateTime": {
        "type": "string"
      },
      "Filters": {
        "type": "object",
        "minProperties": 1,
        "maxProperties": 50,
        "additionalProperties": {
          "$ref": "#/components/schemas/AttributeValue"
        }
      },
      "Predictions": {
        "type": "object",
        "additionalProperties": {
          "$ref": "#/components/schemas/TimeSeries"
        }
      },
      "Forecast": {
        "type": "object",
        "properties": {
          "Predictions": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Predictions"
              },
              {
                "description": "<p>The forecast.</p> <p>The <i>string</i> of the string-to-array map is one of the following values:</p> <ul> <li> <p>p10</p> </li> <li> <p>p50</p> </li> <li> <p>p90</p> </li> </ul> <p>The default setting is <code>[\"0.1\", \"0.5\", \"0.9\"]</code>. Use the optional <code>ForecastTypes</code> parameter of the <a href=\"https://docs.aws.amazon.com/forecast/latest/dg/API_CreateForecast.html\">CreateForecast</a> operation to change the values. The values will vary depending on how this is set, with a minimum of <code>1</code> and a maximum of <code>5.</code> </p>"
              }
            ]
          }
        },
        "description": "Provides information about a forecast. Returned as part of the <a>QueryForecast</a> response."
      },
      "LongArn": {
        "type": "string",
        "pattern": "arn:([a-z\\d-]+):forecast:.*:.*:.+",
        "maxLength": 300
      },
      "NextToken": {
        "type": "string",
        "minLength": 1,
        "maxLength": 3000
      },
      "TimeSeries": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/DataPoint"
        }
      },
      "Statistic": {
        "type": "string",
        "maxLength": 4
      }
    }
  },
  "security": [
    {
      "hmac": []
    }
  ]
}