Pages
The Pages API lets you manage pages and widgets in your Port portal programmatically. You can create, update, delete, and get pages, manage widgets, and update page permissions.
Port has released an improved version of the Pages API. This version is more reliable, secure, and intuitive, with stronger validations and clearer error messages. Once your account is rolled out to this version, these updates apply both when you call the Pages API directly and when you manage pages through IaC.
Rollout
Port will gradually enable the improved Pages API for accounts where all organizations under the account pass the new validations of the improved API with no errors.
In order to check whether an organization uses the beta version or GA version of the Pages API, call GET /pages/version.
Improvements
The improved Pages API includes many changes. The following are examples, not a complete list:
- Clearer, field-specific error messages. For example, sending
"title": 2in a POST widget body no longer returns a generic and inaccurate message like"widget" must have required property 'agentIdentifier'. Instead, you get a matching error such as"widget/title" Invalid input: expected string, received number. - Page type (for example
"blueprint-entities","dashboard", and others) is required when creating a page. - Stricter checks of page structure, including
grouperanddashboard-widgetwidgets and their hierarchy with other widgets inside the page. - Added validations that enforce a better widget experience with fewer bugs. Missing required fields now return an error instead of creating a partially valid widget.
- Full IaC support - including specific entity page.
Page types
The Pages API works with the page types available in Port:
Available endpoints
The Swagger API documentation still matches the beta version of the Pages API. The API reference pages in these docs describe the new, improved Pages API.
The pages endpoints allow you to:
- Create, update, delete, and get pages.
- Create, update, and delete widgets.
- Update and get page permissions.