Use the POST method on the /api-definitions endpoint to import an API definition to
Talend Cloud API Designer.
Procedure
-
Open Talend Cloud API Tester and create a
new request.
-
In the METHOD drop-down
list, select POST.
-
Enter the following URI with the correct region
parameter:
- Optional:
Expand QUERY PARAMETERS and click
Add query parameters.
The following parameters are available:
Parameter |
Description |
format
|
Format of the API definition that you are
importing. The value can be:
-
OpenApi3 (default value)
-
Swagger20
-
Swagger12
-
Raml10
-
Raml08
|
failOnWarnings
|
Specify if you want to stop the process at the
first warning on the model transformation. The value can be
true or false. The default value is
false. |
mainFile
|
If you are importing an API definition with
multiple files in a ZIP file, enter the name of the main definition
file. |
-
Click the Add header
button and enter Authorization in the
name field and Bearer followed by a space and your token in the
value field.
Information noteTip: In
Talend Cloud API Tester,
you can add your token as a private environment variable and reference it in
your requests using the expression builder. For more information, see
Using environments.
- Optional:
Edit the Content-Type
header.
By default Talend Cloud API Tester adds a Content-Type
header with the value application/json to
POST requests. If you want to import your
definition as a YAML or ZIP file, change this value to application/x-yaml or application/zip.
-
Add your API definition:
- Enter the definition in the BODY text box.
- Click the Text drop-down list above the request body
and select File, then browse to the file or drag and drop it.
-
Once your request is configured, click Send.
Results
The API definition is created in
Talend Cloud API Designer. The
response returned contains its ID and other metadata such as the creator ID and creation date.