Customization Web API: publishEnd

You can check whether the publishing of customization projects has been completed in an MYOB Acumatica instance.

HTTP Method and URL

To check whether the publishing of customization projects has been completed in an MYOB Acumatica instance, you use the POST HTTP method and the following URL.

POST http(s)://<Acumatica ERP Instance URL>/CustomizationApi/publishEnd

You replace <MYOB Acumatica instance URL> with the URL of your MYOB Acumatica instance.

Request Body

You do not need to pass any data in the request body.

Response Body

The following table lists the fields that the system returns in the body of the response.

Field Description
isCompleted A Boolean value that indicates (if it is set to true) that the publishing has been completed.
isFailed A Boolean value that indicates (if it is set to true) that the publishing has been completed with at least one error.
log
An array of log records. Each element of the array has the following fields:
  • timestamp: The date and time when the information about the performed operation was added to the log
  • logType: The type of the log message, which can be one of the following:
    • trace
    • information
    • warning
    • error
  • message: The log message

Example

The following request shows an example of a check for the result of the publication of customization projects.

Tip: In the request example below, <MYOB Acumatica instance URL> is the URL of the MYOB Acumatica instance (such as https://my.acumatica.com/MyInstance). You can omit the instance name in the URL (that is, you can use https://my.acumatica.com) if the instance is installed in the root of the website.
POST /<Acumatica ERP Instance URL>/CustomizationApi/PublishEnd HTTP/1.1
Host: localhost
Content-Type: application/json

If the response is 200 OK, it contains the body, which is shown in the following example. In this example, the publishing has completed (as the isCompleted field indicates) and it has completed successfully (as the isFailed field indicates).

{
    "isCompleted": true,
    "isFailed": false,
    "log": [
        {
            "timestamp": "2023-01-04T14:21:31.827",
            "logType": "information",
            "message": "Copying the website C:\\AcumaticaERP\\Customization\\PhoneRepairShop\\PhoneRepairShopValidation\\PhoneRepairShopWebsite"
        },
        {
            "timestamp": "2023-01-04T14:21:31.83",
            "logType": "information",
            "message": "Patching the file C:\\AcumaticaERP\\Customization\\PhoneRepairShop\\PhoneRepairShopValidation\\PhoneRepairShopWebsite\\CstPublished\\Pages_RS\\RS201000.aspx"
        },
        ...
    ]
}

Usage Notes

The publication of a customization project through the web API is implemented asynchronously. You should publish a customization project as follows:

  1. You start publication by calling the PublishBegin method.

    Once the publication has started, a logical lock occurs in the database that prevents multiple publications from running simultaneously on the same database.

  2. As soon as you get a successful response, you start calling the PublishEnd method until it returns "isCompleted": true.

    To check whether the publishing has been completed successfully, you can check for "isFailed": false in the response to the PublishEnd method.

The calling of the PublishEnd method initiates the execution of customization plug-ins. Therefore, without a call to the PublishEnd method, the publication cannot be completed.