メソッドレスポンスヘッダの照会
    • PDF

    メソッドレスポンスヘッダの照会

    • PDF

    記事の要約

    Classic/VPC環境で利用できます。

    ユーザー定義したメソッドのレスポンスヘッダを照会します。

    リクエスト

    リクエスト形式を説明します。リクエスト形式は次の通りです。

    メソッドURI
    GET/products/{product-id}/apis/{api-id}/resources/{resource-id}/methods/{method-name}/responses/{status-code}/parameters

    リクエストヘッダ

    API Gatewayで共通して使用されるヘッダの詳細は、API Gatewayのリクエストヘッダをご参照ください。

    リクエストパスパラメータ

    パラメータの説明は次の通りです。

    フィールドタイプ必須の有無説明
    product-idStringRequiredAPIが属する Product ID
    api-idStringRequiredレスポンスヘッダを照会する対象の API ID
    resource-idStringRequiredAPI内対象リソースの ID
    method-nameStringRequired対象メソッドのタイプ
    • ANY | GET | POST | PUT | DELETE | PATCH | OPTIONS | HEAD
    status-codeIntegerRequiredレスポンスステータスコード

    リクエスト例

    リクエストのサンプルコードは次の通りです。

    curl --location --request GET 'https://apigateway.apigw.ntruss.com/api/v1/products/********o9/apis/cvcohvd2xj/resources/tf73xuex0v/methods/GET/responses/200/parameters' \
    --header 'x-ncp-apigw-timestamp: {Timestamp}' \
    --header 'x-ncp-iam-access-key: {Access Key}' \
    --header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \
    --header 'Content-Type: application/json'
    

    レスポンス

    レスポンス形式を説明します。

    レスポンス構文

    レスポンス構文は次の通りです。

    {
      "headers" : [ {
        "resourceId" : "resourceId",
        "methodCode" : "methodCode",
        "tenantId" : "tenantId",
        "parameterCode" : "REQUEST_HEADER",
        "parameterType" : "string",
        "apiId" : "apiId",
        "parameterName" : "parameterName",
        "statusCode" : 6,
        "parameterDescription" : "parameterDescription",
        "isRequired" : true,
        "isArray" : true,
        "modifier" : "modifier",
        "parameterNo" : 0
      } ]
    }
    

    レスポンスステータスコード

    API Gatewayで共通して使用されるレスポンスステータスコードの詳細は、API Gatewayのレスポンスステータスコードをご参照ください。

    レスポンス例

    レスポンスのサンプルコードは次の通りです。

    {
        "headers": [
            {
                "resourceId": "tf73xuex0v",
                "methodCode": "0001",
                "tenantId": "********65ec41039ce6668c2058b8a9",
                "parameterCode": "RESPONSE_HEADER",
                "parameterType": "string",
                "apiId": "cvcohvd2xj",
                "parameterName": "x_header",
                "statusCode": 200,
                "parameterDescription": "header description",
                "isRequired": false,
                "isArray": false
            }
        ]
    }
    

    この記事は役に立ちましたか?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.