prismicio / slice-machine

A series of tools for developing and deploying website sections with Prismic
https://prismic.io/docs
Apache License 2.0
284 stars 50 forks source link

Expose SM API for automation #507

Open pentatiby opened 1 year ago

pentatiby commented 1 year ago

Is your feature request related to a problem? Please describe.

Automating parts of the SM workflow (or even an entire workflow) is difficult.

Describe the solution you'd like

It would be very helpful to be able to run SM actions via its local REST API, rather than only via the UI.

It might be even possible to do it right now by using the endpoints here, but having official support for this kind of work would be required for production usage.

Describe alternatives you've considered

  1. manually working with the JSON models and the Prismic API (current choice)
  2. running SM in a headless browser and using the actual UI from automation tools

Both of these approaches have downsides - having the SM API officially exposed for automation would be the most robust approach, as an automated user would only need updates for the API interface.

Additional context

comeprismic commented 8 months ago

Hi, I'm coming back to this issue. Sorry about the long delay. Could you provide more details about your use case? What problem would you solve if you had such ability?

pentatiby commented 8 months ago

The use case back when this was opened was around using SM only via the CI pipeline to deploy/push updates to a production environment, for a more robust/streamlined workflow, especially that, at the time, support for concurrent usage was little and there was a high risk of work loss/overrides.

In general, this enhancement would allow certain actions you can do via the SM UI to be done via its API, which removes the need to directly work with the Prismic API in order to achieve the same result.

comeprismic commented 3 weeks ago

Hi @pentatiby I'm coming back to you super late I'm sorry about that. But note that the team has worked on the topic and we now have a pretty clear vision on what we would like to do on that front, meaning providing workflows for teams of developers to create/delete/update their models without risk of compromising their work. Though, we are currently focused on modeling capabilities and we will come back to this topic in the future.

I hope you understand.

Best,

Côme