The External API Lookup extension allows you to fetch resources from third-party/external apps using APIs and display the resources in a field in the content type of your stack.
Thus, while creating an entry, you can select one or more resources from a list of possible values as an input value for the field.
This step-by-step guide explains how to create an External API Lookup extension for your content types.
Steps for Execution
- Add the “External API Lookup” custom field to your Stack
- Use your custom field
Add the “External API Lookup” custom field to your stack
- Go to your stack, navigate to the “Settings” gear icon, and select Extensions.
- On the Extensions page, click on the + Add Extension button, and select Create new. If you have not added any extensions in the stack yet, click on the create a new one link as shown below.
- In the Select Extension Type window, select Custom Field.
- On the Create New Extension page, enter values in the fields as given below:
Save the custom field.
Now, let’s understand how you can start using your extension in your content type.
Use your custom field
Once you have added a custom field, you can use it in your content type like any other field. To add a custom field in your content type, perform the following steps:
- Create a content type and add the Custom field to it.
- Under Select Extension, select the “External API Lookup” field you created and set the other properties. You can add other fields as per requirements.
- Finally, click on either Save or Save and Close to save your changes.
- Next, create an entry for this content type, and you will see the External Lookup API field in action.