Importing API Definition Files
Note: You must be an Area Level Administrator to import an API definition from a Swagger file. For more information on Administrator roles, see
Control Center Roles.
To upload a Swagger document and convert it to a new API definition:
Procedure
-
On the
API Definition page, click the
New API Definition button, then select
Import a File.
-
In the
Import an API Definition File window, click
Choose File.
Navigate to the Swagger file to import, then click Open. -
After the selected file is displayed and organization is specified, click
Preview.
The Preview window displays the objects that are going to be created, and allows you to decide which endpoints to create (automatically selected, by default) and not create.
Ensure that the API specification conforms to Swagger specification version 2.0 and the file format is JSON. To open the JSON file directly from this window, click the file link in the Uploaded API Definition field. If the information looks correct, click Create to continue creating your API definition. -
If the API definition is successfully created, a
Success window is displayed.
- (Optional) Click View Your New API to view the Interactive Documentation page, which displays the Interactive Documentation that is automatically created based on the newly-imported Swagger specification. This is a fully- functional Interactive Documentation, and uses the specifications from the imported JSON. For more information on Interactive Documentation, see the Interactive Documentation topic.
-
(Optional) Click
Add Interactive Documentation to add the API definition as an Interactive Documentation item.
-
(Optional) Click
Edit Interactive Documentation (to edit the API definition document) or
Add to Packages and Plans (to add the API definition or endpoint to an existing (or new) package or plan).
-
If
Edit Interactive Documentation is selected, you can further edit the API definition in the
Edit Interactive Documentation:<endpoint name> page.
When finished, click Save. -
If
Add to Packages and Plans is selected, use the
Packages selector to navigate to your existing package, use the
Plans selector to navigate to your existing plan, then click
Save.
To add the API definition or endpoint to a new package, use the Package create button to create a new package.
Enable the allow self-provisioning keys checkbox to permit the use of keys without requiring developer approval.
Then, use the Plan create button to create a new plan, then click Save.
Once the API definition and all of its endpoints have been successfully added to the new package and plan, click Close.
-
If
Edit Interactive Documentation is selected, you can further edit the API definition in the
Edit Interactive Documentation:<endpoint name> page.