您可以使用 API Explorer 工具向 Cloud Talent Solution 发送试验请求。Explorer 提供了一份表单,其中显示每种方法的参数。请填写表单,执行 API 调用,然后查看结果。您必须先完成准备工作页面的“GCP Console 设置”部分,然后才能使用 API Explorer。
点击执行按钮。在弹出的窗口中,点击允许。然后,API 会在 API Explorer 边栏中返回结果。如果收到错误消息,请检查如上所示输入的信息是否正确,以及您是否已为您的服务账号分配了正确的权限。在表单中进行必要更改,然后再次点击执行。如果收到空结果集,则表示没有与您的服务账号关联的公司。您可以使用 jobs.projects.companies.create 方法重新按照本教程创建公司,或查看创建职位和公司快速入门。
您可以自己探索其他 API 方法和表单。
提示:获得所需的输出后,将 API Explorer 网址添加为书签。如果想要再次运行该方法,请将网址粘贴到浏览器中。表单中已填入您的值。 进行所需的更改,然后点击执行以运行该方法。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-18。"],[],[],null,["# Try Cloud Talent Solution using the API Explorer\n\nYou can use the API Explorer tool\nto send trial requests to Cloud Talent Solution. The Explorer presents a form that\nshows the parameters for each method. Fill in the form, execute the API call,\nand see the results. You must have completed the\n\"GCP Console set-up\" section of the\n[Before You Begin](https://cloud.google.com/talent-solution/job-search/docs/before-you-begin#overview)\npage before you can use API Explorer.\n\nClick the following button to view API Explorer:\n\n[Try It!](https://developers.google.com/apis-explorer/#p/jobs/v4/)\n\nYou are automatically redirected to the REST reference\n[overview](https://cloud.google.com/talent-solution/job-search/docs/reference/rest/?apix=true)\ndocumentation.\n\nChoose a method\n---------------\n\nChoose the method you want to call. This demonstration walks you through\nlisting the companies associated with your Google Cloud Platform\nservice account. If you have not yet created any companies, the API will return\nan empty list. To try out a different method, follow the broader steps outlined\nbelow while referring to the\n[reference documentation](https://cloud.google.com/talent-solution/job-search/docs/reference/rest/?apix=true)\nto guide you through the required data for each API call.\n\nTo list companies, click **projects.tenants.companies.list**:\n\nYou are redirected to the\n[`projects.tenants.companies.list`](https://cloud.google.com/talent-solution/job-search/docs/reference/rest/v4/projects.tenants.companies/list)\npage and the method API Explorer form appears:\n\nFill in the parameters\n----------------------\n\nOf the fields listed on the form, only `parent` is required. We recommend\nfilling in a value for `pageSize` as well, especially if you have already\ncreated a large number of companies.\n\nFill in the following fields on the form:\n\n- **parent** : `projects/{projectId}/tenants/{tenantId}`\n- **pageSize** : `20`\n\n| **Note:** If a string value has inner strings, like **filter**, use double quotation marks around the inner strings instead of single quotes.\n\nSubstitute your project ID for `{project_id}`, but copy all the other fields\nwithout changes. You can find your project ID by navigating to the project\ndrop-down menu in your\n[GCP Console](http://console.cloud.google.com):\n\nAuthorize API Explorer\n----------------------\n\nFirst, ensure that you have the \"Cloud Talent Solution Project Editor\"\n[IAM](https://cloud.google.com/talent-solution/docs/iam) permissions enabled on\nyour project. You can do this by navigating to **Identity \\\u003e Service Accounts**\nin your GCP console:\n\nClick **Google OAuth 2.0** and **API Key**:\n\nExecute the method\n------------------\n\nClick the **Execute** button. In the window that pops up, click **Allow** . The\nAPI will then return a result in the API Explorer sidebar. If you get an error\nmessage, check that you entered the information as shown above and that you have\nassigned the correct permissions to your service account. Make any changes in\nthe form and click **Execute** again. If you receive an empty result set, there\nare no companies associated with your service account. You can retry this\ntutorial with the **jobs.projects.companies.create** method to create a company,\nor see the\n[create jobs and companies quickstart](https://cloud.google.com/talent-solution/job-search/docs/quickstart-jobs-and-companies).\n\nFeel free to explore additional API methods and forms on your own.\n\n**Tip** : After you get the output you want, bookmark the API Explorer URL.\nWhen you want to run the method again, paste the URL into your browser.\nThe form is already populated with your values. Make any change you wish\nand click **Execute** to run the method."]]