CostExplorer

Overview

SCP에서 제공하는 CostExplorer 서비스를 프로그램적으로 이용할 수 있도록 지원하는 응용 프로그램 인터페이스(Application Programming Interface, API)를 제공합니다.

본 가이드는 CostExplorer 서비스에 대한 간략한 설명 및 API를 호출하는 방법을 제공합니다. API는 RESTful API 방식으로 제공되며, JSON 형식으로 응답합니다.

Version

VersionStatusSupported Until
1.0CURRENT-

OpenAPI URL

https://costexplorer.{environment}.samsungsdscloud.com

Environment and Region List

environmentregion
skr-west1
skr-east1
gkr-south1
gkr-south2
gkr-south3
ekr-west1
ekr-east1

1 - APIs

1.1 - GetPaymentMonthly

1.1.1 - 1.0

get /v1/payments/monthly

Description

Get payment monthly data.

상태 ACTIVE (CURRENT)

버전최소 지원 보장일
1.0-

Parameters

TypeNameDescriptionSchemaDefault
querysize
optional
Size
Example : 10
any of [integer, null]20
querypage
optional
Page
Example : 1
any of [integer, null]1

Responses

HTTP CodeDescriptionSchema
200OKOrgPaymentMonthlyResponse
400Bad RequestNone
403ForbiddenNone
404Not FoundNone

Example HTTP request

Request path

/v1/payments/monthly

Request header

"Scp-Accesskey = 2sd2gg=2agbdSD26svcD",
"Scp-Signature = fsfsdf235f9U35sdgf35Xsf/qgsdgsdg326=sfsdr23rsef=",
"Scp-Timestamp = 1605290625682",
"Scp-ClientType = Openapi",
"Accept-Language = ko-KR",
"Scp-Api-Version = costexplorer 1.0"

Example HTTP response

Response 200

{
    "count": 20,
    "size": 10,
    "page": 1,
    "payments": [
        {
            "payer_account_id": "228cb9e4a7934f84853594c7f26f7a21",
            "payer_account_name": "test-account",
            "payer_account_type": "MEMBER",
            "bill_year_month": "2024-08",
            "used_year_month": "2024-08",
            "payment_date": "2024-08-01",
            "bill_currency": "KRW",
            "payment_currency": "KRW",
            "payment_state": "PAID",
            "bill_amount": {
                "krw": "0.000",
                "usd": "0.00"
            },
            "used_amount": {
                "krw": "0.000",
                "usd": "0.00"
            },
            "unpaid_amount": {
                "krw": "0.000",
                "usd": "0.00"
            },
            "paid_amount": {
                "krw": "0.000",
                "usd": "0.00"
            },
            "accumulated_unpaid_amount": {
                "krw": "0.000",
                "usd": "0.00"
            },
            "suspended_year_month": "2024-08"
        }
    ]
}

1.2 - ListBills

1.2.1 - 1.0

get /v1/bills

Description

Get bill list.

상태 ACTIVE (CURRENT)

버전최소 지원 보장일
1.0-

Parameters

TypeNameDescriptionSchemaDefault
querystart_year_month
optional
Start year-month (YYYY-mm)
Example : 2024-08
any of [string, null]None
queryend_year_month
optional
End year-month (YYYY-mm)
Example : 2024-08
any of [string, null]None
querywith_count
optional
with count
Example : true
any of [string, null]None
querylimit
optional
limit
Example : 20
any of [integer, null]None
querymarker
optional
marker
Example : 607e0938521643b5b4b266f343fae693
any of [string, null]None
querysort
optional
sort
Example : created_at:desc
any of [string, null]None
queryaccount_id
optional
Account Id
Example : 228cb9e4a7934f84853594c7f26f7a21
any of [string, array[string], null]None
queryservice_category
optional
Service Category
Example : COMPUTE
any of [string, array[string], null]None
querybilling_item_id
optional
Billing Item Id
Example : VIRTUAL_SERVER
any of [string, array[string], null]None
queryresource_name
optional
Resource Name
Example : test-vm
any of [string, null]None
queryregion
optional
Region
Example : kr-west1
any of [string, array[string], null]None
querycontract_id
optional
Contract Id
Example : C002612775
any of [string, null]None
queryorder_status
optional
CCBS Order Status
Example : 04
any of [string, null]None
querybill_year_month
optional
Bill Date (YYYY-MM)
Example : 2024-07
any of [string, null]None
querybill_state
optional
Billing State
Example : USED
any of [string, null]None

