Generating Credentials With Swagger
  • 02 Nov 2023
  • 2 Minutes to read
  • Dark
    Light

Generating Credentials With Swagger

  • Dark
    Light

Article Summary

How to Generate Credentials (Swagger)

What is Swagger?

A web graphical tool that will expose all the RESTful API endpoints and design your own API access and codes on the fly after you have Authorized.

Getting Started

You will need to navigate to your CobbleStone® Contract Insight application's API URL using a supported web browser such as Chrome to be taken to the local Swagger API page. To find your API URL, SaaS Clients can view the How To: Locate API Information (SaaS Clients) article and Deployed Clients can view the How To: Locate API Information (Deployed Clients) article.


Getting Authorized…

You have to expand any endpoint (an entry that performs some action or query such as ‘Add’ or ‘Get’). Click the endpoint to expand it to show all the information, then click the red exclamation point which will appear on the lower right side of the expanded endpoint entry. 


Clicking the red exclamation icon will open a dialog box. Choose the dropdown to select the type of Client authentication – in this case, you will choose ‘Basic auth’.


Choosing Basic auth will show a Client ID and Client Secret which you will need to fill in. 


Populate with the Client ID and Client Secret values from Contract Insight (instructions can be found in the article How To: Generate Client ID and Client Secret) then click the Authorize button.


This endpoint/entry is now authorized and can be used as indicated by the blue icon.


Scroll down to the entry and put in a value that is appropriate – this will vary depending on what endpoint you have chosen. Then click Try It Out!


If successful, you will a JSON formatted Response Body and the Response Code will be 200.


Whenever you are prompted to enter an Entity or EntityName, that will be part of the URL which is a segment and this will have to be changed in the following way:

  • If the EntityName for example is tblContracts, the Entity is without the tbl prefix (so it would be Contracts).
  • If it is a user defined entity, the format will be tbl_u_Example and the Entity will be u_Example

In EntityList endpoint, you can see the entry after clicking Try It Out! And use the value in EntityNameForAPI:

The EntityList includes important information on various Entities, such as AllowAdd which will permit that function (Add, Edit, View, etc.)

REVIEW OF ADD, GET, UPDATE

Get and Update endpoints do not use select any IsDeleted record unless it was overwritten in the work clause

WHAT IS A WORK CLAUSE?

An object inside the nested JSON sent in the body that allows you to use most (not all) of the operators in SQL. In order to create that work clause JSON to meet the requested schema, we suggest using a web GUI tool that is shipped  BASE_URL/API2/Web that you can use a client id and secret to sign in

WHAT ABOUT DELETE?

We do not delete a record from the data we mark it as IsDeleted = true.

 


Was this article helpful?