Resizing the container memory capacity of an OC application


#1
curl -X POST
     -H "Authorization: Bearer <thy_api_key>" \
     -d '<request_body_json>'
https://www.opscaptain.com/api/instances/resize?appid=<thy_appid>

Request body JSON format

{
     "memorylimit": "INTEGER",
}

Request body parameters explained
memorylimit – The new memory configuration of the container. Possible values include: 128, 256, 512, 1024, 2048 and 4096

Remarks

This endpoint returns an id value which can be used to poll for the completion of this task.

{
     "id": "STRING",
}

You can call the below endpoint and check if the status attribute in the response JSON has the value Completed

curl -X GET
     -H "Authorization: Bearer <thy_api_key>" \
https://www.opscaptain.com/api/octasks/status?id=<insert_id_here>

The above request will respond with either one of the values Completed, In progress or Failed. See below:

{
     "status": "STRING", 
     "task": "STRING", 
     "logs": "STRING"
}