importAPI

Imports an API from the FlexDeploy Artifact Repository into Oracle API Platform.

This operation will look for a single file called flexApi.json in the Artifact Repository to use. If no flexApi.json file is found then it will fallback to any file with a .json extension.  If an API with the same name and version already exist on the server then that API will be updated otherwise the API will be created.  The API Id and API Iteration will be returned as outputs at the end of execution.  

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
API EntitlementsFDOAP_API_ENTITLEMENTSNCSV list of Plan names to entitle the API with during import. If the plan doesn't exist a warning will be logged during execution. This should only be used when multiple API Platform instances are being used.

Inputs

Input NameInput CodeRequiredDescription

Smart Import

FDOAP_INP_SMART_IMPORT

NImport will only take place if changes are detected in the implementation or publication of the API.  This prevents unnecessary API iteration increases.
API GrantsFDOAP_INP_API_GRANTSNMultiselect list of grants to grant to the group(s) specified in the Grantee Groups input
Grantee GroupsFDOAP_INP_GROUPSNGroups or Users are required if API Grants are specified.  Oracle Paas group to receive API Grants.  If multiple then separate with a comma.  Group1,Group2
Grantee Users

FDOAP_INP_USERS

NGroups or Users are required if API Grants are specified. Oracle users to receive API Grants.
Update References

FDOAP_INP_UPDATE_REFERENCES

N

Will query target environment for reference ids and replace them before importing.

  • Always - Always attempt to replace references found in the .references file. If no .references file exists in the artifact repository then an exception will be thrown
  • WhenFound - References will only be imported when the .references file is found. This is the default behavior
  • Never - Never replace references even if the file is found.

See ExportAPI Special Considerations for more information on replacing references.

Apiary Token @since 5.5.0.3FDOAP_INP_APIARY_TOKENN

Refresh token for Apiary. If you have apiary documentation linked in any APIs then this should be set. See Generating an Apiary Token below.

If the import process detects Apiary Documentation and no Token is set your API import will still succeed but the documentation may not be linked properly and you will see a warning in the logs.

Outputs

Output NameDescription
FDOAP_OUT_API_ITERATIONThe API iteration after importing
FDOAP_OUT_API_IDThe API id after importing.  If the API already exists it will not change the id.

Artifacts

This operation consumes 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.


Generating an Apiary Token

In order for Apiary documentation to be linked adequately in your API you should provide an Apiary Token during import. This token is long living and does not need to be updated.

To generate the token:

  1. Open https://login.apiary.io/tokens in a browser
  2. Log in, if prompted
  3. Click the Generate New Token button
  4. Copy and paste the generated token into the FlexDeploy Plugin input for Apiary Token


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