getContractUsageListByDaily
- Print
- PDF
getContractUsageListByDaily
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Available in Classic and VPC
View daily service usage based on the set period.
Request
The following describes the request format for the endpoint. The request format is as follows:
Method | URI |
---|---|
GET, POST | /cost/getContractUsageListByDaily |
Request headers
For headers common to all Cost and usage APIs, see Cost and usage common headers.
Request query parameters
The following describes the parameters.
Field | Type | Required | Description |
---|---|---|---|
pageNo | Integer | Optional | Page number |
pageSize | Integer | Optional | Page size
|
isOrganization | Boolean | Optional | Whether to view consolidated usage for organization service accountsisOrganization and isPartner are true |
isPartner | Boolean | Optional | Whether to view partner accounts
|
memberNoList | List<String> | Optional | Member ID list
|
contractNo | String | Optional | Contract number |
useStartDay | String | Required | Query start date (yyyyMMdd)
|
useEndDay | String | Required | Query end date (yyyyMMdd)
|
contractTypeCode | String | Optional | Contract type code |
productItemKindCode | String | Optional | Service item type code |
regionCode | String | Optional | Region code
|
responseFormatType | String | Optional | Response result format
|
Request example
The following is a sample request.
curl --location --request GET 'https://billingapi.apigw.ntruss.com/billing/v1/cost/getContractUsageListByDaily?useStartDay=20240101&useEndDay=20240131&responseFormatType=json' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Sub Account Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}'
Response
The following describes the response format.
Response body
See ContractUsageListByDaily for the response body.
Response status codes
For response status codes common to NAVER Cloud Platform, see Ncloud API response status codes.
Response example
The following is a sample response.
{
"getContractUsageListByDailyResponse": {
"totalRows": 47,
"contractUsageListByDaily": [
{
"account": {
"memberNo": "2760000"
},
"useDate": {
"useStartDate": "2024-01-09T00:00:00+0900",
"useEndDate": "2024-01-09T23:59:59+0900"
},
"contract": {
"contractNo": "15430000",
"conjunctionContractNo": "",
"contractType": {
"code": "SVR",
"codeName": "Server"
},
"contractStatus": {
"code": "NLEND",
"codeName": "Normal termination"
},
"contractStartDate": "2024-01-09T11:40:50+0900",
"contractEndDate": "2024-01-24T11:35:45+0900",
"instanceName": "s18cec180a45",
"regionCode": "KR",
"platformType": {}
},
"contractProduct": {
"contractProductSequence": "1",
"beforeContractProductSequence": "",
"productCode": "SPSVRSSD00000003",
"priceNo": "327",
"promiseNo": "",
"instanceNo": "22010000",
"productItemKind": {
"code": "SVR",
"codeName": "Server"
},
"productRatingType": {
"code": "SVR",
"codeName": "Server Usage"
},
"serviceStatus": {
"code": "END",
"codeName": "Termination"
},
"serviceStartDate": "2024-01-09T11:40:50+0900",
"serviceEndDate": "2024-01-24T11:35:45+0900",
"productSize": 0,
"productCount": 0
},
"usage": {
"meteringType": {
"code": "SVR",
"codeName": "Server Usage"
},
"usageQuantity": 44124,
"unit": {
"code": "USAGE_SEC",
"codeName": "Usage time (per second)"
},
"userUsageQuantity": 12.256667,
"userUnit": {
"code": "HOUR",
"codeName": "Hour(s)"
}
}
},
// (Omitted)
],
"requestId": "000000a0-a570-46ad-a8f9-bdc25c000000",
"returnCode": "0",
"returnMessage": "success"
}
}
Was this article helpful?