{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ibm-api-connect/json-schema/ibm-api-connect-api-2-schema.json",
  "title": "API_2",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ibm-api-connect-products-and-apis-api-openapi.yml#/components/schemas/API_2",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "type": {
      "type": "string",
      "readOnly": true,
      "enum": [
        "api"
      ]
    },
    "api_version": {
      "type": "string",
      "readOnly": true,
      "enum": [
        "2.0.0"
      ]
    },
    "id": {
      "type": "string",
      "readOnly": true
    },
    "name": {
      "type": "string",
      "maxLength": 255
    },
    "version": {
      "type": "string",
      "maxLength": 255
    },
    "title": {
      "type": "string",
      "maxLength": 1023
    },
    "summary": {
      "type": "string",
      "maxLength": 65535
    },
    "scope": {
      "type": "string"
    },
    "state": {
      "type": "string",
      "enum": [
        "staged",
        "online",
        "offline",
        "retired"
      ]
    },
    "api": {
      "type": "object",
      "additionalProperties": true
    },
    "wsdl": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "content_type",
        "content"
      ],
      "properties": {
        "content_type": {
          "type": "string",
          "enum": [
            "application/wsdl",
            "application/wsdl+xml",
            "text/xml",
            "application/zip"
          ]
        },
        "content": {
          "type": "string",
          "format": "binary"
        }
      }
    },
    "api_type": {
      "type": "string",
      "enum": [
        "rest",
        "wsdl",
        "graphql",
        "asyncapi"
      ]
    },
    "gateway_type": {
      "type": "string",
      "enum": [
        "datapower-gateway",
        "datapower-api-gateway",
        "event-gateway",
        "datapower-nano-gateway",
        "wm-api-gateway"
      ]
    },
    "api_kind": {
      "$ref": "#/$defs/ProjectApi"
    },
    "api_kind_name": {
      "type": "string"
    },
    "oai_version": {
      "type": "string",
      "enum": [
        "openapi2",
        "openapi3"
      ]
    },
    "document_specification": {
      "type": "string",
      "enum": [
        "asyncapi2.0",
        "asyncapi2.1",
        "openapi2",
        "openapi3"
      ]
    },
    "base_paths": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "enforced": {
      "type": "boolean"
    },
    "catalog_api": {
      "type": "object",
      "additionalProperties": true,
      "properties": {
        "swagger": {
          "type": "string"
        },
        "info": {
          "type": "object",
          "additionalProperties": true,
          "required": [
            "title",
            "version"
          ],
          "properties": {
            "title": {
              "type": "string"
            },
            "x-ibm-name": {
              "type": "string"
            },
            "version": {
              "type": "string"
            },
            "x-ibm-summary": {
              "type": "string"
            },
            "x-postman-collection-id": {
              "type": "string"
            },
            "x-postman-workspace-id": {
              "type": "string"
            }
          }
        }
      }
    },
    "gateway_api": {
      "type": "object",
      "additionalProperties": true,
      "properties": {
        "swagger": {
          "type": "string"
        },
        "info": {
          "type": "object",
          "additionalProperties": true,
          "required": [
            "title",
            "version"
          ],
          "properties": {
            "title": {
              "type": "string"
            },
            "x-ibm-name": {
              "type": "string"
            },
            "version": {
              "type": "string"
            },
            "x-ibm-summary": {
              "type": "string"
            }
          }
        }
      }
    },
    "consumer_api": {
      "type": "object",
      "additionalProperties": true,
      "properties": {
        "swagger": {
          "type": "string"
        },
        "info": {
          "type": "object",
          "additionalProperties": true,
          "required": [
            "title",
            "version"
          ],
          "properties": {
            "title": {
              "type": "string"
            },
            "x-ibm-name": {
              "type": "string"
            },
            "version": {
              "type": "string"
            },
            "x-ibm-summary": {
              "type": "string"
            },
            "x-postman-collection-id": {
              "type": "string"
            },
            "x-postman-workspace-id": {
              "type": "string"
            }
          }
        }
      }
    },
    "space_urls": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uri"
      }
    },
    "gateway_service_urls": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uri"
      }
    },
    "portal_service_urls": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uri"
      }
    },
    "user_registry_urls": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uri"
      }
    },
    "oauth_provider_urls": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uri"
      }
    },
    "jwt_provider_urls": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uri"
      }
    },
    "tls_client_profile_urls": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uri"
      }
    },
    "extension_urls": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uri"
      }
    },
    "policy_urls": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uri"
      }
    },
    "specialization": {
      "$ref": "#/$defs/APISpecialization"
    },
    "product_urls": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uri"
      }
    },
    "org_url": {
      "type": "string",
      "format": "uri"
    },
    "catalog_url": {
      "type": "string",
      "format": "uri"
    },
    "oauth_providers": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "provider_type": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          }
        }
      }
    },
    "service_status": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "service_url": {
            "type": "string",
            "format": "uri"
          },
          "status": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "sent_at": {
            "type": "string",
            "format": "date-time"
          },
          "processed_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      }
    },
    "gateway_endpoints": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uri"
      }
    },
    "team_urls": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uri"
      }
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "readOnly": true
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "readOnly": true
    },
    "url": {
      "type": "string",
      "readOnly": true,
      "format": "uri"
    }
  },
  "$defs": {
    "APISpecialization": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "spaces": {
          "type": "object",
          "additionalProperties": {
            "type": "object",
            "properties": {
              "gateway_service_urls": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "user_registry_urls": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "oauth_provider_urls": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "jwt_provider_urls": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "tls_client_profile_urls": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "extension_urls": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "policy_urls": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "url": {
                "type": "string",
                "format": "uri"
              }
            }
          }
        }
      }
    },
    "ProjectApi": {
      "type": "object",
      "required": [
        "kind",
        "apiVersion",
        "metadata",
        "spec"
      ],
      "additionalProperties": false,
      "properties": {
        "kind": {
          "enum": [
            "API"
          ],
          "type": "string"
        },
        "apiVersion": {
          "type": "string"
        },
        "metadata": {
          "$ref": "#/$defs/ProjectMetadata"
        },
        "spec": {
          "type": "object",
          "required": [
            "api-spec",
            "policy-sequence"
          ],
          "additionalProperties": false,
          "properties": {
            "api-spec": {
              "type": "object",
              "required": [
                "$path"
              ],
              "additionalProperties": false,
              "properties": {
                "$path": {
                  "description": "Specifies the path to the referencing resource The path can be relative to the referring file or absolute from the project folder This could point to yaml, json, wsdl or zip files",
                  "type": "string"
                },
                "rootFile": {
                  "description": "Entry point file within ZIP archive (required for ZIP archives containing WSDL) applicable only for WebMethods gateway. Specifies the path to the main WSDL file within the ZIP archive. Example: 'global_weather.wsdl' or 'wsdl/services/weather/GlobalWeather.wsdl'",
                  "type": "string"
                }
              }
            },
            "rest-def": {
              "oneOf": [
                {
                  "$ref": "#/$defs/ProjectPath"
                },
                {
                  "$ref": "#/$defs/ProjectReference"
                }
              ],
              "description": "REST definition for SOAP APIs: for DataPower gateways, specify the path to the API spec YAML file using $path; for webMethods Gateway, specify a reference to a SOAPToRESTMapping asset using $ref."
            },
            "uriSchemes": {
              "$ref": "#/$defs/ProjectReference"
            },
            "properties": {
              "$ref": "#/$defs/ProjectReference"
            },
            "cors": {
              "$ref": "#/$defs/ProjectReference"
            },
            "scopes": {
              "$ref": "#/$defs/ProjectReferenceList"
            },
            "policy-sequence": {
              "$ref": "#/$defs/ProjectReferenceList"
            },
            "extensions": {
              "type": "object",
              "properties": {
                "dp-nano-gateway": {
                  "type": "object",
                  "properties": {
                    "apiVersion": {
                      "type": "string",
                      "enum": [
                        "api.ibm.com/v1"
                      ]
                    },
                    "spec": {
                      "type": "object",
                      "properties": {
                        "api-set": {
                          "type": "object",
                          "required": [
                            "name"
                          ],
                          "properties": {
                            "name": {
                              "type": "string",
                              "description": "Name of the API set"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "ProjectMetadata": {
      "description": "Defines a message named Metadata",
      "type": "object",
      "required": [
        "name",
        "version"
      ],
      "additionalProperties": false,
      "properties": {
        "description": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "namespace": {
          "type": "string"
        },
        "tags": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "type": {
          "enum": [
            "REST",
            "SWAGGER",
            "SOAP",
            "GRAPHQL",
            "ODATA"
          ],
          "type": "string"
        },
        "version": {
          "type": "string"
        },
        "domain": {
          "enum": [
            "api",
            "ai-platform",
            "mcp"
          ],
          "type": "string"
        },
        "labels": {
          "type": "object",
          "additionalProperties": true,
          "properties": {
            "gatewayTypes": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "ProjectPath": {
      "type": "object",
      "required": [
        "$path"
      ],
      "additionalProperties": false,
      "properties": {
        "$path": {
          "description": "Field 'path' with JSON name '$path' accepts the value of either 'path' or '$path' from the YAML file. If both 'path' and '$path' are specified, the value of '$path' takes priority.",
          "type": "string"
        }
      }
    },
    "ProjectReference": {
      "type": "object",
      "required": [
        "$ref"
      ],
      "additionalProperties": false,
      "properties": {
        "$ref": {
          "description": "Field 'ref' with JSON name '$ref' accepts the value of either 'ref' or '$ref' from the YAML file. If both 'ref' and '$ref' are specified, the value of '$ref' takes priority.",
          "type": "string"
        }
      }
    },
    "ProjectReferenceList": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ProjectReference"
      }
    }
  }
}