Skip to content

Latest commit

 

History

History
136 lines (88 loc) · 17.2 KB

File metadata and controls

136 lines (88 loc) · 17.2 KB

Client.Verification

Overview

Available Operations

add_reminder

Creates a verification reminder for the document. Users can create verification reminders from different product surfaces.

Example Usage

from glean.api_client import Glean
import os


with Glean(
    api_token=os.getenv("GLEAN_API_TOKEN", ""),
) as glean:

    res = glean.client.verification.add_reminder(document_id="<id>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
document_id str ✔️ The document which the verification is for new reminders and/or update.
locale Optional[str] The client's preferred locale in rfc5646 format (e.g. en, ja, pt-BR). If omitted, the Accept-Language will be used. If not present or not supported, defaults to the closest match or en.
assignee Optional[str] The obfuscated id of the person this verification is assigned to.
remind_in_days Optional[int] Reminder for the next verifications in terms of days. For deletion, this will be omitted.
reason Optional[str] An optional free-text reason for the reminder. This is particularly useful when a reminder is used to ask for verification from another user (for example, "Duplicate", "Incomplete", "Incorrect").
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.Verification

Errors

Error Type Status Code Content Type
errors.GleanError 4XX, 5XX */*

list

Returns the information to be rendered in verification dashboard. Includes information for each document owned by user regarding their verifications.

Example Usage

from glean.api_client import Glean
import os


with Glean(
    api_token=os.getenv("GLEAN_API_TOKEN", ""),
) as glean:

    res = glean.client.verification.list()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
count Optional[int] Maximum number of documents to return
locale Optional[str] The client's preferred locale in rfc5646 format (e.g. en, ja, pt-BR). If omitted, the Accept-Language will be used. If not present or not supported, defaults to the closest match or en.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.VerificationFeed

Errors

Error Type Status Code Content Type
errors.GleanError 4XX, 5XX */*

verify

Verify documents to keep the knowledge up to date within customer corpus.

Example Usage

from glean.api_client import Glean
import os


with Glean(
    api_token=os.getenv("GLEAN_API_TOKEN", ""),
) as glean:

    res = glean.client.verification.verify(document_id="<id>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
document_id str ✔️ The document which is verified.
locale Optional[str] The client's preferred locale in rfc5646 format (e.g. en, ja, pt-BR). If omitted, the Accept-Language will be used. If not present or not supported, defaults to the closest match or en.
action Optional[models.VerifyRequestAction] The verification action requested.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.Verification

Errors

Error Type Status Code Content Type
errors.GleanError 4XX, 5XX */*