> For the complete documentation index, see [llms.txt](https://community-test.logicnets.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://community-test.logicnets.com/release-9/platform-documentation/advanced-topics/system-integration/external-workspace-management-publish-runtime-application-flow.md).

# External Workspace Management - Publish Runtime Application Flow

## LogicNets Design Environment (LDE) Publish Web Service

The LogicNets web service receives the request to generate the runtime package. It generates the runtime package and uploads the package to DMS by calling back a DMS web service.

### Request

A relative base URL for the request is:

*https\:////logicnets.lns?verb=start\&code=Publish\&external\_id=\&runtime\_package\_id=\<runtime\_package\_id>\&hostname=\&port=\<DMS-port*\_>\_

Method: *POST*

| Name                 | Description                                                                                                          | Example                                           |
| -------------------- | -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- |
| external\_id         | This is the DMS session Id, which is used to call back the DMS web service with status update of the process.        | external\_id=ed35ac18-4c83-4ad9-b2ef-97e3cabc7249 |
| hostname             | This is the host name where the DMS web services are running.                                                        | hostname=dms.company.com                          |
| port                 | This is the port number where the DMS web services are listening for requests.                                       | port=8080                                         |
| runtime\_package\_id | LogicNets uses this identifier to name the runtime package and writes this indentifier to the package meta xml file. | runtime\_package\_id=mypackagev10                 |

### Body

The system sends the project and the dependent projects that need to be published in the body of the request.

| Name               | Description                                                                             |
| ------------------ | --------------------------------------------------------------------------------------- |
| mainProject        | This is the project JSON object representing the main project (that will be published). |
| dependencyProjects | This is the array of Project JSON objects. These are the dependent projects.            |

#### Project JSON Object

| Property   | Type                                 | Description                                                                                                                                                                |
| ---------- | ------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id         | String                               | DMS assigned ID for the project                                                                                                                                            |
| dataZip    | Base64-encoded binary zip (optional) | This is the byte stream of the zip file or it is null. The zip file includes the project files for one LogicNets projectNull for new projects                              |
| isReadOnly | Boolean (optional)                   | <p>True indicates that project should be opened in read-only mode. False indicates that project should be opened in edit mode.<br>The default value is <em>false</em>.</p> |
| metaXml    | String (optional)                    | This is the meta-XML of project.                                                                                                                                           |

## DMS Service to Save Published Package

To receive a generated runtime package and the status of the publish process the DMS needs to provide a web service.

### Request

A relative base URL of the web method is */LogicNetsImport/Save?sessionid=*

Method: *POST*

| Property       | Description                                                                           |
| -------------- | ------------------------------------------------------------------------------------- |
| DMS-session-id | This is the ID the system passes in the Start LDE URL.                                |
| Body           | This is a JSON object with the package and the publish status that needs to be saved. |

**Body**

| Property      | Type                      | Description                                                                                                                                                                   |
| ------------- | ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| dataZip       | Base64-encoded binary zip | This is the byte stream of the zip file, which includes the published package.                                                                                                |
| sessionId     | String                    | This is the DMS Session ID.                                                                                                                                                   |
| metaXml       | String                    | This is the meta-XML of published package.                                                                                                                                    |
| status        | String                    | <p>201 – Indicates publish was successful.<br>417 – Indicates expectation failed. Expectation is “run-time package created”. Failure detail is included in statusMessage.</p> |
| statusMessage | String                    | This contains any additional error message information and the publish log.                                                                                                   |

### Response

The DMS must respond to the request with an HTTP status code.

| Status Code | Status Text           | Description                                                 |
| ----------- | --------------------- | ----------------------------------------------------------- |
| 200         | Success               | This indicates the request is successful and data is saved. |
| 403         | Forbidden             | This indicates that the authentication failed.              |
| 500         | Internal Server Error | This indicates that there were expected server errors.      |

### Additional Information

Check the following links for more information:

* [IIS configuration for Client Certificate Mapping](/release-9/platform-documentation/system-administration/installation/iis-client-certificate-mapping-configuration.md)
* [LogicNets System Administration Guide](/release-9/platform-documentation/system-administration/installation/command-line-scripts.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://community-test.logicnets.com/release-9/platform-documentation/advanced-topics/system-integration/external-workspace-management-publish-runtime-application-flow.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
