Selection envoirment by id

we would need to create an automatic release flow via pipeline we would like to do promote and environment selection via Id. is there an api method that allows to get id ?

we would like to use ids instead of manually set labels

Alternatively, does the primary envoirment have a fixed callable label?

Hello @daniel.aquino

The ID of the environment is the manually set label, you can list all of the information available of an environment right here: https://www.datocms.com/docs/content-management-api/resources/environment/instances

And then you can promote it through https://www.datocms.com/docs/content-management-api/resources/environment/promote

1 Like