diff --git a/airbyte-api/src/main/openapi/config.yaml b/airbyte-api/src/main/openapi/config.yaml index 69adc4af4cb6..a787b3b63353 100644 --- a/airbyte-api/src/main/openapi/config.yaml +++ b/airbyte-api/src/main/openapi/config.yaml @@ -49,8 +49,10 @@ tags: description: Destination related resources. - name: connection description: Connection between sources and destinations. - - name: oauth - description: OAuth related resources to delegate access from user. + - name: destination_oauth + description: Source OAuth related resources to delegate access from user. + - name: source_oauth + description: Source OAuth related resources to delegate access from user. - name: db_migration description: Database migration related resources. - name: web_backend @@ -1762,7 +1764,7 @@ paths: /v1/source_oauths/oauth_params/create: post: tags: - - oauth + - source_oauth summary: > Sets instancewide variables to be used for the oauth flow when creating this source. When set, these variables will be injected into a connector's configuration before any interaction with the connector image itself. This enables running oauth flows with @@ -1785,7 +1787,7 @@ paths: /v1/source_oauths/get_consent_url: post: tags: - - oauth + - source_oauth summary: Given a source connector definition ID, return the URL to the consent screen where to redirect the user to. operationId: getSourceOAuthConsent requestBody: @@ -1808,7 +1810,7 @@ paths: /v1/source_oauths/complete_oauth: post: tags: - - oauth + - source_oauth summary: Given a source def ID generate an access/refresh token etc. operationId: completeSourceOAuth requestBody: @@ -1831,7 +1833,7 @@ paths: /v1/destination_oauths/get_consent_url: post: tags: - - oauth + - destination_oauth summary: Given a destination connector definition ID, return the URL to the consent screen where to redirect the user to. operationId: getDestinationOAuthConsent requestBody: @@ -1854,7 +1856,7 @@ paths: /v1/destination_oauths/complete_oauth: post: tags: - - oauth + - destination_oauth summary: Given a destination def ID generate an access/refresh token etc. operationId: completeDestinationOAuth requestBody: @@ -1877,7 +1879,7 @@ paths: /v1/destination_oauths/oauth_params/create: post: tags: - - oauth + - destination_oauth summary: > Sets instancewide variables to be used for the oauth flow when creating this destination. When set, these variables will be injected into a connector's configuration before any interaction with the connector image itself. This enables running oauth flows with diff --git a/airbyte-server/src/main/java/io/airbyte/server/ConfigurationApiFactory.java b/airbyte-server/src/main/java/io/airbyte/server/ConfigurationApiFactory.java index 4cf5484e4d7b..2421e4061c7a 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/ConfigurationApiFactory.java +++ b/airbyte-server/src/main/java/io/airbyte/server/ConfigurationApiFactory.java @@ -37,7 +37,6 @@ public class ConfigurationApiFactory implements Factory { private static WorkerEnvironment workerEnvironment; private static LogConfigs logConfigs; private static AirbyteVersion airbyteVersion; - private static HttpClient httpClient; private static EventRunner eventRunner; public static void setValues( @@ -69,7 +68,6 @@ public static void setValues( ConfigurationApiFactory.workerEnvironment = workerEnvironment; ConfigurationApiFactory.logConfigs = logConfigs; ConfigurationApiFactory.airbyteVersion = airbyteVersion; - ConfigurationApiFactory.httpClient = httpClient; ConfigurationApiFactory.eventRunner = eventRunner; ConfigurationApiFactory.statePersistence = statePersistence; } @@ -89,7 +87,6 @@ public ConfigurationApi provide() { ConfigurationApiFactory.workerEnvironment, ConfigurationApiFactory.logConfigs, ConfigurationApiFactory.airbyteVersion, - ConfigurationApiFactory.httpClient, ConfigurationApiFactory.eventRunner); } diff --git a/airbyte-server/src/main/java/io/airbyte/server/ServerApp.java b/airbyte-server/src/main/java/io/airbyte/server/ServerApp.java index 193c4e069446..12a4f7476f44 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/ServerApp.java +++ b/airbyte-server/src/main/java/io/airbyte/server/ServerApp.java @@ -59,6 +59,7 @@ import io.airbyte.server.handlers.HealthCheckHandler; import io.airbyte.server.handlers.JobHistoryHandler; import io.airbyte.server.handlers.LogsHandler; +import io.airbyte.server.handlers.OAuthHandler; import io.airbyte.server.handlers.OperationsHandler; import io.airbyte.server.handlers.SchedulerHandler; import io.airbyte.server.handlers.SourceDefinitionsHandler; @@ -300,6 +301,8 @@ public static ServerRunnable getServer(final ServerFactory apiFactory, final HealthCheckHandler healthCheckHandler = new HealthCheckHandler(configRepository); + final OAuthHandler oAuthHandler = new OAuthHandler(configRepository, httpClient, trackingClient); + final SourceHandler sourceHandler = new SourceHandler( configRepository, secretsRepositoryReader, @@ -356,6 +359,7 @@ public static ServerRunnable getServer(final ServerFactory apiFactory, healthCheckHandler, jobHistoryHandler, logsHandler, + oAuthHandler, operationsHandler, schedulerHandler, workspacesHandler); diff --git a/airbyte-server/src/main/java/io/airbyte/server/ServerFactory.java b/airbyte-server/src/main/java/io/airbyte/server/ServerFactory.java index 53343cee235e..3a368efa1904 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/ServerFactory.java +++ b/airbyte-server/src/main/java/io/airbyte/server/ServerFactory.java @@ -21,6 +21,7 @@ import io.airbyte.server.apis.DestinationApiController; import io.airbyte.server.apis.DestinationDefinitionApiController; import io.airbyte.server.apis.DestinationDefinitionSpecificationApiController; +import io.airbyte.server.apis.DestinationOauthApiController; import io.airbyte.server.apis.HealthApiController; import io.airbyte.server.apis.JobsApiController; import io.airbyte.server.apis.LogsApiController; @@ -31,20 +32,24 @@ import io.airbyte.server.apis.binders.DestinationApiBinder; import io.airbyte.server.apis.binders.DestinationDefinitionApiBinder; import io.airbyte.server.apis.binders.DestinationDefinitionSpecificationApiBinder; +import io.airbyte.server.apis.binders.DestinationOauthApiBinder; import io.airbyte.server.apis.binders.HealthApiBinder; import io.airbyte.server.apis.binders.JobsApiBinder; import io.airbyte.server.apis.binders.LogsApiBinder; import io.airbyte.server.apis.binders.NotificationApiBinder; +import io.airbyte.server.apis.binders.SourceOauthApiBinder; import io.airbyte.server.apis.factories.AttemptApiFactory; import io.airbyte.server.apis.factories.ConnectionApiFactory; import io.airbyte.server.apis.factories.DbMigrationApiFactory; import io.airbyte.server.apis.factories.DestinationApiFactory; import io.airbyte.server.apis.factories.DestinationDefinitionApiFactory; import io.airbyte.server.apis.factories.DestinationDefinitionSpecificationApiFactory; +import io.airbyte.server.apis.factories.DestinationOauthApiFactory; import io.airbyte.server.apis.factories.HealthApiFactory; import io.airbyte.server.apis.factories.JobsApiFactory; import io.airbyte.server.apis.factories.LogsApiFactory; import io.airbyte.server.apis.factories.NotificationsApiFactory; +import io.airbyte.server.apis.factories.SourceOauthApiFactory; import io.airbyte.server.handlers.AttemptHandler; import io.airbyte.server.handlers.ConnectionsHandler; import io.airbyte.server.handlers.DbMigrationHandler; @@ -53,6 +58,7 @@ import io.airbyte.server.handlers.HealthCheckHandler; import io.airbyte.server.handlers.JobHistoryHandler; import io.airbyte.server.handlers.LogsHandler; +import io.airbyte.server.handlers.OAuthHandler; import io.airbyte.server.handlers.OperationsHandler; import io.airbyte.server.handlers.SchedulerHandler; import io.airbyte.server.handlers.WorkspacesHandler; @@ -91,6 +97,7 @@ ServerRunnable create(final SynchronousSchedulerClient synchronousSchedulerClien final HealthCheckHandler healthCheckHandler, final JobHistoryHandler jobHistoryHandler, final LogsHandler logsHandler, + final OAuthHandler oAuthHandler, final OperationsHandler operationsHandler, final SchedulerHandler schedulerHandler, final WorkspacesHandler workspacesHandler); @@ -122,6 +129,7 @@ public ServerRunnable create(final SynchronousSchedulerClient synchronousSchedul final HealthCheckHandler healthCheckHandler, final JobHistoryHandler jobHistoryHandler, final LogsHandler logsHandler, + final OAuthHandler oAuthHandler, final OperationsHandler operationsHandler, final SchedulerHandler schedulerHandler, final WorkspacesHandler workspacesHandler) { @@ -166,6 +174,10 @@ public ServerRunnable create(final SynchronousSchedulerClient synchronousSchedul HealthApiFactory.setValues(healthCheckHandler); + DestinationOauthApiFactory.setValues(oAuthHandler); + + SourceOauthApiFactory.setValues(oAuthHandler); + JobsApiFactory.setValues(jobHistoryHandler, schedulerHandler); LogsApiFactory.setValues(logsHandler); @@ -181,10 +193,12 @@ public ServerRunnable create(final SynchronousSchedulerClient synchronousSchedul DestinationApiController.class, DestinationDefinitionApiController.class, DestinationDefinitionSpecificationApiController.class, + DestinationOauthApiController.class, HealthApiController.class, JobsApiController.class, LogsApiController.class, - NotificationsApiController.class); + NotificationsApiController.class, + SourceOauthApiFactory.class); final Set components = Set.of( new CorsFilter(), @@ -195,10 +209,12 @@ public ServerRunnable create(final SynchronousSchedulerClient synchronousSchedul new DestinationApiBinder(), new DestinationDefinitionApiBinder(), new DestinationDefinitionSpecificationApiBinder(), + new DestinationOauthApiBinder(), new HealthApiBinder(), new JobsApiBinder(), new LogsApiBinder(), - new NotificationApiBinder()); + new NotificationApiBinder(), + new SourceOauthApiBinder()); // construct server return new ServerApp(airbyteVersion, componentClasses, components); diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/ConfigurationApi.java b/airbyte-server/src/main/java/io/airbyte/server/apis/ConfigurationApi.java index 81eeab6ec982..52c6b2907cee 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/apis/ConfigurationApi.java +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/ConfigurationApi.java @@ -117,7 +117,6 @@ import io.airbyte.server.handlers.DestinationDefinitionsHandler; import io.airbyte.server.handlers.DestinationHandler; import io.airbyte.server.handlers.JobHistoryHandler; -import io.airbyte.server.handlers.OAuthHandler; import io.airbyte.server.handlers.OpenApiConfigHandler; import io.airbyte.server.handlers.OperationsHandler; import io.airbyte.server.handlers.SchedulerHandler; @@ -133,7 +132,6 @@ import io.airbyte.validation.json.JsonValidationException; import java.io.File; import java.io.IOException; -import java.net.http.HttpClient; import java.util.Map; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.NotImplementedException; @@ -155,7 +153,6 @@ public class ConfigurationApi implements io.airbyte.api.generated.V1Api { private final WebBackendConnectionsHandler webBackendConnectionsHandler; private final WebBackendGeographiesHandler webBackendGeographiesHandler; private final OpenApiConfigHandler openApiConfigHandler; - private final OAuthHandler oAuthHandler; public ConfigurationApi(final ConfigRepository configRepository, final JobPersistence jobPersistence, @@ -167,7 +164,6 @@ public ConfigurationApi(final ConfigRepository configRepository, final WorkerEnvironment workerEnvironment, final LogConfigs logConfigs, final AirbyteVersion airbyteVersion, - final HttpClient httpClient, final EventRunner eventRunner) { final JsonSchemaValidator schemaValidator = new JsonSchemaValidator(); @@ -213,7 +209,6 @@ public ConfigurationApi(final ConfigRepository configRepository, sourceHandler); jobHistoryHandler = new JobHistoryHandler(jobPersistence, workerEnvironment, logConfigs, connectionsHandler, sourceHandler, sourceDefinitionsHandler, destinationHandler, destinationDefinitionsHandler, airbyteVersion); - oAuthHandler = new OAuthHandler(configRepository, httpClient, trackingClient); webBackendConnectionsHandler = new WebBackendConnectionsHandler( connectionsHandler, stateHandler, @@ -377,40 +372,58 @@ public SourceDefinitionSpecificationRead getSourceDefinitionSpecification(final // OAUTH + /** + * This implementation has been moved to {@link SourceOauthApiController}. Since the path of + * {@link SourceOauthApiController} is more granular, it will override this implementation + */ @Override public OAuthConsentRead getSourceOAuthConsent(final SourceOauthConsentRequest sourceOauthConsentRequest) { - return execute(() -> oAuthHandler.getSourceOAuthConsent(sourceOauthConsentRequest)); + throw new NotImplementedException(); } + /** + * This implementation has been moved to {@link SourceOauthApiController}. Since the path of + * {@link SourceOauthApiController} is more granular, it will override this implementation + */ @Override public Map completeSourceOAuth(final CompleteSourceOauthRequest completeSourceOauthRequest) { - return execute(() -> oAuthHandler.completeSourceOAuth(completeSourceOauthRequest)); + throw new NotImplementedException(); } + /** + * This implementation has been moved to {@link DestinationOauthApiController}. Since the path of + * {@link DestinationOauthApiController} is more granular, it will override this implementation + */ @Override public OAuthConsentRead getDestinationOAuthConsent(final DestinationOauthConsentRequest destinationOauthConsentRequest) { - return execute(() -> oAuthHandler.getDestinationOAuthConsent(destinationOauthConsentRequest)); + throw new NotImplementedException(); } + /** + * This implementation has been moved to {@link DestinationOauthApiController}. Since the path of + * {@link DestinationOauthApiController} is more granular, it will override this implementation + */ @Override public Map completeDestinationOAuth(final CompleteDestinationOAuthRequest requestBody) { - return execute(() -> oAuthHandler.completeDestinationOAuth(requestBody)); + throw new NotImplementedException(); } + /** + * This implementation has been moved to {@link DestinationOauthApiController}. Since the path of + * {@link DestinationOauthApiController} is more granular, it will override this implementation + */ @Override public void setInstancewideDestinationOauthParams(final SetInstancewideDestinationOauthParamsRequestBody requestBody) { - execute(() -> { - oAuthHandler.setDestinationInstancewideOauthParams(requestBody); - return null; - }); + throw new NotImplementedException(); } + /** + * This implementation has been moved to {@link SourceOauthApiController}. Since the path of + * {@link SourceOauthApiController} is more granular, it will override this implementation + */ @Override public void setInstancewideSourceOauthParams(final SetInstancewideSourceOauthParamsRequestBody requestBody) { - execute(() -> { - oAuthHandler.setSourceInstancewideOauthParams(requestBody); - return null; - }); + throw new NotImplementedException(); } /** diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/DestinationOauthApiController.java b/airbyte-server/src/main/java/io/airbyte/server/apis/DestinationOauthApiController.java new file mode 100644 index 000000000000..0a58c40a7413 --- /dev/null +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/DestinationOauthApiController.java @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2022 Airbyte, Inc., all rights reserved. + */ + +package io.airbyte.server.apis; + +import io.airbyte.api.generated.DestinationOauthApi; +import io.airbyte.api.model.generated.CompleteDestinationOAuthRequest; +import io.airbyte.api.model.generated.DestinationOauthConsentRequest; +import io.airbyte.api.model.generated.OAuthConsentRead; +import io.airbyte.api.model.generated.SetInstancewideDestinationOauthParamsRequestBody; +import io.airbyte.server.handlers.OAuthHandler; +import java.util.Map; +import javax.ws.rs.Path; +import lombok.AllArgsConstructor; + +@Path("/v1/destination_oauths") +@AllArgsConstructor +public class DestinationOauthApiController implements DestinationOauthApi { + + private final OAuthHandler oAuthHandler; + + @Override + public Map completeDestinationOAuth(final CompleteDestinationOAuthRequest completeDestinationOAuthRequest) { + return ConfigurationApi.execute(() -> oAuthHandler.completeDestinationOAuth(completeDestinationOAuthRequest)); + } + + @Override + public OAuthConsentRead getDestinationOAuthConsent(final DestinationOauthConsentRequest destinationOauthConsentRequest) { + return ConfigurationApi.execute(() -> oAuthHandler.getDestinationOAuthConsent(destinationOauthConsentRequest)); + } + + @Override + public void setInstancewideDestinationOauthParams(final SetInstancewideDestinationOauthParamsRequestBody setInstancewideDestinationOauthParamsRequestBody) { + ConfigurationApi.execute(() -> { + oAuthHandler.setDestinationInstancewideOauthParams(setInstancewideDestinationOauthParamsRequestBody); + return null; + }); + } + +} diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/SourceOauthApiController.java b/airbyte-server/src/main/java/io/airbyte/server/apis/SourceOauthApiController.java new file mode 100644 index 000000000000..fc454fa10cc9 --- /dev/null +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/SourceOauthApiController.java @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2022 Airbyte, Inc., all rights reserved. + */ + +package io.airbyte.server.apis; + +import io.airbyte.api.generated.SourceOauthApi; +import io.airbyte.api.model.generated.CompleteSourceOauthRequest; +import io.airbyte.api.model.generated.OAuthConsentRead; +import io.airbyte.api.model.generated.SetInstancewideSourceOauthParamsRequestBody; +import io.airbyte.api.model.generated.SourceOauthConsentRequest; +import io.airbyte.server.handlers.OAuthHandler; +import java.util.Map; +import javax.ws.rs.Path; +import lombok.AllArgsConstructor; + +@Path("/v1/source_oauths") +@AllArgsConstructor +public class SourceOauthApiController implements SourceOauthApi { + + private final OAuthHandler oAuthHandler; + + @Override + public Map completeSourceOAuth(final CompleteSourceOauthRequest completeSourceOauthRequest) { + return ConfigurationApi.execute(() -> oAuthHandler.completeSourceOAuth(completeSourceOauthRequest)); + } + + @Override + public OAuthConsentRead getSourceOAuthConsent(final SourceOauthConsentRequest sourceOauthConsentRequest) { + return ConfigurationApi.execute(() -> oAuthHandler.getSourceOAuthConsent(sourceOauthConsentRequest)); + } + + @Override + public void setInstancewideSourceOauthParams(final SetInstancewideSourceOauthParamsRequestBody setInstancewideSourceOauthParamsRequestBody) { + ConfigurationApi.execute(() -> { + oAuthHandler.setSourceInstancewideOauthParams(setInstancewideSourceOauthParamsRequestBody); + return null; + }); + } + +} diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/binders/DestinationOauthApiBinder.java b/airbyte-server/src/main/java/io/airbyte/server/apis/binders/DestinationOauthApiBinder.java new file mode 100644 index 000000000000..ff2da2c5f0e8 --- /dev/null +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/binders/DestinationOauthApiBinder.java @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2022 Airbyte, Inc., all rights reserved. + */ + +package io.airbyte.server.apis.binders; + +import io.airbyte.server.apis.DestinationOauthApiController; +import io.airbyte.server.apis.factories.DestinationOauthApiFactory; +import org.glassfish.hk2.utilities.binding.AbstractBinder; +import org.glassfish.jersey.process.internal.RequestScoped; + +public class DestinationOauthApiBinder extends AbstractBinder { + + @Override + protected void configure() { + bindFactory(DestinationOauthApiFactory.class) + .to(DestinationOauthApiController.class) + .in(RequestScoped.class); + } + +} diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/binders/SourceOauthApiBinder.java b/airbyte-server/src/main/java/io/airbyte/server/apis/binders/SourceOauthApiBinder.java new file mode 100644 index 000000000000..744099e4cf80 --- /dev/null +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/binders/SourceOauthApiBinder.java @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2022 Airbyte, Inc., all rights reserved. + */ + +package io.airbyte.server.apis.binders; + +import io.airbyte.server.apis.SourceOauthApiController; +import io.airbyte.server.apis.factories.SourceOauthApiFactory; +import org.glassfish.hk2.utilities.binding.AbstractBinder; +import org.glassfish.jersey.process.internal.RequestScoped; + +public class SourceOauthApiBinder extends AbstractBinder { + + @Override + protected void configure() { + bindFactory(SourceOauthApiFactory.class) + .to(SourceOauthApiController.class) + .in(RequestScoped.class); + } + +} diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/factories/DestinationOauthApiFactory.java b/airbyte-server/src/main/java/io/airbyte/server/apis/factories/DestinationOauthApiFactory.java new file mode 100644 index 000000000000..0548b8a6b16e --- /dev/null +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/factories/DestinationOauthApiFactory.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2022 Airbyte, Inc., all rights reserved. + */ + +package io.airbyte.server.apis.factories; + +import io.airbyte.server.apis.DestinationOauthApiController; +import io.airbyte.server.handlers.OAuthHandler; +import org.glassfish.hk2.api.Factory; + +public class DestinationOauthApiFactory implements Factory { + + private static OAuthHandler oAuthHandler; + + public static void setValues(final OAuthHandler oAuthHandler) { + DestinationOauthApiFactory.oAuthHandler = oAuthHandler; + } + + @Override + public DestinationOauthApiController provide() { + return new DestinationOauthApiController(oAuthHandler); + } + + @Override + public void dispose(final DestinationOauthApiController instance) { + /* no op */ + } + +} diff --git a/airbyte-server/src/main/java/io/airbyte/server/apis/factories/SourceOauthApiFactory.java b/airbyte-server/src/main/java/io/airbyte/server/apis/factories/SourceOauthApiFactory.java new file mode 100644 index 000000000000..a5aef45948ec --- /dev/null +++ b/airbyte-server/src/main/java/io/airbyte/server/apis/factories/SourceOauthApiFactory.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2022 Airbyte, Inc., all rights reserved. + */ + +package io.airbyte.server.apis.factories; + +import io.airbyte.server.apis.SourceOauthApiController; +import io.airbyte.server.handlers.OAuthHandler; +import org.glassfish.hk2.api.Factory; + +public class SourceOauthApiFactory implements Factory { + + private static OAuthHandler oAuthHandler; + + public static void setValues(final OAuthHandler oAuthHandler) { + SourceOauthApiFactory.oAuthHandler = oAuthHandler; + } + + @Override + public SourceOauthApiController provide() { + return new SourceOauthApiController(SourceOauthApiFactory.oAuthHandler); + } + + @Override + public void dispose(final SourceOauthApiController instance) { + /* no op */ + } + +} diff --git a/docs/reference/api/generated-api-html/index.html b/docs/reference/api/generated-api-html/index.html index 92bd602330f3..19a3bd5f9fec 100644 --- a/docs/reference/api/generated-api-html/index.html +++ b/docs/reference/api/generated-api-html/index.html @@ -273,6 +273,12 @@

DestinationDefinitionSpecifica +

DestinationOauth

+

Health

  • get /v1/health
  • @@ -300,15 +306,6 @@

    Notifications

    -

    Oauth

    -

    Openapi

    +

    SourceOauth

    +

    State

    • post /v1/state/create_or_update
    • @@ -3794,6 +3797,166 @@

      422

      InvalidInputExceptionInfo
      +

      DestinationOauth

      +
      +
      + Up +
      post /v1/destination_oauths/complete_oauth
      +
      Given a destination def ID generate an access/refresh token etc. (completeDestinationOAuth)
      +
      + + +

      Consumes

      + This API call consumes the following media types via the Content-Type request header: +
        +
      • application/json
      • +
      + +

      Request body

      +
      +
      CompleteDestinationOAuthRequest CompleteDestinationOAuthRequest (required)
      + +
      Body Parameter
      + +
      + + + + +

      Return type

      +
      + + map[String, oas_any_type_not_mapped] +
      + + + + +

      Produces

      + This API call produces the following media types according to the Accept request header; + the media type will be conveyed by the Content-Type response header. +
        +
      • application/json
      • +
      + +

      Responses

      +

      200

      + Successful operation + +

      404

      + Object with given id was not found. + NotFoundKnownExceptionInfo +

      422

      + Input failed validation + InvalidInputExceptionInfo +
      +
      +
      +
      + Up +
      post /v1/destination_oauths/get_consent_url
      +
      Given a destination connector definition ID, return the URL to the consent screen where to redirect the user to. (getDestinationOAuthConsent)
      +
      + + +

      Consumes

      + This API call consumes the following media types via the Content-Type request header: +
        +
      • application/json
      • +
      + +

      Request body

      +
      +
      DestinationOauthConsentRequest DestinationOauthConsentRequest (required)
      + +
      Body Parameter
      + +
      + + + + +

      Return type

      + + + + +

      Example data

      +
      Content-Type: application/json
      +
      {
      +  "consentUrl" : "consentUrl"
      +}
      + +

      Produces

      + This API call produces the following media types according to the Accept request header; + the media type will be conveyed by the Content-Type response header. +
        +
      • application/json
      • +
      + +

      Responses

      +

      200

      + Successful operation + OAuthConsentRead +

      404

      + Object with given id was not found. + NotFoundKnownExceptionInfo +

      422

      + Input failed validation + InvalidInputExceptionInfo +
      +
      +
      +
      + Up +
      post /v1/destination_oauths/oauth_params/create
      +
      Sets instancewide variables to be used for the oauth flow when creating this destination. When set, these variables will be injected into a connector's configuration before any interaction with the connector image itself. This enables running oauth flows with consistent variables e.g: the company's Google Ads developer_token, client_id, and client_secret without the user having to know about these variables. (setInstancewideDestinationOauthParams)
      +
      + + +

      Consumes

      + This API call consumes the following media types via the Content-Type request header: +
        +
      • application/json
      • +
      + +

      Request body

      +
      +
      SetInstancewideDestinationOauthParamsRequestBody SetInstancewideDestinationOauthParamsRequestBody (required)
      + +
      Body Parameter
      + +
      + + + + + + + + +

      Produces

      + This API call produces the following media types according to the Accept request header; + the media type will be conveyed by the Content-Type response header. +
        +
      • application/json
      • +
      + +

      Responses

      +

      200

      + Successful + +

      400

      + Exception occurred; see message for details. + KnownExceptionInfo +

      404

      + Object with given id was not found. + NotFoundKnownExceptionInfo +
      +

      Health


      -

      Oauth

      -
      +

      Openapi

      +
      Up -
      post /v1/destination_oauths/complete_oauth
      -
      Given a destination def ID generate an access/refresh token etc. (completeDestinationOAuth)
      +
      get /v1/openapi
      +
      Returns the openapi specification (getOpenApiSpec)
      -

      Consumes

      - This API call consumes the following media types via the Content-Type request header: -
        -
      • application/json
      • -
      - -

      Request body

      -
      -
      CompleteDestinationOAuthRequest CompleteDestinationOAuthRequest (required)
      - -
      Body Parameter
      -
      @@ -5170,7 +5321,7 @@

      Request body

      Return type

      - map[String, oas_any_type_not_mapped] + File
      @@ -5180,26 +5331,21 @@

      Produces

      This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
        -
      • application/json
      • +
      • text/plain

      Responses

      200

      - Successful operation - -

      404

      - Object with given id was not found. - NotFoundKnownExceptionInfo -

      422

      - Input failed validation - InvalidInputExceptionInfo + Returns the openapi specification file + File

      -
      +

      Operation

      +
      Up -
      post /v1/source_oauths/complete_oauth
      -
      Given a source def ID generate an access/refresh token etc. (completeSourceOAuth)
      +
      post /v1/operations/check
      +
      Check if an operation to be created is valid (checkOperation)
      @@ -5211,7 +5357,7 @@

      Consumes

      Request body

      -
      CompleteSourceOauthRequest CompleteSourceOauthRequest (required)
      +
      OperatorConfiguration OperatorConfiguration (required)
      Body Parameter
      @@ -5222,12 +5368,18 @@

      Request body

      Return type

      + CheckOperationRead - map[String, oas_any_type_not_mapped]
      +

      Example data

      +
      Content-Type: application/json
      +
      {
      +  "message" : "message",
      +  "status" : "succeeded"
      +}

      Produces

      This API call produces the following media types according to the Accept request header; @@ -5239,20 +5391,17 @@

      Produces

      Responses

      200

      Successful operation - -

      404

      - Object with given id was not found. - NotFoundKnownExceptionInfo + CheckOperationRead

      422

      Input failed validation InvalidInputExceptionInfo

      -
      +
      Up -
      post /v1/destination_oauths/get_consent_url
      -
      Given a destination connector definition ID, return the URL to the consent screen where to redirect the user to. (getDestinationOAuthConsent)
      +
      post /v1/operations/create
      +
      Create an operation to be applied as part of a connection pipeline (createOperation)
      @@ -5264,7 +5413,7 @@

      Consumes

      Request body

      -
      DestinationOauthConsentRequest DestinationOauthConsentRequest (required)
      +
      OperationCreate OperationCreate (required)
      Body Parameter
      @@ -5275,312 +5424,7 @@

      Request body

      Return type

      - - - -

      Example data

      -
      Content-Type: application/json
      -
      {
      -  "consentUrl" : "consentUrl"
      -}
      - -

      Produces

      - This API call produces the following media types according to the Accept request header; - the media type will be conveyed by the Content-Type response header. -
        -
      • application/json
      • -
      - -

      Responses

      -

      200

      - Successful operation - OAuthConsentRead -

      404

      - Object with given id was not found. - NotFoundKnownExceptionInfo -

      422

      - Input failed validation - InvalidInputExceptionInfo -
      -
      -
      -
      - Up -
      post /v1/source_oauths/get_consent_url
      -
      Given a source connector definition ID, return the URL to the consent screen where to redirect the user to. (getSourceOAuthConsent)
      -
      - - -

      Consumes

      - This API call consumes the following media types via the Content-Type request header: -
        -
      • application/json
      • -
      - -

      Request body

      -
      -
      SourceOauthConsentRequest SourceOauthConsentRequest (required)
      - -
      Body Parameter
      - -
      - - - - -

      Return type

      - - - - -

      Example data

      -
      Content-Type: application/json
      -
      {
      -  "consentUrl" : "consentUrl"
      -}
      - -

      Produces

      - This API call produces the following media types according to the Accept request header; - the media type will be conveyed by the Content-Type response header. -
        -
      • application/json
      • -
      - -

      Responses

      -

      200

      - Successful operation - OAuthConsentRead -

      404

      - Object with given id was not found. - NotFoundKnownExceptionInfo -

      422

      - Input failed validation - InvalidInputExceptionInfo -
      -
      -
      -
      - Up -
      post /v1/destination_oauths/oauth_params/create
      -
      Sets instancewide variables to be used for the oauth flow when creating this destination. When set, these variables will be injected into a connector's configuration before any interaction with the connector image itself. This enables running oauth flows with consistent variables e.g: the company's Google Ads developer_token, client_id, and client_secret without the user having to know about these variables. (setInstancewideDestinationOauthParams)
      -
      - - -

      Consumes

      - This API call consumes the following media types via the Content-Type request header: -
        -
      • application/json
      • -
      - -

      Request body

      -
      -
      SetInstancewideDestinationOauthParamsRequestBody SetInstancewideDestinationOauthParamsRequestBody (required)
      - -
      Body Parameter
      - -
      - - - - - - - - -

      Produces

      - This API call produces the following media types according to the Accept request header; - the media type will be conveyed by the Content-Type response header. -
        -
      • application/json
      • -
      - -

      Responses

      -

      200

      - Successful - -

      400

      - Exception occurred; see message for details. - KnownExceptionInfo -

      404

      - Object with given id was not found. - NotFoundKnownExceptionInfo -
      -
      -
      -
      - Up -
      post /v1/source_oauths/oauth_params/create
      -
      Sets instancewide variables to be used for the oauth flow when creating this source. When set, these variables will be injected into a connector's configuration before any interaction with the connector image itself. This enables running oauth flows with consistent variables e.g: the company's Google Ads developer_token, client_id, and client_secret without the user having to know about these variables. (setInstancewideSourceOauthParams)
      -
      - - -

      Consumes

      - This API call consumes the following media types via the Content-Type request header: -
        -
      • application/json
      • -
      - -

      Request body

      -
      -
      SetInstancewideSourceOauthParamsRequestBody SetInstancewideSourceOauthParamsRequestBody (required)
      - -
      Body Parameter
      - -
      - - - - - - - - -

      Produces

      - This API call produces the following media types according to the Accept request header; - the media type will be conveyed by the Content-Type response header. -
        -
      • application/json
      • -
      - -

      Responses

      -

      200

      - Successful - -

      400

      - Exception occurred; see message for details. - KnownExceptionInfo -

      404

      - Object with given id was not found. - NotFoundKnownExceptionInfo -
      -
      -

      Openapi

      -
      -
      - Up -
      get /v1/openapi
      -
      Returns the openapi specification (getOpenApiSpec)
      -
      - - - - - - - -

      Return type

      -
      - - File -
      - - - - -

      Produces

      - This API call produces the following media types according to the Accept request header; - the media type will be conveyed by the Content-Type response header. -
        -
      • text/plain
      • -
      - -

      Responses

      -

      200

      - Returns the openapi specification file - File -
      -
      -

      Operation

      -
      -
      - Up -
      post /v1/operations/check
      -
      Check if an operation to be created is valid (checkOperation)
      -
      - - -

      Consumes

      - This API call consumes the following media types via the Content-Type request header: -
        -
      • application/json
      • -
      - -

      Request body

      -
      -
      OperatorConfiguration OperatorConfiguration (required)
      - -
      Body Parameter
      - -
      - - - - -

      Return type

      - - - - -

      Example data

      -
      Content-Type: application/json
      -
      {
      -  "message" : "message",
      -  "status" : "succeeded"
      -}
      - -

      Produces

      - This API call produces the following media types according to the Accept request header; - the media type will be conveyed by the Content-Type response header. -
        -
      • application/json
      • -
      - -

      Responses

      -

      200

      - Successful operation - CheckOperationRead -

      422

      - Input failed validation - InvalidInputExceptionInfo -
      -
      -
      -
      - Up -
      post /v1/operations/create
      -
      Create an operation to be applied as part of a connection pipeline (createOperation)
      -
      - - -

      Consumes

      - This API call consumes the following media types via the Content-Type request header: -
        -
      • application/json
      • -
      - -

      Request body

      -
      -
      OperationCreate OperationCreate (required)
      - -
      Body Parameter
      - -
      - - - - -

      Return type

      - @@ -8162,6 +8006,166 @@

      422

      InvalidInputExceptionInfo

      +

      SourceOauth

      +
      +
      + Up +
      post /v1/source_oauths/complete_oauth
      +
      Given a source def ID generate an access/refresh token etc. (completeSourceOAuth)
      +
      + + +

      Consumes

      + This API call consumes the following media types via the Content-Type request header: +
        +
      • application/json
      • +
      + +

      Request body

      +
      +
      CompleteSourceOauthRequest CompleteSourceOauthRequest (required)
      + +
      Body Parameter
      + +
      + + + + +

      Return type

      +
      + + map[String, oas_any_type_not_mapped] +
      + + + + +

      Produces

      + This API call produces the following media types according to the Accept request header; + the media type will be conveyed by the Content-Type response header. +
        +
      • application/json
      • +
      + +

      Responses

      +

      200

      + Successful operation + +

      404

      + Object with given id was not found. + NotFoundKnownExceptionInfo +

      422

      + Input failed validation + InvalidInputExceptionInfo +
      +
      +
      +
      + Up +
      post /v1/source_oauths/get_consent_url
      +
      Given a source connector definition ID, return the URL to the consent screen where to redirect the user to. (getSourceOAuthConsent)
      +
      + + +

      Consumes

      + This API call consumes the following media types via the Content-Type request header: +
        +
      • application/json
      • +
      + +

      Request body

      +
      +
      SourceOauthConsentRequest SourceOauthConsentRequest (required)
      + +
      Body Parameter
      + +
      + + + + +

      Return type

      + + + + +

      Example data

      +
      Content-Type: application/json
      +
      {
      +  "consentUrl" : "consentUrl"
      +}
      + +

      Produces

      + This API call produces the following media types according to the Accept request header; + the media type will be conveyed by the Content-Type response header. +
        +
      • application/json
      • +
      + +

      Responses

      +

      200

      + Successful operation + OAuthConsentRead +

      404

      + Object with given id was not found. + NotFoundKnownExceptionInfo +

      422

      + Input failed validation + InvalidInputExceptionInfo +
      +
      +
      +
      + Up +
      post /v1/source_oauths/oauth_params/create
      +
      Sets instancewide variables to be used for the oauth flow when creating this source. When set, these variables will be injected into a connector's configuration before any interaction with the connector image itself. This enables running oauth flows with consistent variables e.g: the company's Google Ads developer_token, client_id, and client_secret without the user having to know about these variables. (setInstancewideSourceOauthParams)
      +
      + + +

      Consumes

      + This API call consumes the following media types via the Content-Type request header: +
        +
      • application/json
      • +
      + +

      Request body

      +
      +
      SetInstancewideSourceOauthParamsRequestBody SetInstancewideSourceOauthParamsRequestBody (required)
      + +
      Body Parameter
      + +
      + + + + + + + + +

      Produces

      + This API call produces the following media types according to the Accept request header; + the media type will be conveyed by the Content-Type response header. +
        +
      • application/json
      • +
      + +

      Responses

      +

      200

      + Successful + +

      400

      + Exception occurred; see message for details. + KnownExceptionInfo +

      404

      + Object with given id was not found. + NotFoundKnownExceptionInfo +
      +

      State