GraphQL request for getting a Publication mapping from its URL
If you know the URL of a published Publication, you can retrieve its Publication mapping (which includes the ID of the Publication).
The following sample makes a request to fetch the relevant mapping information for a Publication with the specified URL:
{
publicationMapping(namespaceId: 1, siteUrl: "http://staging/index.html") {
domain
port
path
pathScanDepth
publicationId
}
}
A possible response to this request could be:
{
"data": {
"publicationMapping": {
"domain": "staging",
"port": "80",
"path": "/",
"pathScanDepth": 34,
"publicationId": 33
}
}
}