Catalog

/servicecategories

GET Retrieve a list of service categories

{{base_url}}/v1/servicecategories?page[limit]&page[offset]&sort&filter[attribute]&include=

curl --location --request GET "{{base_url}}/v1/servicecategories?page%5Blimit%5D&page%5Boffset%5D&sort&filter%5Battribute%5D&include=" \
--header "Accept: application/vnd.api+json"

HEADERS

Accept

application/vnd.api+json

PARAMS

page[limit]

Limit the amount of results returned

page[offset]

Return this page of the results

sort

Sort results by this attribute

filter[attribute]

Filter results by this attribute

include

Include additional related resources. Possible values: services, adjustments.

POST Add a new service category

{{base_url}}/v1/servicecategories

Example Request:

curl --location --request POST "{{base_url}}/v1/servicecategories" \
--header "Accept: application/vnd.api+json" \
--header "Content-Type: application/json" \
--data "{
\"data\": {
\"type\":\"servicecategory\",
\"attributes\": {
\"name\": \"Test serice category - 216\"
}
}
}"

HEADERS

Accept

application/vnd.api+json

Content-Type

application/json

BODY (raw)

{
"data": {
"type":"servicecategory",
"attributes": {
"name": "Test serice category - 406"
}
}
}

GET Retrieve a service category

{{base_url}}/v1/servicecategories/:servicecategory_id

Test description

Example Request:

curl --location --request GET "{{base_url}}/v1/servicecategories/:servicecategory_id" \
--header "Accept: application/vnd.api+json"

HEADERS

Accept

application/vnd.api+json

PATH VARIABLES

servicecategory_id

{{servicecategory_id}}

PATCH Update a service category

{{base_url}}/v1/servicecategories/:servicecategory_id

Test description

Example Request:

curl --location --request PATCH "{{base_url}}/v1/servicecategories/:servicecategory_id" \
--header "Content-Type: application/json" \
--header "Accept: application/vnd.api+json" \
--data "{
\"data\": {
\"type\":\"servicecategory\",
\"id\": \"{{servicecategory_id}}\",
\"attributes\": {
\"name\": \"Test serice category - 715\"
}
}
}
"

HEADERS

Content-Type

application/json

Accept

application/vnd.api+json

PATH VARIABLES

servicecategory_id

{{servicecategory_id}}

BODY (raw)
{
"data": {
"type":"servicecategory",
"id": "{{servicecategory_id}}",
"attributes": {
"name": "Test serice category - 658"
}
}
}

DEL a service category

{{base_url}}/v1/servicecategories/:servicecategory_id

Example Request:

curl --location --request DELETE "{{base_url}}/v1/servicecategories/:servicecategory_id" \
--header "Accept: application/json"

HEADERS

Accept

application/json

servicecategory_id

{{servicecategory_id}}

BODY (formdata)


/services

GET Retrieve a list of services

{{base_url}}/v1/services?page[limit]&page[offset]&sort&filter[attribute]&include=

curl --location --request GET "{{base_url}}/v1/services?page%5Blimit%5D&page%5Boffset%5D&sort&filter%5Battribute%5D&include=" \
--header "Accept: application/vnd.api+json"

HEADERS

Accept

application/vnd.api+json

PARAMS

page[limit]

Limit the amount of results returned

page[offset]

Return this page of the results

sort

Sort results by this attribute

filter[attribute]

Filter results by this attribute

include

Include additional related resources. Possible values: servicecategory, rates, adjustments, 'dset'.

POST Add a new service

{{base_url}}/v1/services

Example Request:

