The Listings page is where you can create and manage your API listings. It can be found in the Producers sidebar under the “APIs” section.

Here you can:

  • Create new APIs
  • Edit existing APIs
  • Delete APIs
  • View API configuration details
  • View API usage statistics and earnings.

Your APIs

The API listings page can be found in the Producers sidebar under the “APIs” section. Here you will find a list of all the APIs you have created, together with some basic information such as the current listed version and the MRR (Monthly Recurring Revenue).

Your APIs listing

Clicking on the API will take you to the API details page where you can view and edit the API configuration.

API Details

The API details page provides a detailed view of the API configuration. Here you can view and edit the API listing details, such as the API name, description, and pricing. You can also modify the gateway configuration with settings such as secret headers, request timeouts etc. Finally, you can view the API usage statistics and earnings.

API Details

The API Details page is divided into multiple tabs:

  • Details: Provides general information about the API, such as the name, description, and website URL. This is where most of the listing descriptions are found.
  • Endpoints: Lists all the endpoints that are part of the API. At the moment this is mostly used to edit the pricing of the endpoints.
  • Gateway: Provides configuration settings for the API gateway, such as secret headers.
  • Metrics: Provides statistics on the API usage, such as the number of requests and earnings.

Details

The Details tab provides general information about the API. Here you can view the API name, description, logo, and other details.

To edit the Details configuration, click on the “Edit” button. This will change the dashboard into an editable mode where you can change the settings.

Basic Settings

The Basic Details section contains the following fields:

  • Name: The name of the API. This is the name that will be displayed to consumers.
  • Logo: The logo of the API. We accept most image formats, such as PNG and JPEG.
  • OpenAPI Spec: The OpenAPI specification of the API. This is a JSON or YAML file that describes the API endpoints.

The OpenAPI spec is used to generate the API documentation and most of the configuration settings. If you are not familiar with OpenAPI, you can use an API Designer to create the spec. Our aim is that you only need to write the OpenAPI spec and we will take care of the rest. This also will make it easier in the future to quickly sync configuration changes with your API.

Listing Details

The Listing Details section contains information relevant to how the API is listed on Sulu Hub:

  • Sparkhub Hostname: The hostname used to access your API through Sulu Hub. For example, setting the Sulu Hub hostname to “httpbin” will make the API available at https://httpbin.p.sulu.sh.

  • Base URL Suffix (optional): A suffix that is appended to the base URL of the API. For example, if the base URL of the API is https://httpbin.org, and the base URL suffix is /v1, the API will be available at https://httpbin.p.sulu.sh/v1.

  • Short Description: A short description of the API. This is displayed in the API listings page as part of the API card.

API Card

  • Long Description: A longer description of the API. This is displayed on the API details page.

  • Terms of Service URL: A URL to the terms of service of the API. This is displayed on the API details page.

  • Healthcheck URL: A URL that Sulu will use to check the health of the API. This will be displayed to the consumers as part of the API documentation in a future iteration. If you do not have a healthcheck URL, you can use the base URL of the API or any other URL that returns a 200 status code.

  • Readme: A markdown file that contains additional information about the API. This is displayed on the API details page.

  • Visibility: The visibility of the API. This can be set to either Listed or Unlisted. Listed APIs are visible to all consumers on Sulu. Unlisted APIs are only visible through a link to the API, and only to the owners of the API.

Saving and Publishing Changes

After you have made the necessary changes to the Details configuration, click on the “Save changes” button to save the changes.

All changes are stored in a draft state until you publish them. You can modify other sections of the draft, such as the Gateway or Endpoints, and then publish all changes at once.

To publish the changes, click on the “Publish” button. This will make the changes live and propagate them across our system. Note that changes can take up to 10 mins to propagate.

Endpoints

The Endpoints tab lists all the endpoints that are part of the API. Here you can view the endpoint name, description, and pricing.

The pricing can be edited by clicking on the “Edit” button.

Use the Bulk Modify functionality paired with quick endpoint filtering by path to quickly update the pricing of multiple endpoints.

Edit Pricing

Gateway

The Gateway tab provides configuration settings for our API gateway. Hub works as a reverse proxy for your API, verifying the details of the consumer and forwarding requests to you. Here you can set settings such as secret headers, request timeouts, and other settings.

Gateway Configuration

To edit the gateway configuration, click on the “Edit” button. This will change the dashboard into an editable mode where you can change the settings.

  • Sparkhub Hostname: The hostname used to access your API through Sulu (Sparkhub is the name of our proxy 😉). For example, setting the Sparkhub hostname to “httpbin” will make the API available at https://httpbin.p.sulu.sh.

The Sparkhub Hostname is modified through the Details section of the API config. It is only shown here for reference.

  • Upstream Hostname: The hostname of your API. This is the hostname where Sulu will forward the requests. Note that this is only the hostname. For example, if your API is available at https://httpbin.org, you should set the upstream hostname to httpbin.org. Please include all parts of the hostname.

  • Upstream Protocol: The protocol used to access your API. This can be either http or https.

  • Upstream Port: The port used to access your API. This is the port where your API is listening for requests. Normally, this should be 80 for http and 443 for https. If you are not sure, please try with these values first.

  • Request Size Limit: The maximum size of the request body that Sulu will forward to your API. This is useful to prevent large requests from consuming too much of your resources. The size is specified in MB.

  • Proxy Timeout: The maximum time Sulu will wait for your API to respond. If your API takes longer than this to respond, the request will be terminated.

Secrets

Secrets are used to authenticate the requests coming from Sulu to your API. They can also be used to add extra information to the request that cannot be modified or known by the consumer.

Secrets are added as headers or query parameters to the request.

To add a secret, click on the “Add Header” / “Add paramert” button respectively. This will add a row to the table where you can specify the key and value of the secret.

Add a secret header

The Sulu Hub provides the X-Sparkhub-Secret header by default. This header contains a secret token that is unique to each API. It can be used to verify that the request is coming from Sulu.

Saving and Publishing Changes

After you have made the necessary changes to the gateway configuration, click on the “Save changes” button to save the changes.

All changes are stored in a draft state until you publish them. You can modify other sections of the draft, such as the Details or Endpoints, and then publish all changes at once.

To publish the changes, click on the “Publish” button. This will make the changes live and propagate them across our system. Note that changes can take up to 10 mins to propagate.

Metrics

The Metrics tab provides statistics on the API usage. Here you can view the number of requests, error rates, latency of requests, and earnings.

The charts are similar to the ones found in the Producer Dashboard page. However in this case they are prefiltered to show only the data for the current API. For more information on the charts, please refer to the Producer Dashboard page.

Feedback

API Producers are the bloodline of our startup. We want to make Sulu useful for you and your business. We are still early on our journey, and there is so much more to build. That is why we greatly appreciate your patience and support as we grow.

If you have any feedback or suggestions, we have a dedicated site for it! Please come here and make sure to write your feedback so that it can become part of our roadmap.