- Instance, custom, system, third party APIs can be tested on the 'API testing' page.
- Events, schedulers, and data migration scripts can be tested on this page.
- On the 'API testing' page there are left and right side panels.
- The left panel contains the API request-related terms like Headers, Params, Query params, Body, Code, Pre hook, Post hook, and Integrations.
- There are Key-Value pair of the headers.
- You can see the pre-defined headers and their values are there.
|It will change the response keys text as requested case. noChange | camelCase | capitalCase | constantCase | dotCase | headerCase | noCase | paramCase | pascalCase | pathCase | sentenceCase | snakeCase
|To get flat response we use this request header. no_action | make_flat
|To get the meta-data of requested API. false | true
|Place secret id from API Maker.
We can get backend error messages in any user language and directly show them to the user in UI, so the user can take appropriate actions.
Provide saved internationalization name in request header.
|System will try to run requests in maximum provided sandbox, so if 1 provided every request will run in one sandbox, even if we have multiple sandbox with multiple API Maker instances.
|We can provide response type in request header. As provided header value we can expect the response type. application/json | text/xml | text/yaml
|To reset the cache of the requested API manually and get fresh data, we can use 'x-am-cache-control' request header. no_action | reset_cache
|Encrypt response data and get in to the response. no_encryption | get_only_encryption | get_data_and_encryption
|Provide token of API user in "x-am-authorization" header which will be generated from API Users inside API Maker.
|User token should be provided in 'x-am-user-authorization' header which will be generated based on some database user if required.
|Provide AWS Cognito token in request header 'x-aws-authorization', if required.
|Provide Google user token in request header 'x-google-authorization', if required.
|Provide Azure active directory token in request header 'x-azure-authorization', if required.
|If user do not send 'x-no-compression' in request header, and response characters are more than value of "maxCharsResToCache" than the response will be compressed.
|If any API did not give a response within given time, the sandbox will break and give a proper error message in the response.
|When user sent encrypted payload, user must have to sent "x-am-encrypted-payload:true".
- While using the Get by id, Remove by id, Replace by id, and Update by id APIs there are two params to provide.
- Click on the 'Edit' button, and you can update params in key-value pair JSON format.
- 'id' and 'primaryKey' should be provided while using the above APIs.
- The 'id' is the primary key of the collection/table and 'primaryKey' is the name of the column which you want to behave as the primary key.
- While using the Distinct and Distinct with query APIs you have to provide 'field' and 'order' params.
- 'field' is the column name from which you want to get the distinct data.
- 'order' has 'asc | desc' value.
- If you provide 'asc' as the order value you will get the response data in ascending order of the given field and 'desc' will get response data in descending order.
- Provide query params key-value pair as per your requirement.
- You can edit query params in JSON format too.
|All table fields
|You can use any column name as query params.
- In some APIs requests, it is required to provide a payload(body). You can provide payload in the 'Body' tab.
- You can provide payload as 'JSON' or 'Form data'.
- 'Generate data' can generate the sample payload data as a single object or array of objects.
- 'Code' tab contains your code. It can be used while using custom API, third party API, events, scheduler, and data migration script.
- You can create multiple versions of your code. At a time only one can activate and the active version's code will use.
- Import utility class in code to use any utilities in your custom code.
- To get some idea about code structure you can use the 'insert code' button and add sample code.
- From code user can call any auto-generated or external APIs.
- API Maker users can add multiple pre hooks.
- It will run before the actual API request execute.
- You can create multiple code versions of the pre hook.
- All APIs support pre hook.
- Read more...
- API Maker users can add multiple post hooks.
- It will run after the actual API request execute.
- You can create multiple code versions of the post hook.
- All APIs support post hook.
- Read more...
- To call API from different languages you can generate the API code.
- In the drop-down select the language you want and the API code will generate instantly.
- The generated code is ready to use.
- The right panel contains the API response-related data. It has Response, Logs, and Docs tabs.
- The requested API response will show in the response tab.
- You can download the response in a single click, and it can be downloaded as text file.
- Response type, HTTP status code, taken time, etc... information is shown in this tab.
- When you print any logs it will get in this tab.
- If you select any code portion, you will see the related example of that code in this tab.
- You can add that sample code to your code easily.
Instance APIs test
- Select instance, database, collection, and API. Click on the 'SEND' button, and you will get the response of that API.
- Test generated and schema APIs. Also, edit the collection's schema.
- You can use headers, params, query params, body, code, pre hook, post hook, and integration for the instance APIs.
- While testing the API you can check the detailed response on the same page.
System APIs test
- On the 'API testing' page all the system APIs can be tested and checked their response.
- Just select the system API, add the required details, and you can test system APIs.
- Here, you can add pre-post-hooks in the system API.
Custom APIs test
- Select the custom API you want to test.
- You can see the code in the 'code' tab.
- If you want to update the code just change the code and press
ctrl + sand it will update.
Third party APIs test
- The list of bundles, APIs version, and APIs name is shown in the drop-down.
- Just select the API and hit the 'SEND' button to test the third party API.
- Here, add multiple versions of the code. The active version will be executed.
- Pre- post-hooks can be added and tested with the Third party API.
- To test any events just select the event from the drop-down and select its listener.
- You will the code of that event in the 'code' tab.
- In the Body tab provides the event data if required.
- Create multiple code versions of that listener.
- Select any scheduler from the drop-down, and you will check the code of its.
- You can add/update schedulers, headers, and their code from this page.
- To test the scheduler hit the 'SEND' button, and you will get the response of the scheduler code.
Database migration scripts test
- From the drop-down select the migration script, and you can test it.
- You can alter the code of the database migration script.
- The response of the script will be shown in the right panel response tab.
- If there are any logs added you will get that in the Logs tab.