The Compose API is evolving and that means there are regular additions to it. In this article, we'll have a look at some of the major new additions and some of the other changes that have taken place over the past few months.
You'll find the following extensions and all the other API calls on the Compose API docs site including full API references.
Compose has a powerful system of access control for database deployments. It lets you create users, teams of users and roles for those users and teams. If you are new to Compose, it's worth knowing you can create extra users on your Compose account and assign them to teams. Then you can give users and teams their own roles; at the higher level as Enterprise Admin, Database Provisioner, Billing Manager or Deployment Admin or at the database level, as an Admin, Manager or Developer. You can read all about this in the documentation on Compose Access Controls and Deployment Access Control.
Through the Compose API, we've offered the ability to create new deployments but there was no way of setting any deployment access controls. That is, up until now. We've added a whole range of new Compose API endpoints to enable all of this capability.
First up, is an extension of the
accounts endpoints which enables getting a list of users, adding users and deleting users to any account. Then there's the all new teams endpoints for listing current teams and creating new teams. Once you have a team, there are more endpoints so you can add users to it, get its details, update those details and, should the need arise, delete the team.
With users and teams created, you can then start applying roles to them. A set of extensions to the
deployments endpoints adds that ability. For any particular deployment, you can view, update and remove user roles and view, update and remove team roles.
Another addition to the Compose API is the new
audit_events endpoint which brings the data behind the Account Activity view from the Compose console's Accounts. This view lists all the activity that has taken place within the console in terms of administration; you can read more about it in the Compose Security documentation.
audit_events endpoint, this data is also available in the API. This new API enhancement is designed for those with automated security and compliance tracking in mind.
You can list audit events, up to a maximum of 100 at a time, and set a time range or page through batches of events. You can also retrieve details of a single event using the event id.
You may have missed...
- We added a display name property to the list of available databases so you can easily show users database names without having to translate them (for example, from
- It's now possible to change the billing code and notes attached to a deployment through a patch deployments call.
- Available addons for a deployment can be discovered through an addons endpoint; that's the first iteration of a richer endpoint in development.
Smaller changes like these are logged in the help announcements section of the Compose API docs site.
If you have any feedback about this or any other Compose article, drop the Compose Articles team a line at firstname.lastname@example.org. We're happy to hear from you.
attribution Alexey Ryban