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

Eyebrow/Utility Nav

The eyebrow/utility nav bar is the black bar seen at the top of the navigation. It is a required element of the pilot header and will always be returned in a Pilot API response. It contains options that allow users to switch between control panels, contact support, manage their account, and various other global Rackspace actions.

Portfolio

The Portfolio selector allows highlighting different elements of the pilot eyebrow by sending a “utility-nav” -> “portfolio” -> “section” key.

You can specify which section should appear as active with the section property. It should be one of the following:

  • ‘account’
  • ‘azure’
  • ‘billing’
  • ‘dashboard’
  • ‘datapipe-cloud’
  • ‘datapipe-one’
  • ‘faws’
  • ‘gcp’
  • ‘intelligence’
  • ‘myrack’
  • ‘notifications’
  • ‘other’
  • ‘rackspace-cloud’
  • ‘rms’
  • ‘support’
  • ‘tickets’
  • ‘user’
  • ‘vmware’
Note

Please note that the ‘datapipe-cloud’ and ‘datapipe-one’ in the above list of values are only recommended for datapipe-portals. Other rackspace control panels should avoid using them in their configuration.

account, billing, notifications, support, tickets, or user will highlight the associated top level dropdown/link

datapipe-cloud, datapipe-one, faws, gcp, intelligence, myrack, rackspace-cloud, or rms will highlight the product selector dropdown and change the top level title for the dropdown to the name of the associated service.

dashboard will highlight the Rackspace logo.

Example:

{
  "utility-nav": {
    "portfolio": {
      "section": "rackspace-cloud"
    }
  }
}

Account menu

You should customize the account menu if you want to show additional account or other options specific to your property. Provide a configuration with the “utility-nav” -> “menus” -> “app” key. (We use the “app” key for legacy reasons).

Note that, account menu configuration is not available for Datapipe users. Datapipe portals should not use these options. Portals that serve Datapipe users, should note that those users will not see this menu.

Example:

{
  "utility-nav": {
    "menus": {
      "app": {
          "items": [{
            "label": "Account",
            "uri": "https://app.objectrocket.com/account",
            "external": true
        }, {
            "label": "Billing Information",
            "uri": "https://app.objectrocket.com/billing"
        }, {
            "label": "Timezone",
            "element_id": "object-rocket-timezone-setting"
        }]
      }
    }
  }
}

NOTE Pre-Helix, we supported a label in the top-level app object, which corresponds to the text for the section in the account dropdown. Post-Helix, this is no longer used. If your property continues to send a label, Pilot will silently ignore that label.

Individual Item Schema:

Key Name REQUIRED DESCRIPTION
label Yes Text for the item
uri No uri to be used in the anchor tag’s href attribute
element_id No text to be used in the id field of the item
external No

boolean (default false) causes link to open in a new window if true

This behavior is indicated to the user by an icon

NOTE if neither label or uri are provided, the item will not have hover highlighting

User menu

You can provide a “utility-nav” -> “menus” -> “user” key to specify custom content be inserted into the User menu.

{
    "utility-nav": {
        "menus": {
            "user": {
                "items": [
                    {
                        "element_id": "select_timezone",
                        "label": "Time Zone",
                        "uri": "/account#update-timezone"
                    }
                ]
            }
        }
    }
}

The rules for creating items with the “items” list are the same as above for the Account menu.

Switch User Flow

This functionality is ON for everyone. There is no need to provide anything in the payload to opt in at this point. This functionality will work with login.rackspace.com provided data to show a list of users in the Global Nav user dropdown for which the customer has checked the ‘remember me’ box on login. An “Add a Login” button will also be displayed that initiates logging in with another user (URI by default is https://login.rackspace.com/login).

“utility-nav” -> “menus” -> “user” -> “switch_user_flow”

You can provide this key with a URI to customize the URI used in the “Add a Login” button. This value should be provided if the control panel wants additional control over how session handling works with this new feature.

{
    "utility-nav": {
        "menus": {
            "user": {
                "switch_user_flow": "https://my_control_panel.rackspace.com/switch_user"
            }
        }
    }
}
Remembered User Template

“utility-nav” -> “menus” -> “user” -> “switch_user_remembered_template”

Providing the “switch_user_remembered_template” key will change the URI associated with previously remembered users listed in the user menu. You would want to provide this key if you want your control panel to initiate the flow with Astra to switch to the selected user.

The default URI used if this key is not provided is https://login.rackspace.com/login?username=[Username]. If you provide this key, use [Username] to indicate the position where the user’s username should be.

{
    "utility-nav": {
        "menus": {
            "user": {
                "switch_user_flow": "https://my_control_panel.rackspace.com/switch_user",
                "switch_user_remembered_template": "https://my_control_panel.rackspace.com/login?username=[Username]"
            }
        }
    }
}
Username

You can override the label for the User menu by providing a username. But you should avoid using this approach because usually, username is populated from Identity and this approach is only intended for cases when the Identity call is not made, or known to fail.

{
  "username": "appuser"
}

Support

——-DEPRECATED——-

All configuration of the support menu/link is deprecated. Moving forward, Pilot will always contain a Support menu. The support drawer flyout has been removed, and as such, you cannot replace its trigger with a custom link.

Formerly, Pilot showed a button to trigger a support drawer flyout. This flyout has been removed and replaced by a series of links in the “Support” menu, which duplicate the support drawer’s functionality. Pilot will ignore support configuration options as shown below. We recommend that all apps stop sending these options.

Control Panel Selector

——-DEPRECATED——-

The control-panel-selector has been deprecated and will be removed in a future pilot release. Please refer to the Portfolio section for updated documentation

The control panel selector is shown at the top left of the utility nav, and allows the user to switch between properties.

You can specify a label that indicates the currently active property.

{
  "utility-nav": {
    "menus": {
      "control-panel-selector": {
        "label":  "Rackspace Intelligence"
      }
    }
  }
}

Application/Primary Nav

Hiding Application/Primary nav

The primary navigation component is optional. You may choose to not show a primary nav if your project does not fit appropriately with the other items.

{
  "primary-nav": {
    "show": false
  }
}

Logout

You can override the logout uri that is shown in the account dropdown.

{
  "logout": {
    "uri": "https://intelligence.rackspace.com/saml/logout"
  }
}

Support Service Level

By default, pilot shows a support service level indicator when Rackspace Public Cloud is selected in the portfolio section. This could cause confusion if Rackspace’s support service levels do not apply to your services. There is a boolean option to turn off this visual indicator.

{
  "primary-nav": {
    "service-level-indicator": {
      "show": false
    }
  }
}

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.