MENU
      getContractUsageListByDaily

        getContractUsageListByDaily


        Article summary

        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:

        MethodURI
        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.

        FieldTypeRequiredDescription
        pageNoIntegerOptionalPage number
        pageSizeIntegerOptionalPage size
        • 1000 or less (default: 1000)
        isOrganizationBooleanOptionalWhether to view consolidated usage for organization service accounts
      • Available to masters only
      • An error is returned if both isOrganization and isPartner are true
      • isPartnerBooleanOptionalWhether to view partner accounts
        • Available to partner representatives only
        • An error is returned if both isOrganization and isPartner are true
        memberNoListList<String>OptionalMember ID list
        • Only available to master or partner representatives
        contractNoStringOptionalContract number
        useStartDayStringRequiredQuery start date (yyyyMMdd)
        • Up to 3 months viewable
        • <E.g.> 20240101
        useEndDayStringRequiredQuery end date (yyyyMMdd)
        • Up to 3 months viewable
        • <E.g.> 20240331
        contractTypeCodeStringOptionalContract type code
        productItemKindCodeStringOptionalService item type code
        regionCodeStringOptionalRegion code
        responseFormatTypeStringOptionalResponse result format
        • xml (default) | json

        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}'
        Curl

        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"
            }
        }
        JSON

        Was this article helpful?

        Changing your password will log you out immediately. Use the new password to log back in.
        First name must have atleast 2 characters. Numbers and special characters are not allowed.
        Last name must have atleast 1 characters. Numbers and special characters are not allowed.
        Enter a valid email
        Enter a valid password
        Your profile has been successfully updated.