Skip to content

Latest commit

 

History

History
164 lines (113 loc) · 13.7 KB

File metadata and controls

164 lines (113 loc) · 13.7 KB

Client.Verification

Overview

Available Operations

addReminder

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

Example Usage

package hello.world;

import com.glean.api_client.glean_api_client.Glean;
import com.glean.api_client.glean_api_client.models.components.ReminderRequest;
import com.glean.api_client.glean_api_client.models.operations.AddverificationreminderResponse;
import java.lang.Exception;

public class Application {

    public static void main(String[] args) throws Exception {

        Glean sdk = Glean.builder()
                .apiToken(System.getenv().getOrDefault("GLEAN_API_TOKEN", ""))
            .build();

        AddverificationreminderResponse res = sdk.client().verification().addReminder()
                .reminderRequest(ReminderRequest.builder()
                    .documentId("<id>")
                    .build())
                .call();

        if (res.verification().isPresent()) {
            // handle response
        }
    }
}

Parameters

Parameter Type Required Description
locale Optional<String> 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.
reminderRequest ReminderRequest ✔️ Details about the reminder.

Response

AddverificationreminderResponse

Errors

Error Type Status Code Content Type
models/errors/APIException 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

package hello.world;

import com.glean.api_client.glean_api_client.Glean;
import com.glean.api_client.glean_api_client.models.operations.ListverificationsResponse;
import java.lang.Exception;

public class Application {

    public static void main(String[] args) throws Exception {

        Glean sdk = Glean.builder()
                .apiToken(System.getenv().getOrDefault("GLEAN_API_TOKEN", ""))
            .build();

        ListverificationsResponse res = sdk.client().verification().list()
                .call();

        if (res.verificationFeed().isPresent()) {
            // handle response
        }
    }
}

Parameters

Parameter Type Required Description
count Optional<Long> Maximum number of documents to return
locale Optional<String> 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.

Response

ListverificationsResponse

Errors

Error Type Status Code Content Type
models/errors/APIException 4XX, 5XX */*

verify

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

Example Usage

package hello.world;

import com.glean.api_client.glean_api_client.Glean;
import com.glean.api_client.glean_api_client.models.components.VerifyRequest;
import com.glean.api_client.glean_api_client.models.operations.VerifyResponse;
import java.lang.Exception;

public class Application {

    public static void main(String[] args) throws Exception {

        Glean sdk = Glean.builder()
                .apiToken(System.getenv().getOrDefault("GLEAN_API_TOKEN", ""))
            .build();

        VerifyResponse res = sdk.client().verification().verify()
                .verifyRequest(VerifyRequest.builder()
                    .documentId("<id>")
                    .build())
                .call();

        if (res.verification().isPresent()) {
            // handle response
        }
    }
}

Parameters

Parameter Type Required Description
locale Optional<String> 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.
verifyRequest VerifyRequest ✔️ Details about the verification request.

Response

VerifyResponse

Errors

Error Type Status Code Content Type
models/errors/APIException 4XX, 5XX */*