Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Crie um novo caso e o associe a um familiar responsável.
Ela precisa ter os seguintes campos definidos: displayName, description, classification e priority. Se você estiver apenas testando a API e não quiser encaminhar seu caso para um agente, defina testCase=true.
EXEMPLOS:
cURL
parent="projects/some-project"
curl \
--request POST \
--header "Authorization: Bearer $(gcloud auth print-access-token)" \
--header 'Content-Type: application/json' \
--data '{
"displayName": "Test case created by me.",
"description": "a random test case, feel free to close",
"classification": {
"id":
"100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8"
},
"timeZone": "-07:00",
"subscriberEmailAddresses": [
"foo@domain.com",
"bar@domain.com"
],
"testCase": true,
"priority": "P3"
}' \
"https://cloudsupport.googleapis.com/v2/$parent/cases"
Python:
import googleapiclient.discovery
apiVersion = "v2"
supportApiService = googleapiclient.discovery.build(
serviceName="cloudsupport",
version=apiVersion,
discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={apiVersion}",
)
request = supportApiService.cases().create(
parent="projects/some-project",
body={
"displayName": "A Test Case",
"description": "This is a test case.",
"testCase": True,
"priority": "P2",
"classification": {
"id":
"100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8"
},
},
)
print(request.execute())
Solicitação HTTP
POST https://cloudsupport.googleapis.com/v2beta/{parent=*/*}/cases
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2024-04-25 UTC."],[],[],null,["# Method: cases.create\n\nCreate a new case and associate it with a parent.\n\nIt must have the following fields set: `displayName`, `description`, `classification`, and `priority`. If you're just testing the API and don't want to route your case to an agent, set `testCase=true`.\n\nEXAMPLES:\n\ncURL: \n\n parent=\"projects/some-project\"\n curl \\\n --request POST \\\n --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"displayName\": \"Test case created by me.\",\n \"description\": \"a random test case, feel free to close\",\n \"classification\": {\n \"id\":\n \"100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8\"\n },\n \"timeZone\": \"-07:00\",\n \"subscriberEmailAddresses\": [\n \"foo@domain.com\",\n \"bar@domain.com\"\n ],\n \"testCase\": true,\n \"priority\": \"P3\"\n }' \\\n \"https://cloudsupport.googleapis.com/v2/$parent/cases\"\n\nPython: \n\n import googleapiclient.discovery\n\n apiVersion = \"v2\"\n supportApiService = googleapiclient.discovery.build(\n serviceName=\"cloudsupport\",\n version=apiVersion,\n discoveryServiceUrl=f\"https://cloudsupport.googleapis.com/$discovery/rest?version={apiVersion}\",\n )\n request = supportApiService.cases().create(\n parent=\"projects/some-project\",\n body={\n \"displayName\": \"A Test Case\",\n \"description\": \"This is a test case.\",\n \"testCase\": True,\n \"priority\": \"P2\",\n \"classification\": {\n \"id\":\n \"100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8\"\n },\n },\n )\n print(request.execute())\n\n### HTTP request\n\n`POST https://cloudsupport.googleapis.com/v2beta/{parent=*/*}/cases`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Request body\n\nThe request body contains an instance of [Case](/support/docs/reference/rest/v2beta/cases#Case).\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [Case](/support/docs/reference/rest/v2beta/cases#Case).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/cloudsupport`\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp)."]]