Responses

HTTP CodeDescriptionSchema
200OKBillListResponse
400Bad RequestNone
403ForbiddenNone
404Not FoundNone

Example HTTP request

Request path

/v1/bills

Request header

"Scp-Accesskey = 2sd2gg=2agbdSD26svcD",
"Scp-Signature = fsfsdf235f9U35sdgf35Xsf/qgsdgsdg326=sfsdr23rsef=",
"Scp-Timestamp = 1605290625682",
"Scp-ClientType = Openapi",
"Accept-Language = ko-KR",
"Scp-Api-Version = costexplorer 1.0"

Example HTTP response

Response 200

{
    "count": 20,
    "links": [
        {
            "href": "http://scp.samsungsdscloud.com/v1/notices",
            "rel": "self"
        }
    ],
    "bills": [
        {
            "amounts": {
                "krw": "500.000",
                "usd": "0.000"
            },
            "discount_amounts": {
                "krw": "500.000",
                "usd": "0.000"
            },
            "asset": {
                "krw": "500.000",
                "usd": "0.000"
            },
            "operation": {
                "krw": "500.000",
                "usd": "0.000"
            },
            "option": {
                "krw": "500.000",
                "usd": "0.000"
            },
            "support_plan": {
                "krw": "500.000",
                "usd": "0.000"
            },
            "cancellation_fee": {
                "krw": "500.000",
                "usd": "0.000"
            },
            "planned_compute": {
                "krw": "500.000",
                "usd": "0.000"
            },
            "msp_discount": {
                "krw": "500.000",
                "usd": "0.000"
            },
            "new_business_discount": {
                "krw": "500.000",
                "usd": "0.000"
            },
            "sales_discount": {
                "krw": "500.000",
                "usd": "0.000"
            },
            "sla_discount": {
                "krw": "500.000",
                "usd": "0.000"
            },
            "reseller_discount": {
                "krw": "500.000",
                "usd": "0.000"
            },
            "account_cost_savings": {
                "krw": "500.000",
                "usd": "0.000"
            },
            "project_cost_savings": {
                "krw": "500.000",
                "usd": "0.000"
            },
            "account_credit": {
                "krw": "500.000",
                "usd": "0.000"
            },
            "project_credit": {
                "krw": "500.000",
                "usd": "0.000"
            },
            "edp": {
                "krw": "500.000",
                "usd": "0.000"
            },
            "id": "5f3688a192094ddeb0c94166a3e88935",
            "account_id": "228cb9e4a7934f84853594c7f26f7a21",
            "service_category": "COMPUTE",
            "billing_item_id": "VIRTUAL_SERVER",
            "resource_id": "7f6741f3-d9f0-4262-9a5f-627e373567a7",
            "resource_name": "test-vm",
            "region": "kr-west1",
            "contract_id": "C002612775",
            "order_status": "04",
            "bill_year_month": "2024-07",
            "bill_state": "USED"
        }
    ]
}

1.3 - ListUsages

1.3.1 - 1.0

get /v1/usages

Description

Get usage list.

상태 ACTIVE (CURRENT)

버전최소 지원 보장일
1.0-

Parameters

TypeNameDescriptionSchemaDefault
querystart_date
optional
Start date (YYYY-MM-dd)
Example : 2024-08-01
stringNone
queryend_date
optional
End date (YYYY-MM-dd)
Example : 2024-08-01
stringNone
querywith_count
optional
with count
Example : true
any of [string, null]None
querylimit
optional
limit
Example : 20
any of [integer, null]None
querymarker
optional
marker
Example : 607e0938521643b5b4b266f343fae693
any of [string, null]None
querysort
optional
sort
Example : created_at:desc
any of [string, null]None
queryaccount_id
optional
Account Id
Example : 228cb9e4a7934f84853594c7f26f7a21
any of [string, array[string], null]None
queryservice_category
optional
Service Category
Example : COMPUTE
any of [string, array[string], null]None
querybilling_item_id
optional
Billing Item Id
Example : VIRTUAL_SERVER
any of [string, array[string], null]None
queryresource_name
optional
Resource Name
Example : test-vm
any of [string, null]None
queryregion
optional
Region
Example : kr-west1
any of [string, array[string], null]None
querycontract_id
optional
Contract Id
Example : C002612775
any of [string, null]None
queryorder_status
optional
CCBS Order Status
Example : 04
any of [string, array[string], null]None

