Select Page

Knowledge

Rest Plugin

Our REST Plugin is a core building block of the platform. You can use it to send HTTP requests and get the response. It also allows you to preview the response within the platform.

You can use the REST Plugin Connection to make your first call to the REST API.

Create REST Connection

1. In Connections, click on “Add Connection”.

2. REST Plugin provides a detailed account of how to quickly start working with your Endpoint connection by following the below steps.

  • Select “Plugin_RESTV2.0” from the Plugin dropdown.
  • Provide a Name to connection.
  • Select environment details like Test, Development, Stage, Prod as per the endpoint hosted environment.

NOTES

Plugin_REST_V1.0 vs Plugin_RESTv2.0 : V1 enables the connection for basic authentication. V2 enables the connection for Basic and OAuth along with Testing capabilities.

3. Create REST Request.

  • URL: Provide the endpoint URL to start with the REST connection.
  • Swagger URL: Swagger is a framework for describing your API by using a common language that is easy to read and understand for developers and Testers.
  • Provide the swagger URL when the endpoint URL is exposed through swagger.
    Eg:http://petstore.swagger.io/auth
  • Request Headers: Headers are property-value pairs that are separated by a colon.
    • You can provide JSON-formatted request bodies in REST calls by sending the request with the following HTTP header:
      Eg: Content-Type: application/json
    • Authorization specifies the token type used to authorize the request.
      Eg: Authorization: Bearer

4. OAuth2.0 Authentication

  • OAuth Url: In case you need to follow OAuth. Provide OAuth URL.E.g. “https://test.tcia.org/Token”
  • OAuth headers: Headers are property-value pairs that are separated by a colon.
    • You can provide JSON-formatted request bodies in REST calls by sending the request with the following HTTP header:Eg: Content-Type: application/x-www-form-urlencoded.
    • Authorization specifies the token type used to authorize the request.Eg: Authorization: Bearer
  • OAuth Body: Which accepts the parameters to authorize the request.
  • Send the request parameters in the OAuth Body section to make a successful connection.Eg: grant_type=password&username=D2L&password=Jcg05salGzyA

5. Test the REST!

  • Test Method Type: Which accepts the type of method in which Type the request method like POST, GET, PUT, etc. to call the endpoint.
  • Test Method name: Provide the endpoint URL method name in the “MethodName” textbox.
  • Test Parameters: Provide the test method parameters if any in the “TestParameters” box.

6. After providing the details Test the connection by providing the Credentials which are accepted by the endpoint URL.

7. If the connection is valid, you can see the result window with results. If not, you can see the connection failed message.

  • Below is the successful connection message with the results.
  • The connection is valid with No error message.