# Run AI App Builder domain publication

This function publishes an AI App Builder website to the document root directory for the selected domain.

Note:

  This function requires that your package includes the AI App Builder feature.

Important:

  When you disable the AI App Builder feature, the system disables this function.

Endpoint: GET /Nova/publish
Version: 11.138.0.10
Security: BasicAuth

## Query parameters:

  - `archiveUrl` (string, required)
    URL to download the website archive from.
    Example: "https://example.com/archive.zip"

  - `domain` (string, required)
    The domain to use for the AI App Builder website.
    Example: "example.com"

  - `signature` (string, required)
    Security signature for request validation.
    Example: "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6"

  - `userId` (string, required)
    Unique identifier for the website.
    Example: "nova_a1b2c3d4e5f6g7h8"

  - `cleanup` (integer)
    Whether to cleanup the domain's document_root directory during the publication process.
* 1 — Remove previous files in domain's document_root directory during the publication process.
* 0 — Do not remove any files in domain's document_root directory during the publication process.
    Example: 1

## Response 200 fields (application/json):

  - `apiversion` (integer)
    The version of the API.
    Example: 3

  - `func` (string)
    The name of the method called.
    Example: "publish"

  - `module` (string)
    The name of the module called.
    Example: "Nova"

  - `result` (object)

  - `result.data` (object)

  - `result.data.file_name` (string)
    The publish process's log file name.

Note:

This is the full path to the log file.
    Example: "/home/cpuser/logs/nova_publish_2024-02-02T16:46:58.log"

  - `result.data.pid` (integer)
    The publish action's process ID.
    Example: 123456

  - `result.data.user` (string)
    The cPanel account's username.
    Example: "username"

  - `result.errors` (array,null)
    List of errors if the API failed.

  - `result.messages` (array,null)
    List of messages generated by the API.

  - `result.metadata` (object)

  - `result.metadata.transformed` (integer)
    Post-processing may have transformed the data.
    Enum: 1

  - `result.status` (integer)
    - 1 - Success.
- 0 - Failed: Check the errors field for more details.
    Enum: 1, 0

  - `result.warnings` (array,null)
    List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running an API.


