Watson Workspace will no longer be available after February 28, 2019. Learn more.

Developers

How to edit an app once it is created?

Comments

9 comments

  • Official comment
    Avatar
    Luis Benitez (Edited )

    Hi Jan,

     

    You can do a PUT to https://api.watsonwork.ibm.com/v1/apps

     

    e.g. to enable webhooks on an already registered app, you do:

     

    curl -v -H "Content-Type: application/json" -H "Authorization: Bearer $Your_JWT" -X PUT -d '{"webhooks": [{ "id": "webhookid", "name": "listen for messages", "events": ["message-created"], "url": "https://url-to-your-webhook/webhook", "enabled": true }]}' https://api.watsonwork.ibm.com/v1/apps/appid

  • Avatar
    Jan Valdman

    Thanks Luis, so there is no UI yet. No problem, let's try some hacking :-)

  • Avatar
    Luis Benitez

    UI is coming soon. Already in the works

  • Avatar
    Bernd Gewehr

    How to put an icon?

  • Avatar
    Luis Benitez

    @Bernd,

     

    To set the icon of the app, you'll want to authenticate as the app. Look in the doc for the reference to client_credentials when you post to /oauth/token. That will get you the JWT of an app. 

     

    Then use the /photos API with the App JWT to set the icon/photo of the app.

  • Avatar
    Bernd Gewehr

    Don't get that right:

    404 not found when using the app id in the url

    406 not acceptable when not using the app id the url

    What is wrong here?

  • Avatar
    Bernd Gewehr

    I got it.

    Had to add Accept:application/json to the header

    and 

    Had to use file instead of photoFile like the docs say as the parameter name.

    Have fun!

  • Avatar
    Luis Benitez

    :) FYI, we'll have a UI to add this by end of week so you won't have to worry about this in the future! 

  • Avatar
    Miguel Sanchez Valdes

    Hi Luis

    Is there a UI for that yet? I can't find it anywhere.

Please sign in to leave a comment.