Create a project
Before you begin
- Role
- Editor or higher.
A project holds a set of mocks and the address they answer on. Create one for each API you want to stand in for, such as an orders service answering at https://orders-api.mockhub.dev.
-
Open Projects in the page header.
-
Select New project. In a workspace with no projects, Create your first project does the same.
-
Enter a Project name, such as
Orders API. -
Describe what the project is for under Description (optional), if you like.
-
Enter a Subdomain, such as
orders-api. The field starts with a random suggestion, and Suggest replaces it with another. The hint under the field gives the rules your plan sets; Choose a hostname explains them. -
Check the Host. The workspace’s default domain is already chosen and labelled
default; choose another from the list if you need to. -
Read the addresses under Requests will be answered at. They are the project’s addresses, with their schemes, once you create it.
On a shared domain such as
mockhub.dev, MockHub adds six random characters to the subdomain, shown asxxxxxxuntil the project exists:https://orders-api-xxxxxx.mockhub.dev. Choose a hostname explains why. -
Select Create project.
Result
Section titled “Result”MockHub shows Project created and opens the project on its Mocks tab, which says No mocks yet. The project’s addresses are shown under its name, each with a copy button.
The address answers from that moment. Until an active mock matches a request, every request gets a 404 No mock matched that names the method and path no mock answered.
A new project answers from its mocks alone (Mock only), evaluates templates in responses, and stores a request log of each request a mock answers, with Authorization and Cookie values redacted. Requests no mock answers are not logged. An Admin changes this on the project’s Settings tab; see Set a project’s logging and templating.
Limits
Section titled “Limits”- The plan sets how many projects a workspace can have. At the limit, No room for another project takes the place of New project. Deleting a project makes room; archiving one does not. See Plans, quotas and limits.
- Creating a project needs the Editor role or higher. A machine token cannot create projects; see Roles, personal tokens and machine tokens.
- The form sets the name, description and address only. Logging, templating and the gateway mode are set afterwards, by an Admin.
- A custom domain is offered under Host only once it is verified. Until then it is listed with
(unverified)and cannot be chosen. - When MockHub has no room for new projects, Create project answers
MockHub has no room for new projects right now. Existing projects are not affected. Try again later.and creates nothing. See No room for new projects.