Cost planning

Cost planning

/api/deployment-presets/

Supported actions and methods:

/api/deployment-presets/

Methods: GET

/api/deployment-presets/<uuid>/

Methods: GET

/api/deployment-plans/

Supported actions and methods:

/api/deployment-plans/

Methods: GET, POST

Supported fields for creation:

  • namestring
  • projectlink to /api/projects/<uuid>/
  • itemslist of [{preset: {cores: integer, ram: integer, storage: integer, name: string}, quantity: integer}]
  • certifications – list of [{link: URL, name: string, description: string}]

Example request for creating deployment plan.

POST /api/deployment-plans/
Accept: application/json
Content-Type: application/json
Authorization: Token c84d653b9ec92c6cbac41c706593e66f567a7fa4
Host: example.com

{
    "name": "WebApps",
    "customer": "http://example.com/api/customers/2f8b4e0f101545508d52c7655d6386c8/",
    "items": [
        {
            "preset": "http://example.com/api/deployment-presets/2debb6d109954afaa03910ba1c6791a6/",
            "quantity": 1
        }
    ]
}

Run PUT request against /api/deployment-plans/<uuid>/ to update deployment plan. Only name and list of items can be updated. List of items should have the same format as POST request. Only customer owner and staff can update deployment plan.

/api/deployment-plans/<uuid>/

Methods: GET, PUT, PATCH, DELETE

Supported fields for update:

  • namestring
  • itemslist of [{preset: {cores: integer, ram: integer, storage: integer, name: string}, quantity: integer}]
  • certifications – list of [{link: URL, name: string, description: string}]

Example rendering of deployment plan and configuration.

GET /api/deployment-plans/c218cbb2f56c4d52a82638ca9fffd85a/
Accept: application/json
Content-Type: application/json
Authorization: Token c84d653b9ec92c6cbac41c706593e66f567a7fa4
Host: example.com

{
    "url": "http://example.com/api/deployment-plans/b12bb98a661749ffb02c8a8439299288/",
    "uuid": "b12bb98a661749ffb02c8a8439299288",
    "name": "Webapp for Monster Inc",
    "customer": "http://example.com/api/customers/790b3c131e894581b3dcf66796d9fa30/",
    "items": [
        {
            "preset": {
                "url": "http://example.com/api/deployment-presets/628cd853ba2a4ce7af5d4fff510b5bd2/",
                "uuid": "628cd853ba2a4ce7af5d4fff510b5bd2",
                "name": "MySQL",
                "category": "Databases",
                "variant": "Large",
                "ram": 2048,
                "cores": 2,
                "storage": 1024000
            },
            "quantity": 1
        }
    ]
}

Example request for creating deployment plan.

POST /api/deployment-plans/
Accept: application/json
Content-Type: application/json
Authorization: Token c84d653b9ec92c6cbac41c706593e66f567a7fa4
Host: example.com

{
    "name": "WebApps",
    "customer": "http://example.com/api/customers/2f8b4e0f101545508d52c7655d6386c8/",
    "items": [
        {
            "preset": "http://example.com/api/deployment-presets/2debb6d109954afaa03910ba1c6791a6/",
            "quantity": 1
        }
    ]
}

Run PUT request against /api/deployment-plans/<uuid>/ to update deployment plan. Only name and list of items can be updated. List of items should have the same format as POST request. Only customer owner and staff can update deployment plan.

/api/deployment-plans/<uuid>/evaluate/

Methods: GET