The Try it! option allows developers to test the API endpoints directly from the documentation. It typically provides an interactive interface where developers can enter the required parameters for a particular API endpoint and see the resulting response with code samples.

The servers must be defined in the specification file for the Try it! option.


November 2023 enhancement

Earlier, the "Try it" module was only when the server variable was defined "Globally" (Specified next to the "Info" object in the specification file). With the recent enhancement, the "Try it" module is available even if the server variable is mentioned at an endpoint level


Supported authorization techniques

The following are the different types of authorization techniques that are supported in Document360's API documentation feature.

What is 'authorization' in the context of API?

Authorization is a process by which a user gains access to an API based on specific credentials.

  • HTTP authentication
    • Basic
    • Bearer
  • API key
  • OAuth2
    • Authorization flow
    • Authorization flow with PKCE
    • Client Credentials flow
    • Implicit flow
  • OpenID Connect

Things to consider in OAuth2 and OpenID authorization

Redirect URI

A redirect URI (Uniform Resource Identifier) is a specific endpoint or URL a web application uses to redirect users after completing an authorization grant flow or authentication process.

Ensure that you set the redirect URI in the following format: domain/oauth

Example: https://apidocs.document360.com/oauth

Silent renewal

When the user has authenticated and is performing actions with Try it! Option: the authorization may expire after a certain time. To overcome this scenario, we perform automatic renewal of the refresh token without requiring the user to log in again.


Why is the Try-it feature not appearing for me?

One possible reason is that the server variable
(URL) is not defined in the specification file.


How is the API documentation feature intuitive and interactive for the users?

API documentation feature assists the developers by providing various validations in the parameters and body parameters fields. This feature offers the following validations for a better user experience:

  • Required - Validates the data requirement

Example: For a mandatory field, it indicates this requirement with the 'Required' text.

  • Type - Validates the specific data type

Example: For fields that support only boolean input, it indicates this type with the 'Boolean' text.

  • Pattern - Validates the input in certain fields against specific patterns

Example: An email field must be in the format of 'email_id@domain', and any incorrect format is flagged as an error.

  • MinLength - Validates the input has the minimum number of characters
  • MaxLength - Validates the input has the maximum number of characters
  • MinValue - Validates the input specified is greater than the minimum value
  • MaxValue -  Validates the input specified is less than the maximum value

To further enhance the user experience, the API documentation also offers the option to ''Use default value'' in the fields.


Related videos

Test API Endpoints Directly from Documentation with Try it Feature


Related blogs

Introducing API Documentation: Enhance your API Experience - Click to read