Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Framework Cloud Endpoints adalah framework
web untuk lingkungan runtime
Python 2.7 dan Java 8 standar App Engine.
Framework Cloud Endpoints menyediakan alat dan library yang memungkinkan Anda membuat REST API dan library klien untuk aplikasi Anda.
Seperti framework web lainnya, Endpoints Frameworks menangani detail komunikasi tingkat rendah dari permintaan dan respons HTTP untuk aplikasi Anda. Saat
klien mengirim permintaan ke API Anda, Endpoints Frameworks akan merutekan
URL permintaan ke fungsi atau metode dalam kode Anda yang memproses permintaan.
Frameworks Endpoint mengonversi nilai yang ditampilkan ke JSON dan mengirimkan respons. Anda menambahkan metadata (dengan menggunakan anotasi di Java dan dekorator di
Python) ke kode sumber Anda. Metadata menentukan
permukaan REST API untuk
aplikasi Anda.
Dalam contoh kode, anotasi dimulai dengan
karakter @.
Python
@endpoints.method(# This method takes a ResourceContainer defined above.ECHO_RESOURCE,# This method returns an Echo message.EchoResponse,path="echo",http_method="POST",name="echo",)defecho(self,request):output_message=" ".join([request.message]*request.n)returnEchoResponse(message=output_message)
Dalam contoh kode, decorator dimulai dengan
karakter @.
Dengan Endpoints Frameworks, Anda tidak perlu men-deploy server web pihak ketiga (seperti Apache Tomcat atau Gunicorn) dengan aplikasi Anda. Anda membuat anotasi
atau mendekorasi kode dan men-deploy aplikasi seperti biasa ke
lingkungan standar App Engine.
Pengelolaan API
Extensible Service Proxy
(ESP)
menyediakan fitur pengelolaan API untuk Endpoints for OpenAPI dan
Endpoints for gRPC. ESP berjalan dalam container
bersama setiap instance backend Anda.
Karena lingkungan standar App Engine tidak mendukung deployment multi-penampung saat Endpoints Frameworks sedang dikembangkan, Endpoints Frameworks tidak menggunakan ESP. Sebagai gantinya, Endpoints Frameworks menyertakan
gateway API
bawaan yang menyediakan fitur pengelolaan API yang sebanding dengan
fitur yang disediakan ESP untuk Endpoints for OpenAPI dan
Endpoints for gRPC.
Endpoints Frameworks mencegat semua permintaan dan melakukan pemeriksaan yang diperlukan (seperti autentikasi) sebelum meneruskan permintaan ke backend API. Saat backend merespons, Endpoints Frameworks mengumpulkan dan melaporkan telemetri. Anda dapat melihat metrik untuk API di halaman Endpoints Services di konsol Google Cloud .
Anda dapat menggunakan Endpoints Frameworks dengan atau tanpa fungsi pengelolaan API. Penggunaan Endpoints Frameworks tanpa fungsi pengelolaan API ditawarkan tanpa biaya. Fungsi pengelolaan API dikenai biaya
sesuai dengan halaman harga Endpoints.
Batasan
Framework Endpoints hanya didukung di lingkungan runtime Java 8 dan Python 2.7 standar App Engine.
Framework Endpoint tidak mendukung lingkungan runtime Node.js, PHP, dan Go di lingkungan standar App Engine.
Endpoints Frameworks tidak mendukung lingkungan fleksibel App Engine.
Frameworks Endpoints tidak mendukung fungsi Cloud Run, Compute Engine, dan Google Kubernetes Engine.
[[["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\u003eCloud Endpoints Frameworks is a web framework designed for the App Engine standard Python 2.7 and Java 8 runtime environments, allowing you to generate REST APIs and client libraries.\u003c/p\u003e\n"],["\u003cp\u003eEndpoints Frameworks handles HTTP requests and responses, routing URLs to the appropriate code functions and converting return values to JSON, simplifying API development.\u003c/p\u003e\n"],["\u003cp\u003eUsing annotations in Java and decorators in Python, Endpoints Frameworks lets you define the surface of REST APIs directly within your code without the need for a third-party web server.\u003c/p\u003e\n"],["\u003cp\u003eWhile not using the Extensible Service Proxy (ESP), Endpoints Frameworks provides built-in API management comparable to ESP, including request interception, authentication, and telemetry reporting.\u003c/p\u003e\n"],["\u003cp\u003eEndpoints Frameworks is limited to the App Engine standard Python 2.7 and Java 8 environments and does not support Node.js, PHP, Go, the App Engine flexible environment, Cloud Run, Compute Engine, or Google Kubernetes Engine.\u003c/p\u003e\n"]]],[],null,["# Cloud Endpoints Frameworks is a [web\nframework](https://wikipedia.org/wiki/Web_framework) for the App Engine\nstandard [Python 2.7 and Java 8 runtime\nenvironments](/appengine/docs/standard/runtimes).\nCloud Endpoints Frameworks provides the tools and libraries that allow you to\ngenerate REST APIs and client libraries for your application.\n| **Note:** Endpoints Frameworks doesn't support the PHP, Go, or Node.js runtimes.\n\nLike other web frameworks, Endpoints Frameworks handles the low-level\ncommunication details of HTTP requests and responses for your application. When\na client sends a request to your API, Endpoints Frameworks routes the\nrequest's URL to the function or method in your code that processes the request.\nEndpoints Frameworks converts the return value to JSON and sends the\nresponse. You add metadata (by using annotations in Java and decorators in\nPython) to your source code. The metadata defines the\n[surface](/endpoints/docs/frameworks/glossary#surface) of the REST APIs for your\napplication. \n\n### Java\n\n @ApiMethod(name = \"echo\")\n public Message echo(Message message, @Named(\"n\") @Nullable Integer n) {\n return doEcho(message, n);\n }\n\nIn the example code, the\n[annotations](/endpoints/docs/frameworks/java/annotate-code) begin with\nthe `@` character.\n\n### Python\n\n @endpoints.method(\n # This method takes a ResourceContainer defined above.\n ECHO_RESOURCE,\n # This method returns an Echo message.\n EchoResponse,\n path=\"echo\",\n http_method=\"POST\",\n name=\"echo\",\n )\n def echo(self, request):\n output_message = \" \".join([request.message] * request.n)\n return EchoResponse(message=output_message)\n\nIn the example code, the\n[decorators](/endpoints/docs/frameworks/python/create_api) begin with\nthe `@` character.\n\nWith Endpoints Frameworks, you don't have to deploy a third-party web\nserver (such as Apache Tomcat or Gunicorn) with your application. You annotate\nor decorate the code and deploy your application as you normally would to the\n[App Engine standard environment](/appengine/docs/standard).\n\nAPI management\n--------------\n\nThe [Extensible Service Proxy\n(ESP)](/endpoints/docs/frameworks/glossary#extensible_service_proxy)\nprovides API management features for Endpoints for OpenAPI and\nEndpoints for gRPC. ESP runs in a container\nalongside each instance of your backend.\n\n\nBecause the App Engine standard environment didn't support\nmulti-container deployments when Endpoints Frameworks was\nunder development, Endpoints Frameworks doesn't use\nESP. Instead, Endpoints Frameworks includes a built-in\n[API gateway](https://wikipedia.org/wiki/API_management)\nthat provides API management features that are comparable to the\nfeatures that ESP provides for Endpoints for OpenAPI and\nEndpoints for gRPC.\n\n\u003cbr /\u003e\n\nEndpoints Frameworks intercepts all requests and performs any\nnecessary checks (such as authentication) before forwarding the request to the\nAPI backend. When the backend responds, Endpoints Frameworks gathers\nand reports telemetry. You can view metrics for your API on the **Endpoints\nServices** page in the Google Cloud console.\n\nYou can use Endpoints Frameworks with or without API management\nfunctionality. Use of Endpoints Frameworks without API management\nfunctionality is offered at no charge. API management functionality is charged\naccording to the [Endpoints pricing\npage](/endpoints/pricing).\n\nLimitations\n-----------\n\n- Endpoints Frameworks is supported only on the App Engine standard Python 2.7 and Java 8 runtime environments.\n- Endpoints Frameworks doesn't support the Node.js, PHP, and Go runtime environments on the App Engine standard environment.\n- Endpoints Frameworks doesn't support the App Engine flexible environment.\n- Endpoints Frameworks doesn't support Cloud Run functions, Compute Engine, and Google Kubernetes Engine.\n\nWhat's next\n-----------\n\n- To learn more about the differences between ESP and\n Endpoints Frameworks, see [Comparing Extensible Service Proxy and\n Endpoints Frameworks](/endpoints/docs/frameworks/frameworks-extensible-service-proxy#endpoints_frameworks).\n\n- For information on the language-specific libraries and tools, see the following:\n\n - [About Endpoints Frameworks for\n Java](/endpoints/docs/frameworks/java/about-cloud-endpoints-frameworks)\n - [About Endpoints Frameworks for\n Python](/endpoints/docs/frameworks/python/about-cloud-endpoints-frameworks)\n- To learn how to configure, deploy, and send requests to a sample API, see the\n following:\n\n - [Getting started with Endpoints Frameworks for Java](/endpoints/docs/frameworks/java/get-started-frameworks-java)\n - [Getting started with Endpoints Frameworks for Python](/endpoints/docs/frameworks/python/get-started-frameworks-python)"]]