getContractUsageList
    • PDF

    getContractUsageList

    • PDF

    Article summary

    Available in Classic and VPC

    Search a list of instances of contract usage.

    Request

    The following describes the request format for the endpoint. The request format is as follows:

    MethodURI
    GET/cost/getContractUsageList

    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
    startMonthStringRequiredQuery start month (yyyyMM)
    • Up to 3 months viewable
    • <E.g.> 202401
    endMonthStringRequiredQuery end month (yyyyMM)
    • Up to 3 months viewable
    • <E.g.> 202406
    contractTypeCodeStringOptionalContract type code
    contractStatusCodeStringOptionalContract status code
    • ALL (default) | NOML | NLEND
      • ALL: all
      • NOML: normal
      • NLEND: ended
    regionCodeStringOptionalRegion code
    responseFormatTypeStringOptionalResponse result format
    • xml (default) | json

    Request example

    The following is a sample request.

    curl --location 'https://billingapi.apigw.ntruss.com/billing/v1/cost/getContractUsageList?startMonth=202402&endMonth=202404'
    --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 ContractList 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.

    <?xml version="1.0" encoding="UTF-8"?>
    <getContractUsageListResponse>
        <requestId>e05dd3ef-****-****-****-bb973f080144</requestId>
        <returnCode>0</returnCode>
        <returnMessage>success</returnMessage>
        <totalRows>1</totalRows>
        <contractList>
            <contract>
                <memberNo>******</memberNo>
                <contractNo>9294191</contractNo>
                <conjunctionContractNo></conjunctionContractNo>
                <contractType>
                    <code>VSVR</code>
                    <codeName>Server (VPC)</codeName>
                </contractType>
                <contractStatus>
                    <code>NOML</code>
                    <codeName>Normal</codeName>
                </contractStatus>
                <contractStartDate>2022-05-17T14:57:54+0900</contractStartDate>
                <contractEndDate>2999-12-31T23:59:59+0900</contractEndDate>
                <instanceName>nas-linux</instanceName>
                <regionCode>KR</regionCode>
                <platformType>
                    <code>VPC</code>
                    <codeName>VPC</codeName>
                </platformType>
                <contractProductList>
                    <contractProduct>
                        <contractProductSequence>1</contractProductSequence>
                        <beforeContractProductSequence></beforeContractProductSequence>
                        <productCode>SVR.VSVR.HICPU.C002.M004.NET.SSD.B050.G002</productCode>
                        <priceNo>10525</priceNo>
                        <promiseNo></promiseNo>
                        <instanceNo>11025677</instanceNo>
                        <productItemKind>
                            <code>VSVR</code>
                            <codeName>Server (VPC)</codeName>
                        </productItemKind>
                        <productRatingType>
                            <code>VSVR</code>
                            <codeName>Server (VPC) Usage</codeName>
                        </productRatingType>
                        <serviceStatus>
                            <code>NOML</code>
                            <codeName>Normal</codeName>
                        </serviceStatus>
                        <serviceStartDate>2022-05-17T14:57:54+0900</serviceStartDate>
                        <serviceEndDate>2999-12-31T23:59:59+0900</serviceEndDate>
                        <productSize>0</productSize>
                        <productCount>0</productCount>
                        <usageList>
                            <usage>
                                <meteringType>
                                    <code>VSVR</code>
                                    <codeName>Server (VPC) Usage</codeName>
                                </meteringType>
                                <useMonth>202404</useMonth>
                                <usageQuantity>864000</usageQuantity>
                                <unit>
                                    <code>USAGE_SEC</code>
                                    <codeName>Usage time (per second)</codeName>
                                </unit>
                                <userUsageQuantity>240</userUsageQuantity>
                                <userUnit>
                                    <code>HOUR</code>
                                    <codeName>Hour(s)</codeName>
                                </userUnit>
                            </usage>
                        </usageList>
                    </contractProduct>
                </contractProductList>
            </contract>
        </contractList>
    </getContractUsageListResponse>
    

    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.