> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flexagon.com/llms.txt
> Use this file to discover all available pages before exploring further.

# apiDeploy

> This operation creates an api deployment for each specification file to an API Gateway for the OCI tenancy. The apiDeploy operation can only be used w

This operation creates an api deployment for each specification file to an API Gateway for the OCI tenancy. The apiDeploy operation can only be used with a FlexDeploy package-based deployment project of type Oracle API Gateway. On deploy execution, file level attributes `COMPARTMENT_NAME`, `GATEWAY_NAME`, and `PATH_PREFIX` determine if the api deployment should be created new or update an existing deployment the content of the specification file. That means path prefix must be unique for the given compartment-gateway combination for a new api deployment to be created.

Artifact is a single zip file containing api specification files (JSON or YAML).

# Target Properties

<table><colgroup><col /><col /><col /><col /></colgroup><tbody><tr><th>**Property Name**</th><th>**Property Code**</th><th>**Required**</th><th>**Description**</th></tr><tr><td>Oracle API Gateway Account</td><td>`FDOAG_CLOUD_ACCOUNT_CODE`</td><td>No</td><td>OCI account with all the required properties like Tenancy Id, User OCID, and Private Key, etc.Oracle API Gateway Account will be required on either the plugin input or Target. If a value is set on both then, the plugin input will take precedence.See Special Considerations below for instructions on how to create an OCI account for Oracle API Gateway.</td></tr><tr><td>Compartment Name</td><td>`FDOAG_COMPARTMENT_NAME`</td><td>No</td><td>The OCI compartment to deploy an api to. Useful if you deploy to a different compartment per environment.Compartment Name is used and required if the Compartment Name on a file level attribute contains the value `{{FDOAG_GATEWAY_NAME}}`</td></tr></tbody></table>

# Project Properties

<table><colgroup><col /><col /><col /><col /></colgroup><tbody><tr><th>**Property Name**</th><th>**Property Code**</th><th>**Required**</th><th>**Description**</th></tr><tr><td>Root Compartment Id</td><td>`FDOAG_ROOT_COMPARTMENT_ID`</td><td>Yes</td><td>Root or parent compartment Id used to find the sub-compartments for api deployment. i.e. ocid1.tenancy.oc1..\<OCID>This can be sub-compartment as well, but root is suggested.</td></tr></tbody></table>

# Inputs

<table><colgroup><col /><col /><col /><col /></colgroup><tbody><tr><th>**Input Name**</th><th>**Input Code**</th><th>**Required**</th><th>**Description**</th></tr><tr><td>Oracle API Gateway Account</td><td>`FDOAG_INP_CLOUD_ACCOUNT_CODE`</td><td>No</td><td>OCI account with all the required properties like Tenancy Id, User OCID, and Private Key, etc.</td></tr><tr><td>Oracle API Gateway Replace List</td><td>`FDOAG_INP_REPLACE_LIST`</td><td>No</td><td>The String and Value to replace in files, formatted as key=value. One pair per line. Lines that begin with '#' will be ignored.This is useful if you wish to do property replacement on your artifact and don’t want to change the source code to contain property replacement syntax from the beginning.<pre>// The key on the left will be replaced with the value on the right
dev-oic-vbcs-poc-idzor6zhmigm-ia.integration.ocp.oraclecloud.com:443=$\{\{OIC_SERVICE_URL\}\}
$\{OrderService.url}=\$\{\{SOA\_BASE\_URL}}/soa-infra/services/defaults/OrderService/OrderService?WSDL</pre></td></tr><tr><td>Add Tags</td><td>`FDOAG_INP_ADD_TAGS`</td><td>No</td><td>Add defined tags when an API is created or updated and when an APIDeployment is created or updated. This is used to linked SCM commits and FlexDeploy deploy events to API and APIDeployment creation or updates. Default is true.The following defined tags will be added on build:<ul><li>FlexDeploy.**BRANCH** i.e trunk, main, develop</li><li>FlexDeploy.**REVISION** i.e. scm commit hash</li><li>FlexDeploy.**PROJECT\_VERSION** i.e. 1.0.1</li><li>FlexDeploy.**EXEC\_LINK** i.e. [[http://host:port/flexdeploy/next/#/projects/\&lt;project\_id\&gt;/execution/\&lt;execution\_id\&gt;/summary](http://host:port/flexdeploy/next/#/projects/\&lt;project_id\&gt;/execution/\&lt;execution_id\&gt;/summary)](http://fdtlt82.flexagon.azure.com:8000/flexdeploy/next/#/projects/35255801/execution/5872519/summary)</li></ul>If Add Tags is enabled, and these tags do not exist, FlexDeploy will automatically create the tag namespace (FlexDeploy) and the tags within it.</td></tr></tbody></table>

# Artifacts

This operation consumes artifacts from 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

N/A