curl --location --request POST "{{base_url}}/v1/services" \
--header "Content-Type: application/json" \
--header "Accept: application/vnd.api+json" \
--data "{
\"data\": {
\"type\": \"service\",
\"attributes\": {
\"key\": \"test - 118\",
\"description\": \"test service\",
\"unit_label\": \"hours\",
\"dset\": \"{{dset_id}}\",
\"type\": \"service_name_in_header\",
\"usage_col\": \"unique_key\",
\"consumption_col\": \"quantity\",
\"instance_col\": \"hostname\",
\"interval\": \"individually\",
\"charge_type\": \"manual\",
\"cogs_type\": \"none\",
\"proration_type\": \"full\",
\"charge_model\": \"peak\"
},
\"relationships\": {
\"servicecategory\": {
\"data\": {
\"type\": \"servicecategory\",
\"id\": \"{{servicecategory_id}}\"
}
}
}
}
}"

HEADERS

Content-Type

application/json

Accept

application/vnd.api+json

BODY (raw)

{
"data": {
"type": "service",
"attributes": {
"key": "test - 763",
"description": "test service",
"unit_label": "hours",
"dset": "{{dset_id}}",
"type": "service_name_in_header",
"usage_col": "unique_key",
"consumption_col": "quantity",
"instance_col": "hostname",
"interval": "individually",
"charge_type": "manual",
"cogs_type": "none",
"proration_type": "full",
"charge_model": "peak"
},
"relationships": {
"servicecategory": {
"data": {
"type": "servicecategory",
"id": "{{servicecategory_id}}"
}
}
}
}
}

GET Retrieve a service

{{base_url}}/v1/services/:service_id?include
          

curl --location --request GET "{{base_url}}/v1/services/:service_id?include" \
--header "Accept: application/vnd.api+json"

HEADERS

Accept

application/vnd.api+json

PARAMS

include

Include additional related resources. Possible values: servicecategory, rates or adjustments.

PATH VARIABLES

service_id

{{service_id}}

PATCH Update a service

{{base_url}}/v1/services/:service_id

Example Request:

curl --location --request PATCH "{{base_url}}/v1/services/:service_id" \
--header "Content-Type: application/json" \
--header "Accept: application/vnd.api+json" \
--data "{
\"data\": {
\"type\": \"service\",
\"id\": \"{{service_id}}\",
\"attributes\": {
\"key\": \"key - 985\",
\"description\": \"modified test service\",
\"unit_label\": \"hours\",
\"dset\": \"{{dset_id}}\",
\"type\": \"service_name_in_header\",
\"usage_col\": \"unique_key\",
\"consumption_col\": \"quantity\",
\"instance_col\": \"hostname\",
\"interval\": \"individually\",
\"charge_type\": \"manual\",
\"cogs_type\": \"none\",
\"proration_type\": \"full\",
\"charge_model\": \"average\"
}
}
}"

HEADERS

Content-Type

application/json

Accept

application/vnd.api+json

BODY (raw)
{
"data": {
"type": "service",
"id": "{{service_id}}",
"attributes": {
"key": "key - 5",
"description": "modified test service",
"unit_label": "hours",
"dset": "{{dset_id}}",
"type": "service_name_in_header",
"usage_col": "unique_key",
"consumption_col": "quantity",
"instance_col": "hostname",
"interval": "individually",
"charge_type": "manual",
"cogs_type": "none",
"proration_type": "full",
"charge_model": "average"
}
}
}

PATCH Prepare affected reports

{{base_url}}/v1/services/:service_id/prepareAffectedReports

Example Request:

curl --location --request PATCH "{{base_url}}/v1/services/:service_id/prepareAffectedReports" \
--header "Accept: application/json" \
--data ""

HEADERS

Accept

application/json

PATH VARIABLES

service_id

{{service_id}}

DEL Delete a service

{{base_url}}/v1/services/:service_id

Example Request:

curl --location --request DELETE "{{base_url}}/v1/services/:service_id" \
--header "Accept: application/json"

HEADERS

Accept

application/json

PATH VARIABLES

service_id

{{service_id}}

BODY (formdata)


/rates

GET Retrieve a list of rates

{{base_url}}/v1/rates?page[limit]&page[offset]&sort&filter[attribute]&include

