Service Control API는 이러한 전제조건을 확인하는 간단한 services.check 메서드를 제공합니다. 관리형 서비스는 전제조건이 충족되었는지 확인하기 위해 이 메서드를 정기적으로 호출해야 합니다. 서비스 제작자와 서비스 소비자 간의 활동은 Operation으로 표현됩니다.
services.check 메서드는 작업에 대해 다음 검사를 수행합니다.
서비스 제작자가 라이브이고 정상 상태인지 여부
서비스 소비자 프로젝트가 라이브이고 정상 상태인지 여부
관리형 서비스가 서비스 소비자 프로젝트에서 사용 설정되었는지 여부
API 키가 유효한지 여부
API 키 사용이 API 키와 연관된 제한사항(IP 또는 HTTP 리퍼러 제한사항 등)을 충족하는지 여부
[[["이해하기 쉬움","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)"],[],[],null,["# Checking Status\n\nThis page describes how to use Service Infrastructure for checking\nstatus on [managed services](/service-infrastructure/docs/glossary#managed),\n[service producers](/service-infrastructure/docs/glossary#producer),\n[service consumers](/service-infrastructure/docs/glossary#consumer), and API keys.\n\nWhen a service producer offers a service to its service consumers, it needs to\nensure that various preconditions are met, such as whether:\n\n- A service consumer has been deleted.\n- The service consumer has [enabled](/service-infrastructure/docs/glossary#enabled) the service.\n- An API key is valid.\n\nThe Service Control API provides a simple\n[`services.check`](/service-infrastructure/docs/service-control/reference/rest/v1/services/check)\nmethod to check such preconditions. A managed service should call this method on\na regular basis to ensure the preconditions are met. The activity between the\nservice producer and the service consumer is represented by an\n[`Operation`](/service-infrastructure/docs/service-control/reference/rest/v1/Operation).\nThe `services.check` method performs the following checks on the operation:\n\n- The service producer project is live and in a healthy state.\n- The service consumer project is live and in a healthy state.\n- The managed service is enabled on the service consumer project.\n- The API key is valid.\n- The use of the API key satisfies restrictions associated with the API key, such as IP or HTTP referrer restrictions.\n\nThe `services.check` method is typically called from the servers that actually\nimplement the service. For security and privacy purposes,\nthe Service Control API uses [Identity and Access Management](/iam) to verify the\ncaller has the proper permission to call the method. For details, see\n[Service Control API Access Control](/service-infrastructure/docs/service-control/access-control).\n\nChecking status\n---------------\n\nAfter you [roll out](/service-infrastructure/docs/glossary#rollout) a managed service, you can call the\n`services.check` method on the service without additional configuration. See the\n[`services.check`](/service-infrastructure/docs/service-control/reference/rest/v1/services/check)\nreference for details.\n\nTo quickly experiment with the method, you can use the `gcurl` command to call\nthe `services.check` method. See\n[Getting Started with the Service Control API](/service-infrastructure/docs/service-control/getting-started)\nfor the initial setup steps. \n\n```\ngcurl -d '{\n \"operation\": {\n \"operationId\": \"123e4567-e89b-12d3-a456-426655440000\",\n \"consumerId\": \"project:endpointsapis-consumer\",\n \"startTime\":\"2016-07-31T05:20:00Z\",\n \"operationName\":\"google.example.hello.v1.HelloService.GetHello\"\n }\n}' https://servicecontrol.googleapis.com/v1/services/endpointsapis.appspot.com:check\n{\n \"operationId\": \"123e4567-e89b-12d3-a456-426655440000\"\n}\n```\n\nThe response from the check method indicates whether all checks succeeded or\nsome checks failed. Success is indicated by the absence of\n[`checkErrors`](/service-infrastructure/docs/service-control/reference/rest/v1/services/check#CheckError)\nfield. Otherwise, the `checkErrors` field lists the failed checks."]]