Apigee 보안 모델에서는 네트워크 I/O, 파일 시스템 읽기/쓰기, 현재 사용자 정보, 프로세스 목록, CPU/메모리 사용률과 같은 시스템 호출을 허용하지 않습니다. 이러한 호출의 일부는 작동할 수 있지만 지원되지 않으며 언제든지 사용 중지될 수 있습니다. 이후 버전과의 호환성을 보장하려면 코드에서 이러한 호출을 수행하지 않아야 합니다.
지원되는 언어별 다른 제한사항이 있을 수 있으며 이는 해당 언어의 정책 참조에 설명되어 있습니다.
지원 언어
JavaScript
자바스크립트 지원에는 API 프록시와 관련된 변수와 값을 처리하기 위한 전체 객체 모델이 포함됩니다. 자세한 내용은 자바스크립트 객체 모델을 참조하세요.
[[["이해하기 쉬움","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-08-18(UTC)"],[[["\u003cp\u003eThis content covers how to use procedural code (JavaScript, Java, and Python) within Apigee and Apigee hybrid API proxies to manage flow variables, faults, and request/response bodies.\u003c/p\u003e\n"],["\u003cp\u003eApigee provides specific policies (JavaScript, JavaCallout, and PythonScript) to call out to your procedural code, which can be used to implement complex logic or rewrite URLs.\u003c/p\u003e\n"],["\u003cp\u003eProcedural code allows for the manipulation of complex body values, and logic not available through built-in policies, with results stored in flow variables for retrieval elsewhere in the API proxy.\u003c/p\u003e\n"],["\u003cp\u003eTo use procedural code, you write the code in a separate file, add it as a resource file to your API proxy, configure the relevant language policy to call the code, and retrieve the results using flow variables.\u003c/p\u003e\n"],["\u003cp\u003eThe security model in Apigee restricts certain system calls in procedural code, such as network I/O and file system operations, which should be avoided for forward compatibility.\u003c/p\u003e\n"]]],[],null,["# Incorporating procedural code\n\n*This page\napplies to **Apigee** and **Apigee hybrid**.*\n\n\n*View [Apigee Edge](https://docs.apigee.com/api-platform/get-started/what-apigee-edge) documentation.*\n\nYou can add code in procedural languages such as JavaScript, Java, and Python, then call out\nto that code from other parts of an API proxy. Support for procedural code is designed to make it\neasier for you to implement complex handling of flow variables, faults, and request and response\nbodies.\n\nWith procedural code, you can:\n\n- Create or manipulate complex body values, such as request and response values.\n- Rewrite URLs, such as to mask a target endpoint URL.\n- Add other logic not available with included policies.\n\nHow it works\n------------\n\nYou use a policy specific to the language in order to make calls from a proxy flow to your\nincluded code. For each of the supported languages, Apigee includes a separate policy:\n[JavaScript policy](/apigee/docs/api-platform/reference/policies/javascript-policy), [JavaCallout policy](/apigee/docs/api-platform/reference/policies/java-callout-policy), and [PythonScript policy](/apigee/docs/api-platform/reference/policies/python-script-policy).\n\nThe following describes, at a high level, one way this works. Be sure to see the policy\nreferences for more details.\n\n1. In a separate file, write the code you're going to use.\n2. In your code, put the result of the code's processing into an Apigee flow variable. You'll retrieve the variable value elsewhere in your API proxy. For more about flow\n variables, see [Managing\n proxy state with flow variables](/apigee/docs/api-platform/fundamentals/introduction-flow-variables).\n\n3. Add your file (or JAR) as a resource file to your API proxy. For more about resource files, see [Resource files](/apigee/docs/api-platform/develop/resource-files).\n\n4. Add the policy corresponding to the language you're using. Configure the policy to make a call to your code from the desired place in your API\n proxy's flow.\n\n5. Use a policy to retrieve the code's value from the flow variable.\n\nLimitations\n-----------\n\nThe Apigee security model does not permit system calls such as network I/O, filesystem\nread/writes, current user info, process list, and CPU/memory utilization. Although some such\ncalls may be functional, they are unsupported and liable to be actively disabled at any time. For\nforward compatibility, you should avoid making such calls in your code.\n\nOther limitations may exist for each supported language, as described in the language's\ncorresponding policy reference.\n\nSupported languages\n-------------------\n\n### JavaScript\n\nSupport for JavaScript includes a full object model for handling variables and values specific\nto an API proxy. For more, see [JavaScript object model](/apigee/docs/api-platform/reference/javascript-object-model).\n\nFor policy reference information and examples, see [JavaScript policy](/apigee/docs/api-platform/reference/policies/javascript-policy).\n\n### Java\n\nUse the [JavaCallout\npolicy](/apigee/docs/api-platform/reference/policies/java-callout-policy) to make calls to Java code from your proxy's flow. The policy reference topic includes\nexamples.\n\n### Python\n\nUse the [Python Script\npolicy](/apigee/docs/api-platform/reference/policies/python-script-policy) to call out to Python code."]]