curl --location --request GET "{{base_url}}/v1/rates?page%5Blimit%5D&page%5Boffset%5D&sort&filter%5Battribute%5D&include" \
--header "Accept: application/vnd.api+json"

HEADERS

Accept

application/vnd.api+json

PARAMS

page[limit]

Limit the amount of results returned

page[offset]

Return this page of the results

sort

Sort results by this attribute

filter[attribute]

Filter results by this attribute

include

Include additional related resources. Possible values: service, account.

POST Add a new rate

{{base_url}}/v1/rates

Example Request:

curl --location --request POST "{{base_url}}/v1/rates" \
--header "Content-Type: application/json" \
--header "Accept: application/vnd.api+json" \
--data "{
\"data\": {
\"type\": \"rate\",
\"attributes\": {
\"rate\": \"1.0\",
\"rate_col\": \"rate_col\",
\"fixed\": \"2.0\",
\"fixed_col\": \"fixed_col\",
\"cogs_rate\": \"3.0\",
\"cogs_rate_col\": \"cogs_rate_col\",
\"cogs_fixed\": \"4.0\",
\"cogs_fixed_col\": \"cogs_fixed_col\",
\"effective_date\": \"2018-01-01\"
},
\"relationships\": {
\"service\": {
\"data\": {
\"type\": \"service\",
\"id\": \"2\"
}
}
}
}

HEADERS

Content-Type

application/json

Accept

application/vnd.api+json

BODY (raw)

{
"data": {
"type": "rate",
"attributes": {
"rate": "1.0",
"rate_col": "rate_col",
"fixed": "2.0",
"fixed_col": "fixed_col",
"cogs_rate": "3.0",
"cogs_rate_col": "cogs_rate_col",
"cogs_fixed": "4.0",
"cogs_fixed_col": "cogs_fixed_col",
"effective_date": "2018-01-01"
},
"relationships": {
"service": {
"data": {
"type": "service",
"id": "2"
}
}
}
}
}

GET Retrieve a new rate

{{base_url}}/v1/rates/{{rate_id}}?include

Test description

Example Request:

curl --location --request GET "{{base_url}}/v1/rates/{{rate_id}}?include" \
--header "Accept: application/vnd.api+json"

HEADERS

Accept

application/vnd.api+json

PARAMS

include

Include additional related resources. Possible values: service, account.

PATCH Update a rate

{{base_url}}/v1/rates/{{rate_id}}

Example Request:

curl --location --request PATCH "{{base_url}}/v1/rates/{{rate_id}}" \
--header "Content-Type: application/json" \
--header "Accept: application/vnd.api+json" \
--data "{
\"data\": {
\"type\": \"rate\",
\"id\": \"{{rate_id}}\",
\"attributes\": {
\"threshold\": 10,
\"min_commit\": 50,
\"rate\": \"10.0\",
\"rate_col\": \"rate_col2\",
\"fixed\": \"20.0\",
\"fixed_col\": \"fixed_col2\",
\"cogs_rate\": \"30.0\",
\"cogs_rate_col\": \"cogs_rate_col2\",
\"cogs_fixed\": \"40.0\",
\"cogs_fixed_col\": \"cogs_fixed_col2\",
\"effective_date\": \"2017-12-31\"
}
}
}"

HEADERS

Content-Type

application/json

Accept

application/vnd.api+json

BODY (raw)
{
"data": {
"type": "rate",
"id": "{{rate_id}}",
"attributes": {
"threshold": 10,
"min_commit": 50,
"rate": "10.0",
"rate_col": "rate_col2",
"fixed": "20.0",
"fixed_col": "fixed_col2",
"cogs_rate": "30.0",
"cogs_rate_col": "cogs_rate_col2",
"cogs_fixed": "40.0",
"cogs_fixed_col": "cogs_fixed_col2",
"effective_date": "2017-12-31"
}
}
}

PATCH Prepare affected reports

{{base_url}}/v1/rates/{{rate_id}}/prepareAffectedReports

Test description

Example Request:

