This section shows you how to create an endpoint from an API definition file
by submitting a multipart/form-data
request (see RFC 2388 for details).
If instead you'd like to submit an application/json
request to create an endpoint, see Make a JSON request to register an endpoint from an API definition file.
-
If you don't already have the obligatory
contractId
andgroupId
members, run the List contracts and groups operation. -
Select the appropriate pairing of contract and group under which you want to provision the new endpoint. Store the
contractId
andgroupId
values. -
Prepare an API definition file and set the
importFileFormat
toraml
orswagger
. -
Assign the filename as the
importFile
. -
Optionally embed the API definition within a ZIP archive, in which case reset the definition filename as
root
and the name of the archive asimportFile
. -
Optionally make the definition or archive file available on the web at an
importUrl
. -
Prepare a
multipart/form-data
request specifying the fields listed in [Parameters] (ref:post-endpoints-file). Specify either animportFile
orimportUrl
, and make sure to specify theroot
if you're uploading a ZIP archive. -
Make a form data POST request to
/api-definitions/v2/endpoints/files
.
The response Endpoint object reflects the newly created endpoint based on your API definition file. You can access the newly created endpoint at the URL specified in the Location
response
header.