Custom API Guide¶
This guide will cover requests that customize the navigation response with support for additional menu options specific to your application. Much of the basic API Guide applies here as well.
Areas of Customization¶
Datapipe¶
Currently, this configuration is only used to provide a Pilot header for Datapipe portals. Other control panels should avoid using this configuration.
{
"is_datapipe": true
}
Default Data¶
These are the config values Pilot uses if no overrides are specified.
{
"utility-nav": {
"menus": {
"app": null,
"user": null,
},
"portfolio": {
"section": "other",
}
},
"primary-nav": {
"show": true,
"service-level-indicator": {
"show": true
}
},
"username": null,
"is_datapipe": false,
"logout": null
}
Request API Contract¶
Path¶
VERB | PATH | DESCRIPTION |
---|---|---|
POST | /v1/cloud/<tenant>/navigation | Request header with additional configuration options |
Post Body¶
{
"utility-nav": {
"menus": {
"app": {
"items": [{
"label": "Account Settings",
"uri": "https://mycloud.rackspace.com/account",
"external": true
}, {
"label": "Billing Information",
"uri": "https://app.objectrocket.com/billing"
}, {
"label": "System Status",
"uri": "https://app.objectrocket.com/system/status"
}]
}
}
},
"primary-nav": {
"service-level-indicator": {
"show": false
}
}
}
Sample Request¶
curl --request POST \
--header "X-Auth-Token: $TOKEN" \
--data-binary "@request.json" \
"https://prod.pilot.api.rackspacecloud.com/v1/cloud/$TENANT/navigation"
request.json
{
"primary-nav": {
"show": false
},
"utility-nav": {
"menus": {
"app": {
"label": "Intelligence Settings",
"items": [
{
"label": "Time Zone",
"element_id": "intelligence-timezone-settings"
}
]
}
}
}
}
Default Header Contract¶
Pilot has the ability to build a customized default header for your property. We do this by storing a fallback configuration and generating static html content. This is kept up to date with changes to the pilot api by being built after deployment and functional testing. This default header is stored in Rackspace Cloud Files, and thus gives a way for your property to load a Pilot header should the Pilot API experience an outage.
You should contact us if you would like a custom default header to be made available. We will add your configuration to our build process and make your header available via cloud files cdn at https://2bb412f1e613f0876bcd-c2711431ca6ffe5afee18d654580dd9b.ssl.cf1.rackcdn.com/<your property/
VERB | PATH | DESCRIPTION |
---|---|---|
GET | https://2bb412f1e613f0876bcd-c2711431ca6ffe5afee18d654580dd9b.ssl.cf1.rackcdn.com/<your property> | Request the header for a specific property. |
Schema Definition¶
The complete schema which defines valid customization payloads is defined as follows:
Note that canon-bootstrap is no longer used, and will be ignored by Pilot, but is kept in the schema to prevent legacy breakage.