Documentation

Skip to end of metadata
Go to start of metadata

Cost Codes Resource

Exposed Resources Hierarchy
Cost Codes Resource

Contents:

Use optional cost codes to set pricing for virtual machine images. The pricing estimate will include the image cost when users in enterprises with a pricing model assigned deploy a virtual machine using an image with a cost code. Assign cost codes before creating a pricing model.

Main URI of the Resource

This class operates mainly over the Resource URI: /config/costcodes

Exposed Methods

Create New Cost Code

Method to create a cost code.

Synopsis: POST http://example.com/api/config/costcodes
Roles Required: ROLE_PRICING_MANAGE
Request Headers: Accept: application/vnd.abiquo.costcode+json; version=3.8; application/vnd.abiquo.costcode+xml; version=3.8;  Content-type:  application/vnd.abiquo.costcode+json; version=3.8; application/vnd.abiquo.costcode+xml; version=3.8;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity: CostCode Media Type
Response Message Body Entity: CostCode Media Type
Request Example:

 Click here to show or hide the request example

API example removed: POST_cfg_ccs_CT_cc_j_AC_cc_j
You can download the API examples archive from ABI38Confluence-space-export-152334-314.html.zip

 

 

Get Cost Codes

This method returns the list of cost codes.

Paging Method

This method works with paging. Check out Basic Behaviors for information about how it works

Synopsis: GET http://example.com/api/config/costcodes
Roles Required: ROLE_PRICING_VIEW, ROLE_APPLIB_VM_COST_CODE
Request Headers: Accept: application/vnd.abiquo.costcodes+json; version=3.8; application/vnd.abiquo.costcodes+xml; version=3.8;  Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

startwith

false

0

first element to retrieve

by

false

name

ordering the request.

has

false

 

filter the request. With this parameter the response just contains the elements
which name matches the filter value.

limit

false

25

number of elements to return

asc

false

true

order ascendant or descendant. By default the sort mode is ascending.

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: CostCodes Media Type
Request Example:

 Click here to show or hide the request example

API example removed: GET_cfg_ccs_AC_ccs_j
You can download the API examples archive from ABI38Confluence-space-export-152334-314.html.zip

 

 

Main URI of the Resource

This class operates mainly over the Resource URI: /config/costcodes/{costcode}

Exposed Methods

Get Cost Code

Get information of an existing cost code.

Synopsis: GET http://example.com/api/config/costcodes/{costcode}
Roles Required: ROLE_PRICING_VIEW
Request Headers: Accept: application/vnd.abiquo.costcode+json; version=3.8; application/vnd.abiquo.costcode+xml; version=3.8;  Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: CostCode Media Type
Request Example:

 Click here to show or hide the request example

API example removed: GET_cfg_ccs_X_AC_cc_j
You can download the API examples archive from ABI38Confluence-space-export-152334-314.html.zip

 

Remove an existing Cost Code

Remove an existing cost code.

Synopsis: DELETE http://example.com/api/config/costcodes/{costcode}
Roles Required: ROLE_PRICING_MANAGE
Request Headers: Accept: ; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity:
Request Example:

 Click here to show or hide the request example

API example removed: DELETE_cfg_ccs_X
You can download the API examples archive from ABI38Confluence-space-export-152334-314.html.zip

 

Update Cost Code

Update a cost code.

Synopsis: PUT http://example.com/api/config/costcodes/{costcode}
Roles Required: ROLE_PRICING_MANAGE
Request Headers: Accept: application/vnd.abiquo.costcode+json; version=3.8; application/vnd.abiquo.costcode+xml; version=3.8;  Content-type:  application/vnd.abiquo.costcode+json; version=3.8; application/vnd.abiquo.costcode+xml; version=3.8;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity: CostCode Media Type
Response Message Body Entity: CostCode Media Type
Request Example:

 Click here to show or hide the request example

API example removed: PUT_cfg_ccs_X_CT_cc_j_AC_cc_j
You can download the API examples archive from ABI38Confluence-space-export-152334-314.html.zip