AgentSkillsCN

aws-api-gateway-models

从 AWS API Gateway REST API 中检索并检查 API 模型(模式)集合。适用于处理 API Gateway 模型、检索 API 模式、检查数据模型,或分析 AWS API Gateway 上的模式定义时使用。当用户提及 API Gateway 模型、REST API 模式、数据模型,或需要在 AWS 上检查 API 请求/响应结构时触发。

SKILL.md
--- frontmatter
name: aws-api-gateway-models
description: >
  Retrieve and inspect API model (schema) collections from AWS API Gateway REST APIs.
  Use this skill when working with API Gateway models, retrieving API schemas,
  inspecting data models, or analyzing schema definitions on AWS API Gateway.
  Trigger when the user mentions API Gateway models, REST API schemas, data models,
  or needs to examine API request/response structures on AWS.

AWS API Gateway - Retrieve Models

Interact with the AWS API Gateway REST API to retrieve information about model collections. Models define the data structure (schema) for API requests and responses.

When to Use

  • Listing all models/schemas in a REST API
  • Inspecting model definitions and JSON schemas
  • Auditing API schemas for consistency or reusability
  • Retrieving model details for documentation or validation

Authentication

Requests must be signed using AWS Signature Version 4 (SigV4). Required headers:

  • Authorization — SigV4 signature
  • x-amz-date — Request timestamp
  • x-amz-security-token — (Optional) Session token for temporary credentials

Key Endpoint

GET /restapis/{restapi_id}/models — Retrieve all models for a given REST API.

Parameters

ParameterLocationRequiredDescription
restapi_idpathYesThe REST API identifier
positionqueryNoPagination cursor
limitqueryNoMax results per page

Response Structure

Each model contains:

  • id — Model identifier
  • name — Model name (e.g., UserRequest, ErrorResponse)
  • description — Human-readable description
  • schema — JSON Schema definition string
  • contentType — Media type (typically application/json)

API Reference

For complete schema details including all response fields, pagination, error codes, and the full model schema structure, read references/openapi.yml.