Responses

HTTP CodeDescriptionSchema
200OKUsageListResponse
400Bad RequestNone
403ForbiddenNone
404Not FoundNone

Example HTTP request

Request path

/v1/usages

Request header

"Scp-Accesskey = 2sd2gg=2agbdSD26svcD",
"Scp-Signature = fsfsdf235f9U35sdgf35Xsf/qgsdgsdg326=sfsdr23rsef=",
"Scp-Timestamp = 1605290625682",
"Scp-ClientType = Openapi",
"Accept-Language = ko-KR",
"Scp-Api-Version = costexplorer 1.0"

Example HTTP response

Response 200

{
    "timezone": "Asia/Seoul",
    "count": 20,
    "links": [
        {
            "href": "http://scp.samsungsdscloud.com/v1/notices",
            "rel": "self"
        }
    ],
    "usages": [
        {
            "id": "5f3688a192094ddeb0c94166a3e88935",
            "account_id": "228cb9e4a7934f84853594c7f26f7a21",
            "service_category": "COMPUTE",
            "billing_item_id": "VIRTUAL_SERVER",
            "ccbs_product_code": "PD00013862",
            "resource_id": "7f6741f3-d9f0-4262-9a5f-627e373567a7",
            "contract_id": "C002612775",
            "order_status": "04",
            "usage_date": "2024-08-01T00:00:00",
            "amounts": {
                "krw": "500.0000000000",
                "usd": "0.0"
            },
            "status_code": "0"
        }
    ]
}

2 - Models

2.1 - Amount

NameDescriptionSchemaDefault
krw
optional
KRW amount
Example : 0.000
string0.000
usd
optional
USD amount
Example : 0.00
string0.00

2.2 - BillListResponse

NameDescriptionSchemaDefault
count
optional
전체 개수
Example : 20
any of [integer, null]
links
optional
links
Example : [{'href': 'http://scp.samsungsdscloud.com/v1/notices', 'rel': 'self'}]
any of [array[object], null]
bills
required

array[BillResponse]

2.3 - BillResponse

NameDescriptionSchemaDefault
amounts
optional
Total Amounts
Example : {'krw': '500.000', 'usd': '0.000'}
Amount
discount_amounts
optional
Total Discount Amounts
Example : {'krw': '500.000', 'usd': '0.000'}
any of [Amount, null]
asset
optional
Asset amount
Example : {'krw': '500.000', 'usd': '0.000'}
any of [Amount, null]
operation
optional
Operation amount
Example : {'krw': '500.000', 'usd': '0.000'}
any of [Amount, null]
option
optional
Option amount
Example : {'krw': '500.000', 'usd': '0.000'}
any of [Amount, null]
support_plan
optional
Support Plan
Example : {'krw': '500.000', 'usd': '0.000'}
any of [Amount, null]
cancellation_fee
optional
해지 수수료
Example : {'krw': '500.000', 'usd': '0.000'}
any of [Amount, null]
planned_compute
optional
Planned Compute
Example : {'krw': '500.000', 'usd': '0.000'}
any of [Amount, null]
msp_discount
optional
MSP 할인
Example : {'krw': '500.000', 'usd': '0.000'}
any of [Amount, null]
new_business_discount
optional
신규 사업 할인
Example : {'krw': '500.000', 'usd': '0.000'}
any of [Amount, null]
sales_discount
optional
영업(기타) 할인
Example : {'krw': '500.000', 'usd': '0.000'}
any of [Amount, null]
sla_discount
optional
SLA
Example : {'krw': '500.000', 'usd': '0.000'}
any of [Amount, null]
reseller_discount
optional
리셀러 할인
Example : {'krw': '500.000', 'usd': '0.000'}
any of [Amount, null]
account_cost_savings
optional
Account Cost Savings
Example : {'krw': '500.000', 'usd': '0.000'}
any of [Amount, null]
project_cost_savings
optional
Project Cost Savings
Example : {'krw': '500.000', 'usd': '0.000'}
any of [Amount, null]
account_credit
optional
Account Credit
Example : {'krw': '500.000', 'usd': '0.000'}
any of [Amount, null]
project_credit
optional
Project Credit
Example : {'krw': '500.000', 'usd': '0.000'}
any of [Amount, null]
edp
optional
EDP
Example : {'krw': '500.000', 'usd': '0.000'}
any of [Amount, null]
id
optional
Bill Id
Example : 5f3688a192094ddeb0c94166a3e88935
any of [string, null]
account_id
optional
Account Id
Example : 228cb9e4a7934f84853594c7f26f7a21
any of [string, null]
service_category
optional
Service Category
Example : COMPUTE
any of [string, null]
billing_item_id
optional
Billing Item Id
Example : VIRTUAL_SERVER
any of [string, array[string], null]
resource_id
optional
Resource Id
Example : 7f6741f3-d9f0-4262-9a5f-627e373567a7
any of [string, null]
resource_name
optional
Resource Name
Example : test-vm
any of [string, null]
region
optional
Region
Example : kr-west1
any of [string, null]
contract_id
optional
Contract Id
Example : C002612775
any of [string, null]
order_status
optional
CCBS Order Status
Example : 04
any of [string, null]
bill_year_month
required
Bill year Month
Example : 2024-07
string
bill_state
optional
Billing State
Example : USED
any of [string, null]

