Method: projects.locations.collections.dataConnector.buildActionInvocation

DataConnector를 사용하여 작업 호출을 빌드합니다.

HTTP 요청

POST https://discoveryengine.googleapis.com/v1alpha/{name=projects/*/locations/*/collections/*/dataConnector}:buildActionInvocation

URL은 gRPC 트랜스코딩 문법을 사용합니다.

경로 매개변수

매개변수
name

string

필수 항목입니다. DataConnector 리소스

작업 호출을 빌드하는 데 사용되는 데이터 커넥터입니다.

요청 본문

요청 본문에는 다음과 같은 구조의 데이터가 포함됩니다.

JSON 표현
{
  "actionName": string,
  "languageCode": string
}
필드
actionName

string

필수입니다. 작업의 이름입니다.

예: 'send_email'

languageCode

string

(선택사항) 상태 및 오류 메시지에 사용할 언어입니다.

응답 본문

DataConnectorService.BuildActionInvocation 메서드에 대한 응답입니다.

성공한 경우 응답 본문은 다음과 같은 구조의 데이터를 포함합니다.

JSON 표현
{
  "actionInvocation": {
    object (ActionInvocation)
  }
}
필드
actionInvocation

object (ActionInvocation)

작업 호출입니다.

승인 범위

다음 OAuth 범위 중 하나가 필요합니다.

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/discoveryengine.readwrite
  • https://www.googleapis.com/auth/discoveryengine.assist.readwrite

자세한 내용은 Authentication Overview를 참조하세요.

IAM 권한

name 리소스에 대해서는 다음 IAM 권한이 필요합니다.

  • discoveryengine.dataConnectors.buildActionInvocation

자세한 내용은 IAM 문서를 참조하세요.

ActionInvocation

작업 호출을 나타냅니다.

JSON 표현
{
  "agentName": string,
  "actionName": string,
  "args": {
    object
  },
  "dataConnector": string,
  "dataSource": string,
  "invocationId": string,
  "actionDisplayName": string,
  "userConfirmationMessage": string,
  "authorizationUrl": string,
  "resendQueryOnUserAuthorization": boolean,
  "parameterDeclaration": {
    object
  },
  "argSetCandidates": [
    {
      object
    }
  ]
}
필드
agentName

string

선택사항입니다. 작업을 수행하는 에이전트의 이름입니다.

actionName

string

작업 이름입니다.

예: 'send_email'

args

object (Struct format)

작업의 이름이 지정된 인수입니다.

예: {"recipient": "tom@...", "subject": ... }

사용자에게 제공되는 경우 이 부분을 수정할 수 있습니다.

작업 인수에 여러 옵션이 있는 경우 (예: 캘린더 일정에 가능한 시간대가 여러 개 있음) 이 필드는 첫 번째 옵션을 설명합니다.

dataConnector

string

DataConnector 리소스

작업을 실행하는 데 사용되는 데이터 커넥터입니다.

dataSource

string

출력 전용입니다. 데이터 소스의 이름입니다.

invocationId

string

출력 전용입니다. 작업 호출 ID입니다.

actionDisplayName

string

출력 전용입니다. 사용자에게 표시되는 작업의 사람이 읽을 수 있는 이름입니다.

userConfirmationMessage

string

출력 전용입니다. 확인 대화상자와 함께 사용자에게 표시되는 사람이 읽을 수 있는 메시지입니다.

authorizationUrl

string

출력 전용입니다. 승인 URL입니다.

resendQueryOnUserAuthorization

boolean

출력 전용입니다. true인 경우 호출자는 사용자 승인 시 쿼리를 다시 전송해야 합니다.

parameterDeclaration

object (Struct format)

출력 전용입니다. 렌더링/유효성 검사 정보를 포함한 작업의 매개변수 설명입니다. 형식은 OpenAPI의 매개변수 사양을 기반으로 합니다. 기반: https://swagger.io/docs/specification/describing-parameters/

예:

{
    "type": "object",
    "properties": {
        "title": {
            "type": "string",
            "description": "title of the event",
        },
        "startTime": {
            "type": "string",
            "format": "date-time",
            "description": (
                "Start time of the meeting, e.g. 2024-07-12T23:30"
            ),
        },
        "attendees": {
            "type": "array",
            "items": {"type": "string", "format": "email"},
            "description": "List of email addresses of attendees",
        },
        "duration": {
            "type": "integer",
            "format": "int32",
            "minimum": 5,
            "maximum": 240,
            "default": { "numberValue": 30 },
            "description": (
                "Duration of the meeting in minutes. Defaults to 30"
                " minutes."
            ),
        },
        "timezone": {
            "type": "string",
            "description": (
                'IANA time Zone Database name, e.g. "Europe/Zurich". If'
                " omitted, timezone of the user will be used"
            ),
        },
        "eventType": {
            "type": "string",
            "enum": ["meeting", "focus_time", "out_of_office", "task"],
            "description": "type of the event",
        },
    },
    "required": ["startTime", "title", "attendees"]
}
argSetCandidates[]

object (Struct format)

출력 전용입니다. 작업 인수 (예: 캘린더 이벤트의 가능한 시간대가 여러 개)에 여러 옵션이 있는 경우 이 필드에 추가 인수 후보가 나열됩니다.

각각 args 필드와 유사한 형식으로 지정된 인수 집합 목록이 포함됩니다. 인수 집합에는 args 필드와 다른 인수만 포함됩니다. 사용자에게 제공되는 경우 이러한 값을 수정할 수 있습니다.

예를 들면 다음과 같습니다.

args에는 모든 인수가 포함된 첫 번째 옵션이 포함됩니다.

{"title": "Meeting with John", "startTime": "2024-08-01T13:30", ... }

argSetCandidates에는 나머지 옵션이 포함되지만 서로 다른 인수만 채워집니다.

[{ "startTime": "2024-08-01T14:00" }, { "startTime": "2024-08-01T14:30" }, { "startTime": "2024-08-01T15:30" }]