Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add API Explorer section to the Help Center #305

Merged
merged 9 commits into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/_data/sidebar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,16 @@ help:
label: Get feedback from users
link: /publish-documentation/feedback/
- type: category
label: Enhance your documentation content
link: /enhance-documentation-content/
label: Documentation experience
link: /documentation-experience/
icon: pencil-line
items:
- label: API Explorer
link: /documentation-experience/api-explorer/
- label: Markdown support
link: /enhance-documentation-content/markdown-support/
link: /documentation-experience/markdown-support/
- label: Topics
link: /enhance-documentation-content/topics/
link: /documentation-experience/topics/
- type: category
label: Customization Options
link: /customization-options/
Expand Down
10 changes: 6 additions & 4 deletions src/_data/sidebars/help.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,16 @@ resources:
label: Get feedback from users
link: /publish-documentation/feedback/
- type: category
label: Enhance your documentation content
link: /enhance-documentation-content/
label: Documentation experience
link: /documentation-experience/
icon: pencil-line
items:
- label: API Explorer
link: /documentation-experience/api-explorer/
- label: Markdown support
link: /enhance-documentation-content/markdown-support/
link: /documentation-experience/markdown-support/
- label: Topics
link: /enhance-documentation-content/topics/
link: /documentation-experience/topics/
- type: category
label: Customization Options
link: /customization-options/
Expand Down
72 changes: 72 additions & 0 deletions src/_help/documentation-experience/api-explorer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
title: API Explorer (Beta)
---

- TOC
{:toc}

The API Explorer is a new feature in beta with limited access. You can request access by following this link.

## **What is the API Explorer?**

The API Explorer allows you to test an API in real-world conditions directly from its documentation. It facilitates API discovery by enabling you to try out specific API calls on any server listed in your definition file. It helps you get started quickly without a testing environment or share a specific use case for discovery, support, or debugging purposes.

## **How to use the API Explorer?**

The API Explorer is accessible at any time via a button at the top of your documentation (and remains visible as you scroll). Each operation also features a button that opens the API Explorer for that specific operation.

[screenshot of the button]

If you haven’t opened the API Explorer from a specific operation, you can select one from the corresponding menu.

[screenshot of the API Explorer]

We identify the required fields directly from the definition file, making it easier for you to fill out the request, detecting whether it’s a boolean, date, etc. Fill in the expected information to execute the request and receive a response.

[screenshot of a response]

### **Sharing**

It’s possible to share a request setup, which is useful for showing an example in a demo or for support purposes. The share button generates a URL that includes the pre-filled request parameters.

> This URL will never share your authentication parameters or the response.
{: .info}

[screenshot of sharing]

If the API documentation has been updated after the share URL was generated, you will be notified when attempting to use it. You will then have the option to switch to an updated version of the operation. Note that in this case, new elements will no longer be pre-filled.

> The curl commands generated when filling out the form are copyable.
{: .tip}

## **Security**

> To ensure maximum security and confidentiality of requests, Bump.sh does not collect or store any confidential data during API Explorer use.
{: .warning}

### **Proxy**

To ensure optimal compatibility and total confidentiality, we chose to let the user’s browser process the requests rather than our main servers. Despite the obvious advantages, requests sent from a browser are sometimes poorly received by servers and result in what are known as CORS errors.

To avoid this situation, we created our own proxy, designed to ensure that requests sent from a browser are processed without error by an API’s servers, all while maintaining confidentiality and security: **cors toujours**.

This proxy is hosted outside our infrastructure to ensure data security. Its open-source code is available via this GitHub repository: [link to the repo].

For more on our approach and the decisions behind its creation, we’ve prepared a more detailed article: [link to the blog post].

### **Authentication**

We support authentication for APIs that require prior authentication. Two options are available: via HTTP (Basic/Bearer) or via API keys.

[screenshot of the button and field to fill in]

> When sharing a request, this authentication information is never transmitted.
{: .info}

## **Known Limitations of the Beta**

The API Explorer is currently in closed beta. As such, not all features are yet available. Here is a non-exhaustive list of its current limitations:

- Branches are not yet supported: it works from the default branch of your documentation.
- When multiple servers are mentioned in the definition file, all of them are accessible via the API Explorer (and the user can choose which one to use for their requests). It is not possible to hide some of them.
- Rich responses are not yet supported: responses will display text only.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also update the contents of this one, as it's not mentioning the API Explorer yet, but it does mention the other pages in this section?

File renamed without changes.
Loading