exportAPI
Exports an API from Oracle API Platform and stores it as an artifact in FlexDeploy.
The operation will search for APIs with the name and version specified in the FDOAP_API_NAME and FDOAP_API_VERSION properties.  Once the API has been located, it is saved as flexApi.json in the Artifact Repository. This operation also returns the exported API iteration as an output.
Target Properties
Property Name | Property Code | Required | Description |
---|---|---|---|
Oracle API Platform Account |
| Y | The Oracle API Platform cloud account to use for this operation.  |
Project Properties
Property Name | Property Code | Required | Description |
---|---|---|---|
Oracle API Name |
| Y | Name of the API being managed |
Oracle API Version |
| Y | Version of the API being managed |
Inputs
Input Name | Input Code | Required | Description |
---|---|---|---|
API Iteration |
| N | Optional API iteration to export. Current/latest iteration will be used if left blank. |
API Name |
| N | An optional API name can be given as an input. Primary use case of this input is for utility workflows where this input is delegated to a workflow input. |
API Version |
| N | An optional API version can be given as an input. Primary use case of this input is for utility workflows where this input is delegated to a workflow input. |
Export References |
| N | Should any api references also be exported such as Service Accounts, Plans etc. See Special Considerations below for more details. |
Outputs
Output Name | Description |
---|---|
| The API iteration that was exported. This will be returned regardless of whether or not the API Iteration input was specified. |
Artifacts
This operation produces artifacts that will be stored in the artifacts repository.
Endpoint Selection
This operation will select all available endpoints associated to the Target.
Endpoint Execution
This operation will execute on any one of the selected endpoints and will be random in the determination of which one.
Special Considerations
Exporting API References
If you have multiple API Platform instances you often need to migrate APIs from your non prod instance to your prod instance (or however you have segregated the instances). The API json used for the export/import will contain references to other artifacts such as service accounts, gateways etc. The ids of these references may be different between your two instances. As such, something needs to replace the ids before importing to the second instance.
The Export References input will get the references your API is using and save them to an api.references file in the artifact repository. An example of the file is below:
{
"offset": 0,
"count": 3,
"limit": 128,
"hasMore": false,
"links": [
{
"templated": "true",
"method": "GET",
"rel": "self",
"href": "https://flexapi-flexagonoraclecloud.apiplatform.ocp.oraclecloud.com:443/apiplatform/management/v1/apis/100/references?offset=0&limit=128"
}
],
"items": [
{
"name": "Sample Service",
"id": "100",
"type": "Service"
},
{
"name": "OIC Service Account",
"id": "100",
"type": "ServiceAccount"
},
{
"name": "Development",
"id": "100",
"type": "Gateway"
}
]
}
During import you have the option to use this references file to replace any references within your API with the correct ids based on the instance in which you are deploying via the Update References input. When references are updated, it will check for an existing object of the same name and type in the target instance and use the corresponding id.
- style