Attach an Application to the Domain

This method is used to attach an application instance to the Domain.

 POST /api/vendor/v1/domains/{id}/applications/{application_id}.json?api_token={api_token}

Arguments

Name

Parameter Type

Data type

Required/ 
Optional

Description

id

integer

path

Required

A domain ID.

application_idintegerpathRequiredAn application instance ID.
api_tokenquerystringRequiredAPI token of the manager who perform the operation (see API Token Authentication).

Response model

Name

Data type

Description

id

integer

A domain ID.

subscription_id

integerA subscription ID.

origin_id

integerAn ordinal number of the application instance.

origin_type

stringAn internal type of the application instance, which is used as a polymorphic association.

service_status

string

A service status of the application instance:

  • not_provisioned - provisioning of the application instance was not completed;

  • provisioning - an application instance is being provisioned;

  • provisining_failed - an error during the provisioning process;

  • running - an application instance is running;

  • renewing - an application instance is renewing;

  • renewing_failed - an error during the renewing of the application instance;

  • stopped - an application instance was stopped.

application_template_id

integerAn application template ID, on which base the application instance was created.

created_at

dataA date and time of the application instance's creation.

updated_at

dataA date and time, when the application instance was updated last time.

Request example

POST http://billing.activeplatform.com:80/api/vendor/v1/domains/1918/applications/2000362.json?api_token=654321

Response example

 {
  "id": 2000362,
  "subscription_id": 2000423, 
  "origin_id": 158, 
  "origin_type": "Aps::Application", 
  "service_status": "running", 
  "application_template_id": 56, 
  "created_at": "2014-12-29T12:51:57.235+03:00", 
  "updated_at": "2014-12-29T12:51:57.950+03:00" 
}