Jika memutuskan untuk tidak menggunakan library klien, Anda harus memahami dasar-dasar REST.
REST adalah gaya arsitektur software yang memberikan pendekatan yang praktis dan konsisten untuk meminta dan memodifikasi data.
Istilah REST adalah singkatan dari "Representational State Transfer". Dalam konteks Google API, REST merujuk pada penggunaan kata kerja HTTP untuk mengambil dan memodifikasi representasi data yang disimpan oleh Google.
Dalam sistem RESTful, resource disimpan di penyimpanan data; klien mengirim permintaan agar server melakukan tindakan tertentu (seperti membuat, mengambil, memperbarui, atau menghapus resource), dan server melakukan tindakan dan mengirim respons, sering kali dalam bentuk representasi resource yang ditentukan.
Di RESTful API Google, klien menentukan tindakan menggunakan kata kerja HTTP seperti POST, GET, PUT, atau DELETE. Kata kerja ini menentukan resource berdasarkan URI yang unik secara global untuk form berikut:
Karena semua resource API memiliki URI unik yang dapat diakses HTTP, REST memungkinkan caching data dan dioptimalkan untuk berfungsi dengan infrastruktur terdistribusi web.
Anda dapat memperoleh manfaat dari definisi metode dalam dokumentasi standar HTTP 1.1; dokumentasi tersebut menyertakan spesifikasi untuk GET, POST, PUT, dan DELETE.
REST di Cloud Billing API
Operasi Cloud Billing API dipetakan langsung ke kata kerja HTTP REST.
Format spesifik untuk URI Cloud Billing API adalah:
Kumpulan lengkap URI yang digunakan untuk setiap operasi yang didukung dalam API diringkas dalam dokumen referensi Cloud Billing API (REST, RPC).
Mempelajari dasar-dasar JSON
Cloud Billing API menampilkan data dalam format JSON.
JSON (JavaScript Object Notation) adalah format data umum independen bahasa yang memberikan representasi teks sederhana untuk struktur data arbitrer. Untuk informasi selengkapnya, lihat json.org.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-18 UTC."],[[["\u003cp\u003eBefore coding your client application, ensure you've familiarized yourself with the Cloud Billing features in the Google Cloud console.\u003c/p\u003e\n"],["\u003cp\u003eUnderstanding REST basics is essential if you're not using client libraries, as it provides a method for requesting and modifying data via HTTP requests.\u003c/p\u003e\n"],["\u003cp\u003eThe Cloud Billing API operations align with REST HTTP verbs like \u003ccode\u003ePOST\u003c/code\u003e, \u003ccode\u003eGET\u003c/code\u003e, \u003ccode\u003ePUT\u003c/code\u003e, or \u003ccode\u003eDELETE\u003c/code\u003e, with specific URI formats for each operation.\u003c/p\u003e\n"],["\u003cp\u003eThe Cloud Billing API returns data in JSON format, which is a common, language-independent data format for representing arbitrary data structures.\u003c/p\u003e\n"]]],[],null,["# Prerequisites\n\nBefore you can start coding your first client application, there are a few\nthings you need to do, if you haven't done them already.\n1. [Try out the billing features in the Google Cloud console](#familiarize)\n2. [Learn REST basics](#rest)\n3. [Learn JSON basics](#data-json)\n\nTry out the Cloud Billing features in the Google Cloud console\n--------------------------------------------------------------\n\nThis API documentation assumes that you've used Google Cloud, and that you're\nfamiliar with the Cloud Billing features and concepts in the Google Cloud console.\n\nIf you're not already familiar with concepts like Cloud Billing Accounts and\nGoogle Cloud projects then try out the [user interface](https://console.cloud.google.com/billing) before starting to code.\n\nLearn REST basics\n-----------------\n\nThere are two ways to invoke the Cloud Billing API:\n\n- Sending HTTP requests and parsing the responses.\n- Using [client libraries](/billing/v1/libraries).\n\nIf you decide not to use client libraries, you'll need to understand the basics of REST.\n\nREST is a style of software architecture that provides a convenient and consistent approach to requesting and modifying data.\n\nThe term REST is short for \"[Representational State Transfer](https://en.wikipedia.org/wiki/Representational_state_transfer).\" In the context of Google APIs, it refers to using HTTP verbs to retrieve and modify representations of data stored by Google.\n\nIn a RESTful system, resources are stored in a data store; a client sends a request that the server perform a particular action (such as creating, retrieving, updating, or deleting a resource), and the server performs the action and sends a response, often in the form of a representation of the specified resource.\n\nIn Google's RESTful APIs, the client specifies an action using an HTTP verb such as `POST`, `GET`, `PUT`, or `DELETE`. It specifies a resource by a globally-unique URI of the following form: \n\n```\nhttps://www.googleapis.com/apiName/apiVersion/resourcePath?parameters\n```\n\nBecause all API resources have unique HTTP-accessible URIs, REST enables data caching and is optimized to work with the web's distributed infrastructure.\n\nYou may find the [method definitions](https://tools.ietf.org/html/rfc7231#section-4.3) in the HTTP 1.1 standards documentation useful; they include specifications for `GET`, `POST`, `PUT`, and `DELETE`.\n\n### REST in the Cloud Billing API\n\nThe Cloud Billing API operations map directly to REST HTTP verbs.\n\nThe specific formats for Cloud Billing API URIs are: \n\n```\nhttps://www.googleapis.com/billing/v1/resourcePath?parameters\n```\n\nThe full set of URIs used for each supported operation in the API is summarized in the Cloud Billing API reference documents ([REST](/billing/reference/rest), [RPC](/billing/reference/rpc)).\n\nLearn JSON basics\n-----------------\n\nThe Cloud Billing API returns data in JSON format.\n\n\n[JSON](http://en.wikipedia.org/wiki/JSON) (JavaScript Object Notation) is a common, language-independent data format that provides a simple text representation of arbitrary data structures. For more information, see [json.org](http://www.json.org/).\n\n\u003cbr /\u003e"]]