Endpoint URL

Notation: The following conventions are used in the syntax description: Brackets "[" and "]" indicate optional parts. Brackets "<" and ">" indicate mandatory parts. Vertical lines "|" indicate that you must choose one alternative. All other symbols, including parentheses, should be taken literally.

URL format

https://[[[ref→]instanceName→]repo→]<owner>.<grpc|rest>.qa

Where:

  • Delimiter is a right arrow unicode symbol U+2192 &#8594;
  • owner is the name of your GitHub account
  • repo is the name of your repository
  • instanceName is an instanceName parameter from your yaml config
  • ref is git commit SHA or git branch name (default value is your main branch)
  • "/" symbols should be replaced with unicode symbol U+2192 &#8594;
  • "." symbols should be replaced with × unicode symbol U+00D7 &#215;
  • All parameters are case insensitive

Short URL format

It is possible to omit optional parts like instanceName and repo in the endpoint URL. In this case, the mock service will try to determine these parameters automatically. This works well if you only have one repository with a mock configuration and only one instance definition in the configuration file.

The following endpoints are valid:

  • https://<owner>.<grpc>.qa
  • https://<repo>→<owner>.<grpc>.qa
  • https://<instanceName>→<repo>→<owner>.<grpc>.qa

Limitations

There are DNS restrictions on a domain name length:

  • Each label can be up to 63 bytes long
  • The total length of a domain name cannot exceed 255 bytes, including the dots

If the combined length of your account name, repository name, instance name, and ref exceeds the limit of 63 bytes, you can use an Url Shortener (which is currently under development) or a HTTP header as an alternative:

mockqa-path: <owner>[/repo[/instanceName[/ref]]]

Example

For example below URL points to the Greeter gRPC mock instance defined in the https://github.com/mockqa/demo repository:

https://greeter→demo→mockqa.grpc.qa/

Where

  • owner is mockqa
  • repo is demo
  • instanceName is greeter

Endpoint URL builder

You can use the Endpoint URL builder dialog in the Tools menu in the dashboard to create an endpoint URL for your mock server instance:

endpoint-url-builder