Upload a schema to a zone

/zones/{zone_id}/api_gateway/user_schemas

post

API Shield Schema Validation 2.0

api-shield-schema-validation-post-schema

Debug "planAvailability"

null

Debug "tokenPermissions"

null

Debug "parameters"

[
  {
    "in": "path",
    "name": "zone_id",
    "required": true,
    "schema": {
      "description": "Identifier",
      "example": "023e105f4ecef8ad9ca31a8372d0c353",
      "maxLength": 32,
      "readOnly": true,
      "type": "string"
    }
  }
]

Debug "requestBody"

{
  "content": {
    "multipart/form-data": {
      "schema": {
        "properties": {
          "file": {
            "description": "Schema file bytes",
            "format": "binary",
            "type": "string"
          },
          "kind": {
            "description": "Kind of schema",
            "enum": [
              "openapi_v3"
            ],
            "example": "openapi_v3",
            "type": "string"
          },
          "name": {
            "description": "Name of the schema",
            "example": "petstore schema",
            "type": "string"
          },
          "validation_enabled": {
            "description": "Flag whether schema is enabled for validation.",
            "enum": [
              "true",
              "false"
            ],
            "type": "string"
          }
        },
        "required": [
          "file",
          "kind"
        ],
        "type": "object"
      }
    }
  },
  "required": true
}

Debug "responses"

