The Orgzit Web API is an interface for querying information from and enacting change in an Orgzit workspace. You can use the API not only to fetch records but also to create and update records in Orgzit.
Fetching records through API is a three-step process:
- Accessing the API Key
- Making a Record Fetch Request
- Making the Requests to Fetch the Records
1. Accessing the API Key
To access your API Key, log into your Orgzit account, and go to your User Profile page.
You will find your API Key in the System Information Section there. Copy your entire API Key.
2. Making a Record Fetch Request
Once you retrieve the API key from your account, you can start making requests with the API.
- You will need to pass the key to the API in the header of your requests. Paste the key you copied in the Authorization Header.
- Set the Request Method to PUT.
- The Request URL has the following format:
where the account_name is the name of your Orgzit account and the dataform_id refers to the ID of your dataform/table.
You can find the data form ID in the URL just before your dataform/table name.
Here, 03-interactions is the dataform/table, and
fmey0g37cu is the dataform ID.
In the above-mentioned Request URL, the Query Parameters are limit and offset. The value of
limit shows the number of records you will fetch at a time and
offset shows the starting point.
You can also get the Request URL from the Network Tab in the Browser's Developer Tools(in the Headers section).
- Set the Request Payload in the JSON format.
3. Making the Requests to Fetch the Records
Once you send your API request now, you will fetch the first 20 records from your specified table.
Fetch Records with Pagination Offset
To fetch records with a pagination offset, you can set the offset query parameter in your request URL.
Fetch Records with Filters
To fetch records with filters applied, you can mention the filters in your Request Payload.
Here, the field depicts the name of the field on which the filter is applied, op depicts the condition on which data is being filtered (here, it is gt -> greater than) and values show the value on which the filter condition is being applied.
You can also copy the Request Payload directly from the Network Tab of the Developers Tools.