api-definition

The API objects that are published to one or more catalogs.

  • Override Key: api-definition
  • Child Objects
    • api-schema
    • Security-definition
      • oauth2
        • api-sec-oauth
        • _instance: swagger name
      • apiKey
        • api-sec-apikey
        • _instance: swagger name
      • http
        • api-sec-http-scheme
        • _instance: swagger name
      • basic
        • x-ibm-authentication-url
        • api-sec-basic-auth
        • _instance: swagger name
    • security-requirements
      • api-sec-oauth-req
        • Override Key: override
        • _instance: Datapower object name
      • api-sec-req
    • api-path
      • Override Key: path
      • _instance: <Path URI>
      • Child Objects
        • api-operation
          • Override Key: operation
          • _instance: <Operation Method>
          • Child Objects
            • security-requirement
              • api-sec-oauth-req
                • Override Key: override
                • _instance: Datapower object name
              • api-sec-req
            • api-schema-request
            • api-schema-response
              • Override Key: override
              • _instance: Datapower object name
          • api-schema-request
    • wsdl-validation-schema-location
    • cors-policy
    • cors-rule
      • Override Key: override
      • _instance: Datapower object name
  • Scopes:
    • _global
      • _instance: name:version
    • _organization
      • _instance: name:version
    • _catalog
    • _instance: name:version
  • Example: In this example, the @exclusive flag is used on the instance nick-limits:1.0.0 in my-catalog of my-organization. The @exclusive flag means that only the CLI commands at the instance level are applied for that API while all other APIs in that catalog still have the global, organization, and catalog CLI commands applied to them.
    {
       "api-definition":{
          "_global":{
             "api-schema":[
                "echo hello schema global scope"
             ],
             "security-definition":{
                "oauth2":{
                   "api-sec-oauth":[
                      "echo hello oauth def global scope"
                   ]
                },
                "apiKey":{
                   "api-sec-apikey":[
                      "echo hello apikey global scope"
                   ]
                },
                "http":{
                   "api-sec-http-scheme":[
                      "echo hello http scheme global scope"
                   ]
                },
                "basic":{
                   "x-ibm-authentication-url":[
                      "echo hello ibm auth global scope"
                   ],
                   "api-sec-basic-auth":[
                      "echo hello basic auth global scope"
                   ]
                }
             },
             "security-requirements":{
                "api-sec-oauth-req":{
                   "override":[
                      "echo hello oauth req global scope"
                   ]
                },
                "api-sec-req":[
                   "echo hello seq req global scope"
                ]
             },
             "api-path":{
                "_instance":{
                   "/new-path-1":{
                      "api-schema-request":[
                         "echo hello path instance /new-path-1 request schema global scope"
                      ],
                      "path":[
                         "echo hello path instance /new-path-1 path global scope"
                      ]
                   }
                },
                "api-operation":{
                   "_method":{
                      "GET":{
                         "security-requirements":{
                            "api-sec-oauth-req":{
                               "_instance":{
                                  
                               },
                               "override":[
                                  "echo hello GET api-sec-oauth-req global scope"
                               ]
                            },
                            "api-sec-req":[
                               "echo hello GET api-sec-req global scope"
                            ]
                         },
                         "api-schema-request":[
                            "echo hello GET api-schema-request global scope"
                         ],
                         "api-schema-response":{
                            "_instance":{
                               
                            },
                            "override":[
                               "echo hello GET api-schema-response global scope"
                            ]
                         },
                         "operation":[
                            "echo hello GET operation global scope"
                         ]
                      }
                   },
                   "security-requirements":{
                      "api-sec-oauth-req":{
                         "override":[
                            "echo hello oauth req global scope"
                         ]
                      },
                      "api-sec-req":[
                         "echo hello seq req global scope"
                      ]
                   },
                   "api-schema-request":[
                      "echo hello operation request schema"
                   ],
                   "api-schema-response":{
                      "override":[
                         "echo hello operation response schema global scope"
                      ]
                   },
                   "operation":[
                      "echo hello operation global scope"
                   ]
                },
                "api-schema-request":[
                   "echo hello request schema global scope"
                ],
                "path":[
                   "echo hello path global scope"
                ]
             },
             "wsdl-validation-schema-location":[
                "echo hello wsdl-val global scope"
             ],
             "cors-policy":[
                "echo hello cors-policy global scope"
             ],
             "cors-rule":{
                "override":[
                   "echo hello cors-rule global scope"
                ]
             },
             "api-definition":[
                "echo hello api-def global scope"
             ]
          },
          "_organization":{
             "my-organization":{
                "api-definition":[
                   "echo hello api-def _organization scope"
                ]
             }
          },
          "_catalog":{
             "my-organization":{
                "my-catalog":{
                   "api-definition":[
                      "echo hello api-def _catalog scope"
                   ]
                }
             }
          },
          "_instance":{
             "my-organization":{
                "my-catalog":{
                   "nick-limits:1.0.0":{
                      "@exclusive":true,
                      "api-schema":[
                         "echo hello schema _instance scope"
                      ],
                      "security-definition":{
                         "oauth2":{
                            "api-sec-oauth":[
                               "echo hello oauth def _instance scope"
                            ]
                         },
                         "apiKey":{
                            "api-sec-apikey":[
                               "echo hello apikey _instance scope"
                            ]
                         },
                         "http":{
                            "api-sec-http-scheme":[
                               "echo hello http scheme _instance scope"
                            ]
                         },
                         "basic":{
                            "x-ibm-authentication-url":[
                               "echo hello ibm auth _instance scope"
                            ],
                            "api-sec-basic-auth":[
                               "echo hello basic auth _instance scope"
                            ]
                         }
                      },
                      "security-requirements":{
                         "api-sec-oauth-req":{
                            "override":[
                               "echo hello oauth req _instance scope"
                            ]
                         },
                         "api-sec-req":[
                            "echo hello seq req _instance scope"
                         ]
                      },
                      "api-path":{
                         "_instance":{
                            "/new-path-2":{
                               "api-schema-request":[
                                  "echo hello path instance request schema _instance scope"
                               ],
                               "path":[
                                  "echo hello path instance / path _instance scope"
                               ]
                            }
                         },
                         "api-operation":{
                            "_method":{
                               "GET":{
                                  "security-requirements":{
                                     "api-sec-oauth-req":{
                                        "override":[
                                           "echo hello GET api-sec-oauth-req _instance scope"
                                        ]
                                     },
                                     "api-sec-req":[
                                        "echo hello GET api-sec-req _instance scope"
                                     ]
                                  },
                                  "api-schema-request":[
                                     "echo hello GET api-schema-request _instance scope"
                                  ],
                                  "api-schema-response":{
                                     "override":[
                                        "echo hello GET api-schema-response _instance scope"
                                     ]
                                  },
                                  "operation":[
                                     "echo hello GET operation _instance scope"
                                  ]
                               },
                               "security-requirements":{
                                  "api-sec-oauth-req":{
                                     "override":[
                                        "echo hello oauth req _instance scope"
                                     ]
                                  },
                                  "api-sec-req":[
                                     "echo hello seq req _instance scope"
                                  ]
                               },
                               "api-schema-request":[
                                  "echo hello operation request schema"
                               ],
                               "api-schema-response":{
                                  "override":[
                                     "echo hello operation response schema _instance scope"
                                  ]
                               },
                               "operation":[
                                  "echo hello operation _instance scope"
                               ]
                            }
                         },
                         "api-schema-request":[
                            "echo hello request schema _instance scope"
                         ],
                         "path":[
                            "echo hello path _instance scope"
                         ]
                      }
                   },
                   "wsdl-validation-schema-location":[
                      "echo hello wsdl-val _instance scope"
                   ],
                   "cors-policy":[
                      "echo hello cors-policy _instance scope"
                   ],
                   "cors-rule":{
                      "override":[
                         "echo hello cors-rule _instance scope"
                      ]
                   },
                   "api-definition":[
                      "echo hello api-def _instance scope"
                   ]
                }
             }
          }
       }
    }