Search Results

Managing Your First API

Assuming that your alias is given as evalXXXX, log on to the Mashery API Control Center using the url: https://evalXXXX.admin.mashery.com, fill in your trial User ID and Password, then click Sign In.

This opens the Get Started welcome page, the administrative dashboard (also called API Control Center) that lists a number of common tasks.

We'll start with configuring an API Definition with Endpoint Definitions. (Method Definitions will be configured in a following section).
Note: As you navigate through the pages, you will see question mark (?) icons next to the fields. Clicking on the icon will bring up help information about each of the fields.
First, create the sample API:
  1. Click on Create a new API on the Get Started page. You should be on the Get Started page after logging into the API Control Center.

    New APIs can also be created by navigating to Design > APIs .

    If you haven't created an API in your area yet, you'll see a Create your first API Definition button.

    If you already created an API in your area, you can click the button to create a new API.

  2. Enter a name for your API: Acme API.
  3. Description: Leave it empty for now.
  4. API Version: 1.0
  5. Organization: Leave as the default (You can use the drop-down list to select one of the other pre-defined Organizations if you wish).
  6. Click the Create button at the top right of the page.
  7. After clicking Create, you will be taken to the API Definitions page for Acme API. This is where you will see the Endpoint Definitions for the API, once they have been created.

  8. On the left hand side navigation menu, you can see all the options available:
    • API Definition & Endpoint List: The list of all the endpoint definitions created for the API (the current view).
    • API Definition Settings: Overall API definition settings, including the name, description, and version that were just configured.
    • Security Settings: Whether you want to enable OAuth for this API.
    • Error Sets: Custom error messages you want to create for this API.
    • Access Control: Controls which groups are allowed access to view this API.
    • Performance Acceleration: Controls how to setup caching for this API.
  9. Click the Create your first Resource Endpoint button.

    Note: If you have previously created an endpoint, you can click on the button to create another endpoint.
    Fill in the following fields for the endpoint:
    1. ForName for your Endpoint: Default
    2. For Customize your Public Endpoint Address: The first field will be pre-filled to your trial area. For example: evalXXXX.api.mashery.com. In the second field, enter: acme/v1

      Note:

      For the first text box, this value will typically be set to a domain name that would match your domain such as api.your-company-name.com or service.your-company-name.com. For the purposes of this quick start example, the domain name provided by Mashery is used.

      For the second text box, the Path used on the Public Endpoint Address identifies this specific endpoint configuration for this specific service/API, with an assumed wildcard at the end of the path. The path prefix used must be unique across your Mashery instance.

    3. For Your Endpoint Address:
      • Set the Protocol to: HTTPS
      • First text box: integration.cloud.tibcoapps.com
      • Second text box: u4gmknzehvjvneeh54tpksna5fvtvmdx/ (include the trailing /)
      • Third text box: (leave blank)

      Note:

      For values in the first text box, you will need to request your hostnames to be white-listed on Mashery. Please contact us via http://support.mashery.com/ for enabling specific domains to be white-listed.

      The second text box provides the ability for a URL rewrite from the configured Public Endpoint Address.

      Given the scenario thus far, the URL of http://evalXXXX.mashery.com/acme/v1/product will map to https://integration.cloud.tibcoapps.com/u4gmknzehvjvneeh54tpksna5fvtvmdx....

    4. Click the Create button at the top right of the page.
  10. Click on Access Control in the left-hand navigation menu, select Everyone in the Current Roles field, then click Save on the top right of the page.

    Note: By default, no one can see this API as you update your definition. You can create custom roles to enable specific developers to see this API. This quick start example allows Everyone to see the API.
  11. Change the default Mashery behavior for passing query parameters to exclude the passing of the API key:
    Note:

    By default, Mashery will pass all query parameters it receives onto the backend application, including the API key. Some backend applications don't handle unexpected parameters well, maybe by giving an invalid response or a message saying it received too many arguments.

    Mashery provides fine control over what is sent to the backend application, with the option to exclude the passing of the API key.

    1. Click on API Definition & Endpoint List on the left hand navigation menu. You will see in the list the Default resource endpoint definition that you created in Step 8.
    2. Click on Default and you will be taken to the Endpoint definition.
    3. On the left hand navigation menu, select More Settings.
    4. Set the Remove API Key and Signature from Endpoint Call to Enabled, then click Save on the top right of the page.