Publish
Publish Mock Server

Same as publishing API documents, you can publish a mock server from API Repository at any point of the git history. We will use scripts files under 'apigit-mock' folder to truly deploy a mock server sandbox in our cloud for your access.

API Repo Files

Same as API document, there are three places to publish a mock server in an API Repository page:

  • Method 1: Click the 'Publish' button will publish a mock server by using the latest ('HEAD') scripts files under the 'apigit-mock' folder.

API Publish Button

  • Method 2: Click the 'History' button, and then publish from the latest commit in the list as a mock server.

publish latest commit

  • Method 3: Click the 'History' button and go to 'All Commits' page. You can select any commit to publish a mock server from the whole history of the API repository.

publish all commits

  • Method 4: In Mock scripts editing mode, you can directly published a mockserver from a recent commit. This is very useful. You can use it to write or debug your mock scritps as you don't need to exit the edit mode.

publish all commits

In the publish Mock Server dialog, you can set the domain name for this cloud mock server sandbox. All these information can also be modified in the Mock server setting page later.

publish mock server dialog

Once you published a mock server, you can navigate to the Mock Server Center page, and click one mock server to enter its console to review its information, like access logs, state, routes ...

mock server center

Click one of the published mock servers. You will enter that mock server's console page.

mock server center