Swagger Documentation & Test Console
Swagger is a means of describing the structure of an API so that machines can read it. This, coupled with the Swagger UI, provides a useful tool to document and test an API.
Â
Access
All Reapit REST APIs have in-built Swagger documentation and UI, accessible on the URL:
https://webservice.reapit.net/< client code >/rest/_doc/
e.g.
https://webservice.reapit.net/demo/rest/_doc/
The endpoints you can access will be determined by the permissions granted to the API Key you’re using. By default, a skeleton selection of endpoints is exposed:
In order to expose the endpoints you have access to, add the API Key to the ApiKey parameter of the query string of the URL you’re using to access the Swagger documentation, e.g:
https://webservice.reapit.net/demo/rest/_doc/?ApiKey=8ed799bbe77c96311e71f64b99ec2ddde765d13a
Â
Authorisation
In order to call authorised endpoints, you’ll need to set the authorisation in the UI using the same API Key you use to access the service:
Endpoints
The API endpoints are grouped and listed on the page.
E.g. for property:
Testing an Endpoint
To test an endpoint, click on it to expand and click Try it out
You can then enter any required criteria before clicking Execute
The Curl command used to call the API endpoint is displayed below, along with the response the API returns:
Â
Data Definitions
The definitions of all the data objects used by the API are documented at the bottom of the UI page.
These can be clicked and expanded in order to show their attributes:
Â