- Update a custom hostname
Partially updates a custom hostname by replacing the defaultSiteId, defaultContextId, or both, as needed.
The hostname itself cannot be updated after the custom hostname has been created and registered. As a workaround, you must delete the existing custom hostname and create a new one to change the hostname.
The default site ID associated with the custom hostname.
If you don't specify a value for defaultSiteId, you'll need to manually include it in the query parameter or body with each request to the custom hostname to ensure it is resolved correctly.
The default context ID associated with the custom hostname.
If you don't specify a value for defaultContextId, you'll need to manually include it in the query parameter or header with each request to the custom hostname to ensure it is resolved correctly.
- Production serverhttps://edge-platform-admin-api.sitecorecloud.io/api/admin/v1/hostnames/{hostname}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PATCH \
https://edge-platform-admin-api.sitecorecloud.io/api/admin/v1/hostnames/sitecore-api-preview.example.com \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"defaultSiteId": "playsummit",
"defaultContextId": "3BTl4aU7w12A5M76m9p8IA"
}'Accepted
The default site ID associated with the custom hostname.
If you don't specify a value for defaultSiteId, you'll need to manually include it in the query parameter or body with each request to the custom hostname to ensure it is resolved correctly.
The default context ID associated with the custom hostname.
If you don't specify a value for defaultContextId, you'll need to manually include it in the query parameter or header with each request to the custom hostname to ensure it is resolved correctly.
{ "defaultSiteId": "playsummit", "defaultContextId": "3BTl4aU7w12A5M76m9p8IA" }