cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Cloud Foundry STARTand STOP API

gopinathsk
Explorer

Hi,

I need an API of SAP Cloud Foundry account where I can start and stop the deployed app from my WEB-IDE itself. I knew we can do it manually in the account and I can find only the CLI commands for all the functionalities of Cloud Foundry.

But I need an simple API where I can call it from WEB-IDE. If any please help with that.

Thanks in advance 🙂

Hoping for the answer......

Regards,

Gopi

gregorw
Active Contributor
0 Kudos

Can you explain your usecase?

gopinathsk
Explorer
0 Kudos

I have deployed an CF app which is node.js script linked with the SAP IOT service for posting the data and keeping the IOT device online. Now my usecase is to control this IOT device to make it offline or online based on my requirement which inturn by starting and stopping the CF app. An API where I can start and stop the CF app directly from my UI5 app is my requirement.

Thanks.

View Entire Topic
jhodel18
Active Contributor

Hi Gopinath,

If you have a CF app deployed, then it is deployed in CF itself and not in WebIDE. WebIDE is just a development tool and you don't deploy anything in WebIDE, but in Cloud Foundry instead.

In Cloud Foundry, there are already CF CLI commands that you can use -- executed the command cf --help

> cf --help
cf version 6.45.0+5f9ff16f9.2019-06-03, Cloud Foundry command line tool
Usage: cf [global options] command [arguments...] [command options]


Before getting started:
  config    login,l      target,t
  help,h    logout,lo    


Application lifecycle:
  apps,a        run-task,rt    events
  push,p        logs           set-env,se
  start,st      ssh            create-app-manifest
  stop,sp       app            delete,d
  restart,rs    env,e          
  restage,rg    scale         

As you can see there are the start and stop commands that you can use. Make sure, you have CF CLI installed in your local machine. This is not something you can do in WebIDE.

gopinathsk
Explorer
0 Kudos

Hi Jhodel,

Thanks for your answer. I got your point and I can understand there are CF CLI commands to do all the functionalities. But my requirement is to start and stop the CF deployed app from the WEB-ide code. That's where the API is required.

Hoping for the answer.

Thanks.

jhodel18
Active Contributor
0 Kudos

Hi Gopinath, thanks for clarifying your requirement, however, mentioning

CF deployed app from the WEB-ide code.

only adds further confusion. Maybe having a diagram will help?

My best guess is that you just need some kind of application that controls the state of your CF deployed app to turn on and off based on some conditions.