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.

Environment/Instance Properties

Property NameProperty CodeRequiredDescription
Oracle API Platform AccountFDOAP_CLOUD_ACCOUNT_CODEYThe Oracle API Platform cloud account to use for this operation.  

Project Properties

Property NameProperty CodeRequiredDescription
Oracle API NameFDOAP_API_NAMEYName of the API being managed
Oracle API VersionFDOAP_API_VERSIONYVersion of the API being managed

Inputs

Input NameInput CodeRequiredDescription
API IterationFDOAP_INP_API_ITERATIONNOptional API iteration to export.  Current/latest iteration will be used if left blank.
API Name
FDOAP_INP_API_NAME
NAn 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
FDOAP_INP_API_VERSION
NAn 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
FDOAP_INP_EXPORT_REFERENCES
NShould any api references also be exported such as Service Accounts, Plans etc. See Special Considerations below for more details.

Outputs

Output NameDescription
FDOAP_OUT_API_ITERATIONThe 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 environment/instance.


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.



The following macros are not currently supported in the footer:
  • style