[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[[["\u003cp\u003eThis guide details the process of deploying an API, which includes setting up the environment, creating the API and web server, and then deploying to production.\u003c/p\u003e\n"],["\u003cp\u003eTo deploy to production, you must set the \u003ccode\u003eENDPOINTS_GAE_SDK\u003c/code\u003e environment variable and use the \u003ccode\u003egcloud app deploy\u003c/code\u003e command, then confirm deployment by making a test request.\u003c/p\u003e\n"],["\u003cp\u003eAPIs can be tested locally using the App Engine development server, started via \u003ccode\u003edev_appserver.py YOUR_PROJECT_DIR\u003c/code\u003e, followed by sending a test \u003ccode\u003ecurl\u003c/code\u003e request.\u003c/p\u003e\n"],["\u003cp\u003eEndpoints Frameworks offers API management features, such as monitoring, logging, quotas, and a developer portal, which are enabled by deploying an OpenAPI document.\u003c/p\u003e\n"],["\u003cp\u003eVersioning can be done by referring to the "Handling API versioning" page.\u003c/p\u003e\n"]]],[],null,["# Deploying and testing an API\n\nThis page describes how to deploy your API.\n\nBefore you begin\n----------------\n\n- [Set up your programming environment and download tools](/endpoints/docs/frameworks/python/get-started-frameworks-python#before-you-begin).\n- [Create your API](/endpoints/docs/frameworks/python/create_api).\n- [Create a web server](/endpoints/docs/frameworks/python/api_server) to serve your API.\n\nDeploying your API to production\n--------------------------------\n\nTo deploy an API:\n\n1. Set the `ENDPOINTS_GAE_SDK` environment variable to the path of your\n App Engine SDK folder:\n \u003cvar translate=\"no\"\u003ePath_to_Cloud_SDK\u003c/var\u003e`/platform/google_appengine`.\n\n Replace \u003cvar translate=\"no\"\u003ePath_to_Cloud_SDK\u003c/var\u003e with the output of the\n following command: \n\n gcloud info --format=\"value(installation.sdk_root)\"\n\n2. Run the following command in the API main directory:\n\n gcloud app deploy\n\n Wait a few moments for the deployment to succeed, ignoring the warning\n messages. When the deployment completes, a message similar to the\n following displays: \n\n ```\n File upload done.\n Updating service [default]...done.\n ```\n3. Confirm successful deployment by sending a test request to the API, for\n example:\n\n ```\n curl --request POST \\\n --header \"Content-Type: application/json\" \\\n --data '{\"content\":\"echo\"}' \\\n https://PROJECT_ID.appspot.com/_ah/api/echo/v1/echo?n=2\n ```\n\n Replace \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e with your project ID and\n `echo` with your API name.\n\n The results are: \n\n ```\n {\n \"content\": \"echo echo\"\n }\n ```\n\nIf you didn't get a successful response, see\n[Troubleshooting response errors](/endpoints/docs/frameworks/troubleshoot-response-errors).\n\nDeploying to multiple app versions\n----------------------------------\n\nFor information on how to do API versioning, and how to deploy to versions,\nsee [Handling API versioning](/endpoints/docs/frameworks/python/handling-api-versioning)\n\nTesting an API locally\n----------------------\n\nYou can use the App Engine local development server to test your API\nlocally. For more information about the local development server, see\n[Using the local development server](/appengine/docs/standard/python/tools/using-local-server).\n\nTo run your API locally:\n\n1. From the root directory of the project, start the App Engine\n development server:\n\n ```\n dev_appserver.py YOUR_PROJECT_DIR\n ```\n2. Run `curl` to make an API request, for example:\n\n curl --request POST \\\n --header \"Content-Type: application/json\" \\\n --data '{\"message\":\"echo\"}' \\\n \"${HOST}/_ah/api/echo/v1/echo?n=2\"\n\nAdding API management\n---------------------\n\nEndpoints Frameworks provides API management features such as:\n\n- [Monitoring](/endpoints/docs/frameworks/monitoring-your-api)\n- [Logging](/endpoints/docs/frameworks/monitoring-your-api#logs)\n- [Quotas](/endpoints/docs/openapi/quotas-overview)\n- [Developer portal](/endpoints/docs/openapi/dev-portal-overview)\n\nFor your API to be managed by Endpoints Frameworks, you must generate\nand deploy an OpenAPI document that describes your API, as described in\n[Adding API management](/endpoints/docs/frameworks/python/adding-api-management)."]]