|
1 | 1 | --- |
2 | | -title: Specific paths for various Taskcluster resources |
| 2 | +title: Taskcluster URL Format |
3 | 3 | order: 10 |
4 | 4 | --- |
5 | 5 |
|
6 | | -A Taskcluster `rootUrl` is a partial web address containing at least the scheme, host, and optionally a port. In addition, it can optionally specify a |
7 | | -path which will end up being a prefix for all other resources. |
| 6 | +# RootUrl |
8 | 7 |
|
9 | | -Examples: |
| 8 | +A Taskcluster `rootUrl` is a partial web address containing at least the scheme, host, and optionally a port. It cannot specify a path. |
| 9 | + |
| 10 | +Example: |
10 | 11 |
|
11 | 12 | ``` |
12 | 13 | https://taskcluster.example.com |
13 | | -https://taskcluster.example.com/cluster1 |
14 | | -https://example.com/ |
15 | | -https://example.com/cluster2 |
16 | 14 | ``` |
17 | 15 |
|
18 | | -At a given `rootUrl`, the following resources will exist: |
| 16 | +# URLs |
| 17 | + |
| 18 | +Taskcluster uses URLs with the following pattern: |
| 19 | + |
| 20 | +| method | result | |
| 21 | +| --- | --- | |
| 22 | +| api(rootUrl, service, version, path) | `<rootUrl>/api/<service>/<version>/<path>` | |
| 23 | +| apiReference(rootUrl, service, version) | `<rootUrl>/references/<service>/<version>/api.json` | |
| 24 | +| docs(rootUrl, path) | `<rootUrl>/docs/<path>` | |
| 25 | +| exchangeReference(rootUrl, service, version) | `<rootUrl>/references/<service>/<version>/exchanges.json` | |
| 26 | +| schema(rootUrl, service, schema) | `<rootUrl>/schemas/<service>/<schema>` | |
| 27 | +| ui(rootUrl, path) | `<rootUrl>/<path>` | |
| 28 | + |
| 29 | +*NOTE*: you should *always* use this library to generate URLs, rather than |
| 30 | +hard-coding any of the above patterns. |
19 | 31 |
|
20 | | -`$rootUrl/<path>`: At the root, the ui will be served. |
21 | | -`$rootUrl/docs/<path>`: The taskcluster documentation site. |
22 | | -`$rootUrl/references/<service>/<version>/api.json`: A reference for the api exposed by a service. |
23 | | -`$rootUrl/references/<service>/<version>/exchanges.json`: A reference for exchanges published by a service. |
24 | | -`$rootUrl/schemas/<service>/<version>/<schema>`: A schema associated with a service. |
25 | | -`$rootUrl/api/<service>/<version>/<path>`: All services will be routed to under the prefix of `api` with the service name and version in the path as well. |
|
0 commit comments