{
  "200": {
    "content": {
      "application/json": {
        "schema": {
          "allOf": [
            {
              "allOf": [
                {
                  "properties": {
                    "errors": {
                      "example": [],
                      "items": {
                        "properties": {
                          "code": {
                            "minimum": 1000,
                            "type": "integer"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "message"
                        ],
                        "type": "object",
                        "uniqueItems": true
                      },
                      "type": "array"
                    },
                    "messages": {
                      "example": [],
                      "items": {
                        "properties": {
                          "code": {
                            "minimum": 1000,
                            "type": "integer"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "message"
                        ],
                        "type": "object",
                        "uniqueItems": true
                      },
                      "type": "array"
                    },
                    "result": {
                      "anyOf": [
                        {
                          "type": "object"
                        },
                        {
                          "items": {},
                          "type": "array"
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "success": {
                      "description": "Whether the API call was successful",
                      "example": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "errors",
                    "messages",
                    "result"
                  ],
                  "type": "object"
                },
                {
                  "properties": {
                    "result": {
                      "anyOf": [
                        {
                          "nullable": true,
                          "type": "object"
                        },
                        {
                          "nullable": true,
                          "type": "string"
                        }
                      ]
                    }
                  }
                }
              ],
              "type": "object"
            },
            {
              "properties": {
                "result": {
                  "properties": {
                    "schema": {
                      "properties": {
                        "created_at": {
                          "example": "2014-01-01T05:20:00.12345Z",
                          "format": "date-time",
                          "readOnly": true,
                          "type": "string"
                        },
                        "kind": {
                          "description": "Kind of schema",
                          "enum": [
                            "openapi_v3"
                          ],
                          "example": "openapi_v3",
                          "type": "string"
                        },
                        "name": {
                          "description": "Name of the schema",
                          "example": "petstore schema",
                          "type": "string"
                        },
                        "schema_id": {
                          "description": "UUID identifier",
                          "example": "0d9bf70c-92e1-4bb3-9411-34a3bcc59003",
                          "format": "uuid",
                          "maxLength": 36,
                          "readOnly": true,
                          "type": "string"
                        },
                        "source": {
                          "description": "Source of the schema",
                          "example": "<schema file bytes>",
                          "type": "string"
                        },
                        "validation_enabled": {
                          "description": "Flag whether schema is enabled for validation.",
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "schema_id",
                        "name",
                        "kind",
                        "created_at"
                      ],
                      "type": "object"
                    },
                    "upload_details": {
                      "properties": {
                        "warnings": {
                          "description": "Diagnostic warning events that occurred during processing. These events are non-critical errors found within the schema.",
                          "items": {
                            "properties": {
                              "code": {
                                "description": "Code that identifies the event that occurred.",
                                "example": 28,
                                "type": "integer"
                              },
                              "locations": {
                                "description": "JSONPath location(s) in the schema where these events were encountered.  See [https://goessner.net/articles/JsonPath/](https://goessner.net/articles/JsonPath/) for JSONPath specification.",
                                "items": {
                                  "description": "JSONPath location in the schema where these events were encountered.  See [https://goessner.net/articles/JsonPath/](https://goessner.net/articles/JsonPath/) for JSONPath specification.",
                                  "example": ".paths[\"/user/{username}\"].put",
                                  "type": "string"
                                },
                                "type": "array"
                              },
                              "message": {
                                "description": "Diagnostic message that describes the event.",
                                "example": "unsupported media type: application/octet-stream",
                                "type": "string"
                              }
                            },
                            "required": [
                              "code"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "required": [
                    "schema"
                  ],
                  "type": "object"
                }
              }
            }
          ]
        }
      }
    },
    "description": "Upload a schema response"
  },
  "4XX": {
    "content": {
      "application/json": {
        "schema": {
          "allOf": [
            {
              "properties": {
                "upload_details": {
                  "properties": {
                    "critical": {
                      "description": "Diagnostic critical error events that occurred during processing.",
                      "items": {
                        "properties": {
                          "code": {
                            "description": "Code that identifies the event that occurred.",
                            "example": 28,
                            "type": "integer"
                          },
                          "locations": {
                            "description": "JSONPath location(s) in the schema where these events were encountered.  See [https://goessner.net/articles/JsonPath/](https://goessner.net/articles/JsonPath/) for JSONPath specification.",
                            "items": {
                              "description": "JSONPath location in the schema where these events were encountered.  See [https://goessner.net/articles/JsonPath/](https://goessner.net/articles/JsonPath/) for JSONPath specification.",
                              "example": ".paths[\"/user/{username}\"].put",
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "message": {
                            "description": "Diagnostic message that describes the event.",
                            "example": "unsupported media type: application/octet-stream",
                            "type": "string"
                          }
                        },
                        "required": [
                          "code"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "errors": {
                      "description": "Diagnostic error events that occurred during processing.",
                      "items": {
                        "properties": {
                          "code": {
                            "description": "Code that identifies the event that occurred.",
                            "example": 28,
                            "type": "integer"
                          },
                          "locations": {
                            "description": "JSONPath location(s) in the schema where these events were encountered.  See [https://goessner.net/articles/JsonPath/](https://goessner.net/articles/JsonPath/) for JSONPath specification.",
                            "items": {
                              "description": "JSONPath location in the schema where these events were encountered.  See [https://goessner.net/articles/JsonPath/](https://goessner.net/articles/JsonPath/) for JSONPath specification.",
                              "example": ".paths[\"/user/{username}\"].put",
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "message": {
                            "description": "Diagnostic message that describes the event.",
                            "example": "unsupported media type: application/octet-stream",
                            "type": "string"
                          }
                        },
                        "required": [
                          "code"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              }
            },
            {
              "properties": {
                "errors": {
                  "allOf": [
                    {
                      "example": [],
                      "items": {
                        "properties": {
                          "code": {
                            "minimum": 1000,
                            "type": "integer"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "message"
                        ],
                        "type": "object",
                        "uniqueItems": true
                      },
                      "type": "array"
                    }
                  ],
                  "example": [
                    {
                      "code": 7003,
                      "message": "No route for the URI"
                    }
                  ],
                  "minLength": 1
                },
                "messages": {
                  "allOf": [
                    {
                      "example": [],
                      "items": {
                        "properties": {
                          "code": {
                            "minimum": 1000,
                            "type": "integer"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "message"
                        ],
                        "type": "object",
                        "uniqueItems": true
                      },
                      "type": "array"
                    }
                  ],
                  "example": []
                },
                "result": {
                  "nullable": true,
                  "type": "object"
                },
                "success": {
                  "description": "Whether the API call was successful",
                  "example": false,
                  "type": "boolean"
                }
              },
              "required": [
                "success",
                "errors",
                "messages",
                "result"
              ],
              "type": "object"
            }
          ]
        }
      }
    },
    "description": "Upload a schema response failure"
  }
}

Debug "security"

[
  {
    "api_email": [],
    "api_key": []
  }
]