diff --git a/airbyte-api/src/main/openapi/config.yaml b/airbyte-api/src/main/openapi/config.yaml index 18f7c136de4..6c40be68bd4 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 4cf5484e4d7..2421e4061c7 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 class ConfigurationApiFactory implements Factory { ConfigurationApiFactory.workerEnvironment = workerEnvironment; ConfigurationApiFactory.logConfigs = logConfigs; ConfigurationApiFactory.airbyteVersion = airbyteVersion; - ConfigurationApiFactory.httpClient = httpClient; ConfigurationApiFactory.eventRunner = eventRunner; ConfigurationApiFactory.statePersistence = statePersistence; } @@ -89,7 +87,6 @@ public class ConfigurationApiFactory implements Factory { 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 793692a87ec..cc4665702ab 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.DestinationHandler; 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; @@ -301,6 +302,8 @@ public class ServerApp implements ServerRunnable { final HealthCheckHandler healthCheckHandler = new HealthCheckHandler(configRepository); + final OAuthHandler oAuthHandler = new OAuthHandler(configRepository, httpClient, trackingClient); + final SourceHandler sourceHandler = new SourceHandler( configRepository, secretsRepositoryReader, @@ -357,6 +360,7 @@ public class ServerApp implements ServerRunnable { 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 53343cee235..3a368efa190 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.DbMigrationApiController; 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.DbMigrationBinder; 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.DestinationHandler; 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 @@ public interface ServerFactory { 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 interface ServerFactory { 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 interface ServerFactory { HealthApiFactory.setValues(healthCheckHandler); + DestinationOauthApiFactory.setValues(oAuthHandler); + + SourceOauthApiFactory.setValues(oAuthHandler); + JobsApiFactory.setValues(jobHistoryHandler, schedulerHandler); LogsApiFactory.setValues(logsHandler); @@ -181,10 +193,12 @@ public interface ServerFactory { 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 interface ServerFactory { 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 19963d88e7f..ef048a1d8d7 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.ConnectionsHandler; 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.JsonSchemaValidator; 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 class ConfigurationApi implements io.airbyte.api.generated.V1Api { final WorkerEnvironment workerEnvironment, final LogConfigs logConfigs, final AirbyteVersion airbyteVersion, - final HttpClient httpClient, final EventRunner eventRunner) { final JsonSchemaValidator schemaValidator = new JsonSchemaValidator(); @@ -215,7 +211,6 @@ public class ConfigurationApi implements io.airbyte.api.generated.V1Api { sourceHandler); jobHistoryHandler = new JobHistoryHandler(jobPersistence, workerEnvironment, logConfigs, connectionsHandler, sourceHandler, sourceDefinitionsHandler, destinationHandler, destinationDefinitionsHandler, airbyteVersion); - oAuthHandler = new OAuthHandler(configRepository, httpClient, trackingClient); webBackendConnectionsHandler = new WebBackendConnectionsHandler( connectionsHandler, stateHandler, @@ -379,40 +374,58 @@ public class ConfigurationApi implements io.airbyte.api.generated.V1Api { // 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 00000000000..0a58c40a741 --- /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 00000000000..fc454fa10cc --- /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 00000000000..ff2da2c5f0e --- /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 00000000000..744099e4cf8 --- /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 00000000000..0548b8a6b16 --- /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 00000000000..a5aef45948e --- /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 1d2e9687540..490979c4640 100644 --- a/docs/reference/api/generated-api-html/index.html +++ b/docs/reference/api/generated-api-html/index.html @@ -273,6 +273,12 @@ font-style: italic; +

DestinationOauth

+

Health

  • get /v1/health
  • @@ -300,15 +306,6 @@ font-style: italic; -

    Oauth

    -

    Openapi

    • get /v1/openapi
    • @@ -362,6 +359,12 @@ font-style: italic; +

      SourceOauth

      +

      State

      • post /v1/state/create_or_update
      • @@ -3794,6 +3797,166 @@ containing the updated stream needs to be sent. 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

        -
        -
        - 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/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/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/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


        +

        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