Skip to content

Latest commit

 

History

History
81 lines (62 loc) · 3.49 KB

README.md

File metadata and controls

81 lines (62 loc) · 3.49 KB

Streams

(streams())

Available Operations

getStreamProperties

Get stream properties

Example Usage

package hello.world;

import com.airbyte.api.Airbyte;
import com.airbyte.api.models.operations.*;
import com.airbyte.api.models.shared.*;
import com.airbyte.api.models.shared.Security;
import com.airbyte.api.utils.EventStream;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.Optional;
import org.openapitools.jackson.nullable.JsonNullable;
import static java.util.Map.entry;

public class Application {

    public static void main(String[] args) throws Exception {
        try {
            Airbyte sdk = Airbyte.builder()
                .security(Security.builder()
                    .basicAuth(SchemeBasicAuth.builder()
                        .password("")
                        .username("")
                        .build())
                    .build())
                .build();

            GetStreamPropertiesRequest req = GetStreamPropertiesRequest.builder()
                .sourceId("<value>")
                .build();

            GetStreamPropertiesResponse res = sdk.streams().getStreamProperties()
                .request(req)
                .call();

            if (res.streamPropertiesResponse().isPresent()) {
                // handle response
            }
        } catch (com.airbyte.api.models.errors.SDKError e) {
            // handle exception
            throw e;
        } catch (Exception e) {
            // handle exception
            throw e;
        }

    }
}

Parameters

Parameter Type Required Description
request com.airbyte.api.models.operations.GetStreamPropertiesRequest ✔️ The request object to use for the request.

Response

com.airbyte.api.models.operations.GetStreamPropertiesResponse

Errors

Error Object Status Code Content Type
models/errors/SDKError 4xx-5xx */*