2.4 - OrgPaymentMonthlyResponse

NameDescriptionSchemaDefault
count
required
Count
Example : 20
integer
size
required
Size
Example : 10
integer
page
required
Page
Example : 1
integer
payments
optional

array[PaymentMonthlyFlatDataDto]

2.5 - PaymentMonthlyFlatDataDto

NameDescriptionSchemaDefault
payer_account_id
optional
Payer Account Id
Example : 228cb9e4a7934f84853594c7f26f7a21
string
payer_account_name
optional
Payer Account Name
Example : test-account
string
payer_account_type
optional
Payer Account Type
Example : MEMBER
string
bill_year_month
optional
Bill year Month
Example : 2024-08
string
used_year_month
optional
Year-Month (YYYY-mm)
Example : 2024-08
string
payment_date
optional
Payment date
Example : 2024-08-01
any of [string, null]
bill_currency
optional
Currency
Example : KRW
any of [string, null]krw
payment_currency
optional
Currency
Example : KRW
any of [string, null]krw
payment_state
optional
Billing State
Example : PAID
any of [string, null]
bill_amount
optional

any of [Amount, null]
used_amount
optional

any of [Amount, null]
unpaid_amount
optional

any of [Amount, null]
paid_amount
optional

any of [Amount, null]
accumulated_unpaid_amount
optional

any of [Amount, null]
suspended_year_month
optional
Year-Month (YYYY-mm)
Example : 2024-08
any of [string, null]

2.6 - UsageListResponse

NameDescriptionSchemaDefault
timezone
optional
Timezone
Example : Asia/Seoul
stringAsia/Seoul
count
optional
전체 개수
Example : 20
any of [integer, null]
links
optional
links
Example : [{'href': 'http://scp.samsungsdscloud.com/v1/notices', 'rel': 'self'}]
any of [array[object], null]
usages
required

array[UsageResponse]

2.7 - UsageResponse

NameDescriptionSchemaDefault
id
optional
Usages Id
Example : 5f3688a192094ddeb0c94166a3e88935
string
account_id
optional
Account Id
Example : 228cb9e4a7934f84853594c7f26f7a21
string
service_category
optional
Service Category
Example : COMPUTE
string
billing_item_id
optional
Billing Item Id
Example : VIRTUAL_SERVER
string
ccbs_product_code
optional
CCBS Product Code
Example : PD00013862
string
resource_id
optional
Resource Id
Example : 7f6741f3-d9f0-4262-9a5f-627e373567a7
string
contract_id
optional
Contract Id
Example : C002612775
string
order_status
optional
CCBS Order Status
Example : 04
any of [string, array[string], null]
usage_date
optional
Usage date
Example : 2024-08-01T00:00:00
any of [string (date-time), null]
amounts
optional
Amount
Example : {'krw': '500.0000000000', 'usd': '0.0'}
any of [Amount, null]
status_code
optional
Usage status code
Example : 0
any of [integer, null]