What is Publishing?
APIGit supports publishing a Mock Server from a specific SHA, which means taking that commit as a snapshot to deploy a mock server in APIGIT cloud sandbox:
- a live mock server will be deployed in a APIGIT cloud sandbox.
- the mock server will be powered by
express.js
, and the mock scripts (main.js
) at this SHA(snapshot) will be loaded to run inside a docker. - a unique mock server url will be generated for you to access this mockserver.
You can create multiple publishes, while each publish will deploy a sepeate mockserver in the cloud, each pointing to a different SHA (snapshot).
Where to Publish
Publish from a Branch Head
Navigate to the API repository and switch to the branch you want to publish. Click the “Publish” button in the middle of the panel and select “Publish MockServer”:
Once you click the “Publish MockServer” button from the dropdown list, it will launch a dialog allowing you to publish a mock server from the head of the branch:
In the publish dialog, you can specify:
- mockserver url name (Team and Enterprise plan only)
- Description of this mock server
- Access control
Publish from a Specific Commit
Instead of publishing from the head of a branch, you can also navigate to the commits list and publish directly from a specific commit:
Publish while editing
In editing mode, you can also publish a mock server whitout exit editing mode by click “Publish” button and choose a commit to publish:
View Published Mock Servers
View All Mock Serverpublishes of a Specific API Repository
Navigate to the API Repository’s publish center page to view all publishes of this API Repository:
View All Mock Serverpublishes Across All Repositories
To view all publishes across all repositories, click the global “Publish Center” button in the top navigation: