How to register Automation in developer workspace automatically

Hi everybody,
I have programmed a Smartapp and it works fine, I have registered it with this manual (point 3):
(Weather color light tutorial URL, step3: register an automation)

But this is a manual action. Is there a way to do this throught a script or programming?

Thanks.

Can you describe what behavior you asking for?

Sure, thanks for your interest.

In the weather app tutorial

Step 3. Register Automation in Developer Workspace

Step3 is the only step the user needs to do by hand.
I want to avoid this step for the user, doing this registration through the API or something similar.

Is it possible? I thought It was possible to do this with
the createapp post method
But all i can get its a ā€œunauthorizedā€ message in the weather example Smartapp

PD: im not sure why, but i cannot post anything with a URL into it. I was linking the Smartthings Smartapp tutorial and the Smartthings API REST page

You only need to register the automation in the workspace one time. After that, you are self published.

You will not be able to register the same app multiple times in the developer workspace

Yeah, i know that the app can be only registered once

But there’s no way to do this registration without human intervention?

@jody.albritton - this is basically what I was asking earlier tonight.

I would think you could call the createApp endpoint (https://smartthings.developer.samsung.com/docs/api-ref/st-api.html#operation/createApp) and be able to register the app via API without needing to manually click around in the workspace. I have done this with an app successfully, but it does not show up in the workspace or in the mobile app as an eligible SmartApp to add. You mentioned the app still needs an entry added into the app catalog - is there an API way to do that as well?

After other discussions with @jody.albritton, it sounds like there’s one more missing piece here to make this fully work. Eagerly looking forward to seeing it!

I had a play with the Developer Workspace a few months ago. After an interaction with developer support I had the light bulb moment.

The Developer Workspace is really just intended as a convenient way for developers to assemble information about their projects and push it into ā€˜the API’ (for want of a better term).

It is doing the same thing that could alternatively be done using the CLI or calling the REST API directly.

You shouldn’t expect an app created using the CLI to magically appear in the DevWS, anymore than you’d expect an app created in the DevWS to magically appear as config files in a folder where you use the CLI.

It might be reasonable to expect the DevWS to be able to import information from the API in future, and reverse assemble a project, just as you can manually import information from the API using the CLI and work with that.

It may be that the DevWS can currently do something the documented API doesn’t. However that would be something not yet available from the CLI and REST API eather than anything fundamental to the DevWS.

1 Like

Just wonder if there is any updated on this? The api call return that the app is created and confirmed just seem OK. But still cannot see it in SmartApp list on SmartThings native app.