curl --location --request PATCH "{{base_url}}/v1/rates/{{rate_id}}/prepareAffectedReports" \
--header "Accept: application/json" \
--data ""

HEADERS

Accept

application/json

DEL a rate

{{base_url}}/v1/rates/{{rate_id}}

Example Request:

curl --location --request DELETE "{{base_url}}/v1/rates/{{rate_id}}" \
--header "Accept: application/json"

HEADERS

Accept

application/json

BODY (formdata)


/adjustments

GET Retrieve a list of adjustments

{{base_url}}/v1/adjustments?page[limit]&page[offset]&sort&filter[attribute]&include=

curl --location --request GET "{{base_url}}/v1/adjustments?page%5Blimit%5D&page%5Boffset%5D&sort&filter%5Battribute%5D&include=" \
--header "Accept: application/vnd.api+json"

HEADERS

Accept

application/vnd.api+json

PARAMS

page[limit]

Limit the amount of results returned

page[offset]

Return this page of the results

sort

Sort results by this attribute

filter[attribute]

Filter results by this attribute

include

Include additional related resources. Possible values: account, services, servicecategories.

POST Add a new adjustment

{{base_url}}/v1/adjustments

Example Request:

curl --location --request POST "{{base_url}}/v1/adjustments" \
--header "Content-Type: application/json" \
--header "Accept: application/vnd.api+json" \
--data "{
\"data\": {
\"type\": \"adjustment\",
\"attributes\": {
\"name\": \"test\",
\"amount\": \"-10\",
\"type\": \"relative\",
\"target\": \"charge\",
\"first_interval\": \"2017-01\",
\"last_interval\": \"2017-12\"
},
\"relationships\": {
\"account\": {
\"data\": {
\"type\": \"account\",
\"id\": \"1\"
}
}
}
}
}"

HEADERS

Content-Type

application/json

Accept

application/vnd.api+json

BODY (raw)

{
"data": {
"type": "adjustment",
"attributes": {
"name": "test",
"amount": "-10",
"type": "relative",
"target": "charge",
"first_interval": "2017-01",
"last_interval": "2017-12"
},
"relationships": {
"account": {
"data": {
"type": "account",
"id": "1"
}
}
}
}
}

GET Retrieve an adjustment

{{base_url}}/v1/adjustments/{{adjustment_id}}?include

Test description

Example Request:

curl --location --request GET "{{base_url}}/v1/adjustments/{{adjustment_id}}?include" \
--header "Accept: application/vnd.api+json"

HEADERS

Accept

application/vnd.api+json

PARAMS

include

Include additional related resources

PATCH Update an adjustment

{{base_url}}/v1/adjustments/{{adjustment_id}}

Test description

Example Request:

curl --location --request PATCH "{{base_url}}/v1/adjustments/{{adjustment_id}}" \
--header "Content-Type: application/vnd.api+json" \
--header "Accept: application/vnd.api+json" \
--data "{
\"data\": {
\"type\": \"adjustment\",
\"id\": \"{{adjustment_id}}\",
\"attributes\": {
\"name\": \"modified_test\",
\"amount\": \"-20\",
\"type\": \"absolute\",
\"target\": \"quantity\",
\"first_interval\": \"2018-01\",
\"last_interval\": \"\"
}
}
}"

HEADERS

Content-Type

application/vnd.api+json

Accept

application/vnd.api+json

BODY (raw)
{
"data": {
"type": "adjustment",
"id": "{{adjustment_id}}",
"attributes": {
"name": "modified_test",
"amount": "-20",
"type": "absolute",
"target": "quantity",
"first_interval": "2018-01",
"last_interval": ""
}
}
}
}

DEL an adjustment

{{base_url}}/v1/adjustments/{{adjustment_id}}

Example Request:

curl --location --request DELETE "{{base_url}}/v1/adjustments/{{adjustment_id}}" \
--header "Accept: application/json"

HEADERS

Accept

application/json

BODY (formdata)


How did we do?