(destinations())
- createDestination - Create a destination
- deleteDestination - Delete a Destination
- getDestination - Get Destination details
- listDestinations - List destinations
- patchDestination - Update a Destination
- putDestination - Update a Destination and fully overwrite it
Creates a destination given a name, workspace id, and a json blob containing the configuration for the source.
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();
DestinationCreateRequest req = DestinationCreateRequest.builder()
.configuration(DestinationConfiguration.of(DestinationGoogleSheets.builder()
.credentials(AuthenticationViaGoogleOAuth.builder()
.clientId("<value>")
.clientSecret("<value>")
.refreshToken("<value>")
.build())
.spreadsheetId("https://docs.google.com/spreadsheets/d/1hLd9Qqti3UyLXZB2aFfUWDT7BG/edit")
.build()))
.name("<value>")
.workspaceId("8360860a-d46e-48e6-af62-08e5ba5019ef")
.build();
CreateDestinationResponse res = sdk.destinations().createDestination()
.request(req)
.call();
if (res.destinationResponse().isPresent()) {
// handle response
}
} catch (com.airbyte.api.models.errors.SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
}
}
Parameter | Type | Required | Description |
---|---|---|---|
request |
com.airbyte.api.models.shared.DestinationCreateRequest | ✔️ | The request object to use for the request. |
com.airbyte.api.models.operations.CreateDestinationResponse
Error Object | Status Code | Content Type |
---|---|---|
models/errors/SDKError | 4xx-5xx | */* |
Delete a Destination
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();
DeleteDestinationRequest req = DeleteDestinationRequest.builder()
.destinationId("<value>")
.build();
DeleteDestinationResponse res = sdk.destinations().deleteDestination()
.request(req)
.call();
// handle response
} catch (com.airbyte.api.models.errors.SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
}
}
Parameter | Type | Required | Description |
---|---|---|---|
request |
com.airbyte.api.models.operations.DeleteDestinationRequest | ✔️ | The request object to use for the request. |
com.airbyte.api.models.operations.DeleteDestinationResponse
Error Object | Status Code | Content Type |
---|---|---|
models/errors/SDKError | 4xx-5xx | */* |
Get Destination details
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();
GetDestinationRequest req = GetDestinationRequest.builder()
.destinationId("<value>")
.build();
GetDestinationResponse res = sdk.destinations().getDestination()
.request(req)
.call();
if (res.destinationResponse().isPresent()) {
// handle response
}
} catch (com.airbyte.api.models.errors.SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
}
}
Parameter | Type | Required | Description |
---|---|---|---|
request |
com.airbyte.api.models.operations.GetDestinationRequest | ✔️ | The request object to use for the request. |
com.airbyte.api.models.operations.GetDestinationResponse
Error Object | Status Code | Content Type |
---|---|---|
models/errors/SDKError | 4xx-5xx | */* |
List destinations
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();
ListDestinationsRequest req = ListDestinationsRequest.builder()
.build();
ListDestinationsResponse res = sdk.destinations().listDestinations()
.request(req)
.call();
if (res.destinationsResponse().isPresent()) {
// handle response
}
} catch (com.airbyte.api.models.errors.SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
}
}
Parameter | Type | Required | Description |
---|---|---|---|
request |
com.airbyte.api.models.operations.ListDestinationsRequest | ✔️ | The request object to use for the request. |
com.airbyte.api.models.operations.ListDestinationsResponse
Error Object | Status Code | Content Type |
---|---|---|
models/errors/SDKError | 4xx-5xx | */* |
Update a Destination
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();
PatchDestinationRequest req = PatchDestinationRequest.builder()
.destinationId("<value>")
.destinationPatchRequest(DestinationPatchRequest.builder()
.configuration(DestinationConfiguration.of(DestinationGoogleSheets.builder()
.credentials(AuthenticationViaGoogleOAuth.builder()
.clientId("<value>")
.clientSecret("<value>")
.refreshToken("<value>")
.build())
.spreadsheetId("https://docs.google.com/spreadsheets/d/1hLd9Qqti3UyLXZB2aFfUWDT7BG/edit")
.build()))
.build())
.build();
PatchDestinationResponse res = sdk.destinations().patchDestination()
.request(req)
.call();
if (res.destinationResponse().isPresent()) {
// handle response
}
} catch (com.airbyte.api.models.errors.SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
}
}
Parameter | Type | Required | Description |
---|---|---|---|
request |
com.airbyte.api.models.operations.PatchDestinationRequest | ✔️ | The request object to use for the request. |
com.airbyte.api.models.operations.PatchDestinationResponse
Error Object | Status Code | Content Type |
---|---|---|
models/errors/SDKError | 4xx-5xx | */* |
Update a Destination and fully overwrite it
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();
PutDestinationRequest req = PutDestinationRequest.builder()
.destinationId("<value>")
.destinationPutRequest(DestinationPutRequest.builder()
.configuration(DestinationConfiguration.of(DestinationGoogleSheets.builder()
.credentials(AuthenticationViaGoogleOAuth.builder()
.clientId("<value>")
.clientSecret("<value>")
.refreshToken("<value>")
.build())
.spreadsheetId("https://docs.google.com/spreadsheets/d/1hLd9Qqti3UyLXZB2aFfUWDT7BG/edit")
.build()))
.name("<value>")
.build())
.build();
PutDestinationResponse res = sdk.destinations().putDestination()
.request(req)
.call();
if (res.destinationResponse().isPresent()) {
// handle response
}
} catch (com.airbyte.api.models.errors.SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
}
}
Parameter | Type | Required | Description |
---|---|---|---|
request |
com.airbyte.api.models.operations.PutDestinationRequest | ✔️ | The request object to use for the request. |
com.airbyte.api.models.operations.PutDestinationResponse
Error Object | Status Code | Content Type |
---|---|---|
models/errors/SDKError | 4xx-5xx | */* |