Die Dokumentation steht nur in Englisch zur Verfügung.

Application Scaling API Endpoints

Learn more about how to scale your applications with our API

Get Scaling Events

To list all scaling events that were performed in the past you can simply send a GET request to the following endpoint.

https://api.nodion.com/v1/applications/:id/scaling_events

Required Headers: Authorization

Example Response:

  {
    "scaling_events": [
      {
        "id": "1e2308c7-34a5-4617-b79c-1f1cf0a36f17",
        "status": "finished",
        "trigger_type": "manual",
        "instance_amount_old": 2,
        "instance_amount_new": 1,
        "instance_type_id_old": "c047eab3-7574-44f5-b25a-5ae9b490500c",
        "instance_type_id_new": "c047eab3-7574-44f5-b25a-5ae9b490500c",
        "created_at": "2023-06-02T19:01:23.914+02:00",
        "finished_at": "2023-06-02T19:01:27.308+02:00",
        "worker": null
      },
      {
        "id": "8f8da93f-9dfe-4857-8977-76c32c04f931",
        "status": "finished",
        "trigger_type": "manual",
        "instance_amount_old": 1,
        "instance_amount_new": 2,
        "instance_type_id_old": "c047eab3-7574-44f5-b25a-5ae9b490500c",
        "instance_type_id_new": "c047eab3-7574-44f5-b25a-5ae9b490500c",
        "created_at": "2023-06-02T19:01:05.696+02:00",
        "finished_at": "2023-06-02T19:01:13.599+02:00",
        "worker": null
      }
    ]
  }
  

Create Scaling Events

To create a new scaling event and scale your application you can send a POST request to the following endpoint. Scaling events will trigger the scaling process immediately.

https://api.nodion.com/v1/applications/:id/scaling_events

Required Headers: Authorization

Possible Body Parameters:

instance_amount (required) – Please provide the amount of instances the application should have after scaling. The amount can range from 1 to 16.
instance_type_id (required) – Please provide the desired instance type id. If it should stay the same, provide the id of the current instance type.
worker_id (optional) – If you would like to scale a worker, you can provide its id. This will only scale the desired worker.

Possible Response Codes:

200 – The scaling event was created successfully.
400 – Please check if instance amount and type were provided correctly

Example Response:

  {
    "scaling_event": {
      "id": "1e2308c7-34a5-4617-b79c-1f1cf0a36f17",
      "status": "finished",
      "trigger_type": "manual",
      "instance_amount_old": 2,
      "instance_amount_new": 1,
      "instance_type_id_old": "c047eab3-7574-44f5-b25a-5ae9b490500c",
      "instance_type_id_new": "c047eab3-7574-44f5-b25a-5ae9b490500c",
      "created_at": "2023-06-02T19:01:23.914+02:00",
      "finished_at": "2023-06-02T19:01:27.308+02:00",
      "worker": null
    }
  }
  

Get Scaling Event

If you want to fetch the status of a recently triggered scaling event, simply send a GET request to the following endpoint.

https://api.nodion.com/v1/applications/:id/scaling_events/:scaling_event_id

Required Headers: Authorization

Example Response:

  {
    "scaling_event": {
      "id": "1e2308c7-34a5-4617-b79c-1f1cf0a36f17",
      "status": "finished",
      "trigger_type": "manual",
      "instance_amount_old": 2,
      "instance_amount_new": 1,
      "instance_type_id_old": "c047eab3-7574-44f5-b25a-5ae9b490500c",
      "instance_type_id_new": "c047eab3-7574-44f5-b25a-5ae9b490500c",
      "created_at": "2023-06-02T19:01:23.914+02:00",
      "finished_at": "2023-06-02T19:01:27.308+02:00",
      "worker": null
    }
  }