This is a Developer task |
OpenCities provides Rest API access to content and form data. The API operates on a site level and should be enabled on a per-site basis.
Any site with the API key set is automatically enabled for API access. API keys can be generated or revoked using the API Management screen accessed from the main menu in admin. When you select Generate New Key, documentation on OpenCities APIs will be displayed.
This screen also provides a Swagger interface to test the API methods provided and check the response objects. The screen is configured to automatically pick up the API key generated for the site.
Note: {objectTypeEndpoint} for content API can be accessed via the Content Types > Content Overview screen.
Authentication
The Rest now API offers two methods for authenticating requests.
We recommend using Basic Authentication, however HMAC Authentication will remain an option for compatibility with existing API integrations.