Auto-scaling

Live

Auto-scaling

+ Day(s) remaining in the trial

Overview

Use the IBM Auto-Scaling for Bluemix service to automatically increase or decrease the compute capacity of your application. The number of application instances are adjusted dynamically based on the Auto-Scaling policy that you define. The Auto-Scaling public REST API provide the ability to manage scaling policy and retrieve the Auto-Scaling history and metric data history. You can obtain the host of Auto-scaling API server by checking the VCAP_SERVICE environment variable after binding your app with the Auto-scaling service. On the credential window of the Auto-scaling service, and the "api_url" value is the URL of API server that your app is bound to. The you can use this URL to request Auto-scaling Public REST API service.

Security

Keys

Pick a key to use with this API. Make sure you are logged in with your IBM id for your keys to be populated in the dropdown below. By selecting a key, it will be pre-filled for each endpoint in the Documentation section that can be used with the built-in testing. If you want to change which key to use for a particular endpoint, you can do so at the endpoint in the Documentation section.
You can manage your API keys in the <MyAPIs> section. API keys authenticate you to your subscription, so make sure to keep them secret. Do not share the X-IBM-Client-Secret portion of any API key in publicly accessible places such as GitHub, or client-side code.



Manage your keys
 

Documentation

Auto-scaling:

Data

Returns scaling history data
Returns a map of timestamp and an array of scaling history data

GET   /apps/{app_id}/scalinghistory

			https://v1/autoscaler/apps/{app_id}/scalinghistory
		
Keys
Path and Query parameters

app_id

URL , required

ID of application that assocated with this operation

endTime

INTEGER , required

timestamp in millisecond of end time that to narrow down the scaling history data

startTime

INTEGER , required

timestamp in millisecond of start time that to narrow down the scaling history data

Request code
								
HttpResponse<String> response = Unirest.get("https://v1/autoscaler/apps/{app_id_string}/scalinghistory?endTime=0&startTime=0") .header("accept", "application/json") .asString();
Response model

200

successful operation and scaling history returned

Body

data [HistoryItem]

ARRAY , optional

scaling history data

timestamp

INTEGER , optional

timestamp of last scaling history data if returned size of history exceed settings, or 0 if all history is returned

appId

STRING , optional

application ID of this history data

status

STRING , optional

status of scaling action

instanceBefore

INTEGER , optional

number of instance before this scaling action

instancesAfter

INTEGER , optional

number of instance after this scaling action

startTime

INTEGER , optional

timestamp in millisecond of start time that this scaling action take place

endTime

INTEGER , optional

timestamp in millisecond of end time that this scaling action take place

trigger [trigger]

OBJECT , optional

trigger that leads to this scaling action

metrics

STRING , optional

metric type that triggered this scaling action

threshold

INTEGER , optional

threshold that triggered this scaling action

thresholdType

STRING , optional

threshold type that triggered this scaling action

breachDuration

INTEGER , optional

breach period for this trigger event

triggerType

STRING , optional

trigger type that triggered this scaling action

errorCode

STRING , optional

error code for failed scaling action

400

Invalid parameters provided

Body

error

STRING , optional

401

Unauthorized for this operation

Body

object , optional

Information about why user is unauthorized for this operation

404

Can not find the application by app_id, or no policy has been not found that has been assocated with this application

Body

error

STRING , optional

Response example

200

successful operation and scaling history returned

								{
  "data " : [{
    "appId " : string,
    "status " : [READY, REALIZING, COMPLETED, FAILED],
    "instanceBefore " : integer,
    "instancesAfter " : integer,
    "startTime " : integer,
    "endTime " : integer,
    "trigger " : {
    "metrics " : [JVMHeapUsage, Memory, Throughput, ResponseTime, HeapUsage, HeapMemory],
    "threshold " : integer,
    "thresholdType " : [upper, lower],
    "breachDuration " : integer,
    "triggerType " : [PolicyChange, MonitorEvent],
    "errorCode " : string
  }
  }],
  "timestamp " : integer
}
							

400

Invalid parameters provided

								{
  "error " : string
}
							

401

Unauthorized for this operation

								{
  "" : object
}
							

404

Can not find the application by app_id, or no policy has been not found that has been assocated with this application

								{
  "error " : string
}
							

Loading content...