Enhance API for use by cloud to provide per-connector billing info (#7893)
* Enhance API for use by cloud to provide per-connector billing information * Add listAllConnectionsForWorkspace to include deleted * Config for list all connections * Merged master, and formatting * Formatting * Name change per PR suggestion * Name change per PR suggestion * Formatting again
This commit is contained in:
@@ -877,6 +877,30 @@ paths:
|
||||
$ref: "#/components/responses/NotFoundResponse"
|
||||
"422":
|
||||
$ref: "#/components/responses/InvalidInputResponse"
|
||||
/v1/connections/list_all:
|
||||
post:
|
||||
tags:
|
||||
- connection
|
||||
summary: Returns all connections for a workspace, including deleted connections.
|
||||
description: List connections for workspace, including deleted connections.
|
||||
operationId: listAllConnectionsForWorkspace
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/WorkspaceIdRequestBody"
|
||||
required: true
|
||||
responses:
|
||||
"200":
|
||||
description: Successful operation
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ConnectionReadList"
|
||||
"404":
|
||||
$ref: "#/components/responses/NotFoundResponse"
|
||||
"422":
|
||||
$ref: "#/components/responses/InvalidInputResponse"
|
||||
/v1/connections/get:
|
||||
post:
|
||||
tags:
|
||||
@@ -1389,7 +1413,7 @@ paths:
|
||||
post:
|
||||
tags:
|
||||
- web_backend
|
||||
summary: Returns all connections for a workspace.
|
||||
summary: Returns all non-deleted connections for a workspace.
|
||||
operationId: webBackendListConnectionsForWorkspace
|
||||
requestBody:
|
||||
content:
|
||||
@@ -1408,6 +1432,29 @@ paths:
|
||||
$ref: "#/components/responses/NotFoundResponse"
|
||||
"422":
|
||||
$ref: "#/components/responses/InvalidInputResponse"
|
||||
/v1/web_backend/connections/list_all:
|
||||
post:
|
||||
tags:
|
||||
- web_backend
|
||||
summary: Returns all connections for a workspace.
|
||||
operationId: webBackendListAllConnectionsForWorkspace
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/WorkspaceIdRequestBody"
|
||||
required: true
|
||||
responses:
|
||||
"200":
|
||||
description: Successful operation
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/WebBackendConnectionReadList"
|
||||
"404":
|
||||
$ref: "#/components/responses/NotFoundResponse"
|
||||
"422":
|
||||
$ref: "#/components/responses/InvalidInputResponse"
|
||||
/v1/web_backend/connections/get:
|
||||
post:
|
||||
tags:
|
||||
|
||||
@@ -482,6 +482,11 @@ public class ConfigurationApi implements io.airbyte.api.V1Api {
|
||||
return execute(() -> connectionsHandler.listConnectionsForWorkspace(workspaceIdRequestBody));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConnectionReadList listAllConnectionsForWorkspace(final WorkspaceIdRequestBody workspaceIdRequestBody) {
|
||||
return execute(() -> connectionsHandler.listAllConnectionsForWorkspace(workspaceIdRequestBody));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConnectionReadList searchConnections(final ConnectionSearch connectionSearch) {
|
||||
return execute(() -> connectionsHandler.searchConnections(connectionSearch));
|
||||
@@ -607,6 +612,11 @@ public class ConfigurationApi implements io.airbyte.api.V1Api {
|
||||
return execute(() -> webBackendConnectionsHandler.webBackendListConnectionsForWorkspace(workspaceIdRequestBody));
|
||||
}
|
||||
|
||||
@Override
|
||||
public WebBackendConnectionReadList webBackendListAllConnectionsForWorkspace(final WorkspaceIdRequestBody workspaceIdRequestBody) {
|
||||
return execute(() -> webBackendConnectionsHandler.webBackendListAllConnectionsForWorkspace(workspaceIdRequestBody));
|
||||
}
|
||||
|
||||
@Override
|
||||
public WebBackendConnectionReadList webBackendSearchConnections(final WebBackendConnectionSearch webBackendConnectionSearch) {
|
||||
return execute(() -> webBackendConnectionsHandler.webBackendSearchConnections(webBackendConnectionSearch));
|
||||
|
||||
@@ -236,10 +236,20 @@ public class ConnectionsHandler {
|
||||
|
||||
public ConnectionReadList listConnectionsForWorkspace(final WorkspaceIdRequestBody workspaceIdRequestBody)
|
||||
throws JsonValidationException, IOException, ConfigNotFoundException {
|
||||
return listConnectionsForWorkspace(workspaceIdRequestBody, false);
|
||||
}
|
||||
|
||||
public ConnectionReadList listAllConnectionsForWorkspace(final WorkspaceIdRequestBody workspaceIdRequestBody)
|
||||
throws JsonValidationException, IOException, ConfigNotFoundException {
|
||||
return listConnectionsForWorkspace(workspaceIdRequestBody, true);
|
||||
}
|
||||
|
||||
public ConnectionReadList listConnectionsForWorkspace(final WorkspaceIdRequestBody workspaceIdRequestBody, final boolean includeDeleted)
|
||||
throws JsonValidationException, IOException, ConfigNotFoundException {
|
||||
final List<ConnectionRead> connectionReads = Lists.newArrayList();
|
||||
|
||||
for (final StandardSync standardSync : configRepository.listStandardSyncs()) {
|
||||
if (standardSync.getStatus() == StandardSync.Status.DEPRECATED) {
|
||||
if (standardSync.getStatus() == StandardSync.Status.DEPRECATED && !includeDeleted) {
|
||||
continue;
|
||||
}
|
||||
if (!isStandardSyncInWorkspace(workspaceIdRequestBody.getWorkspaceId(), standardSync)) {
|
||||
|
||||
@@ -88,6 +88,16 @@ public class WebBackendConnectionsHandler {
|
||||
return new WebBackendConnectionReadList().connections(reads);
|
||||
}
|
||||
|
||||
public WebBackendConnectionReadList webBackendListAllConnectionsForWorkspace(final WorkspaceIdRequestBody workspaceIdRequestBody)
|
||||
throws ConfigNotFoundException, IOException, JsonValidationException {
|
||||
|
||||
final List<WebBackendConnectionRead> reads = Lists.newArrayList();
|
||||
for (final ConnectionRead connection : connectionsHandler.listAllConnectionsForWorkspace(workspaceIdRequestBody).getConnections()) {
|
||||
reads.add(buildWebBackendConnectionRead(connection));
|
||||
}
|
||||
return new WebBackendConnectionReadList().connections(reads);
|
||||
}
|
||||
|
||||
private WebBackendConnectionRead buildWebBackendConnectionRead(final ConnectionRead connectionRead)
|
||||
throws ConfigNotFoundException, IOException, JsonValidationException {
|
||||
final SourceRead source = getSourceRead(connectionRead);
|
||||
|
||||
@@ -66,12 +66,14 @@ class ConnectionsHandlerTest {
|
||||
private UUID workspaceId;
|
||||
private UUID sourceDefinitionId;
|
||||
private UUID sourceId;
|
||||
private UUID deletedSourceId;
|
||||
private UUID destinationDefinitionId;
|
||||
private UUID destinationId;
|
||||
|
||||
private SourceConnection source;
|
||||
private DestinationConnection destination;
|
||||
private StandardSync standardSync;
|
||||
private StandardSync standardSyncDeleted;
|
||||
private UUID connectionId;
|
||||
private UUID operationId;
|
||||
private StandardSyncOperation standardSyncOperation;
|
||||
@@ -109,6 +111,20 @@ class ConnectionsHandlerTest {
|
||||
.withManual(false)
|
||||
.withSchedule(ConnectionHelpers.generateBasicSchedule())
|
||||
.withResourceRequirements(WorkerUtils.DEFAULT_RESOURCE_REQUIREMENTS);
|
||||
standardSyncDeleted = new StandardSync()
|
||||
.withConnectionId(connectionId)
|
||||
.withName("presto to hudi2")
|
||||
.withNamespaceDefinition(JobSyncConfig.NamespaceDefinitionType.SOURCE)
|
||||
.withNamespaceFormat(null)
|
||||
.withPrefix("presto_to_hudi2")
|
||||
.withStatus(StandardSync.Status.DEPRECATED)
|
||||
.withCatalog(ConnectionHelpers.generateBasicConfiguredAirbyteCatalog())
|
||||
.withSourceId(sourceId)
|
||||
.withDestinationId(destinationId)
|
||||
.withOperationIds(List.of(operationId))
|
||||
.withManual(false)
|
||||
.withSchedule(ConnectionHelpers.generateBasicSchedule())
|
||||
.withResourceRequirements(WorkerUtils.DEFAULT_RESOURCE_REQUIREMENTS);
|
||||
|
||||
standardSyncOperation = new StandardSyncOperation()
|
||||
.withOperationId(operationId)
|
||||
@@ -121,6 +137,7 @@ class ConnectionsHandlerTest {
|
||||
connectionsHandler = new ConnectionsHandler(configRepository, uuidGenerator, workspaceHelper, trackingClient);
|
||||
|
||||
when(workspaceHelper.getWorkspaceForSourceIdIgnoreExceptions(sourceId)).thenReturn(workspaceId);
|
||||
when(workspaceHelper.getWorkspaceForSourceIdIgnoreExceptions(deletedSourceId)).thenReturn(workspaceId);
|
||||
when(workspaceHelper.getWorkspaceForDestinationIdIgnoreExceptions(destinationId)).thenReturn(workspaceId);
|
||||
when(workspaceHelper.getWorkspaceForOperationIdIgnoreExceptions(operationId)).thenReturn(workspaceId);
|
||||
}
|
||||
@@ -321,7 +338,7 @@ class ConnectionsHandlerTest {
|
||||
@Test
|
||||
void testListConnectionsForWorkspace() throws JsonValidationException, ConfigNotFoundException, IOException {
|
||||
when(configRepository.listStandardSyncs())
|
||||
.thenReturn(Lists.newArrayList(standardSync));
|
||||
.thenReturn(Lists.newArrayList(standardSync, standardSyncDeleted));
|
||||
when(configRepository.getSourceConnection(source.getSourceId()))
|
||||
.thenReturn(source);
|
||||
when(configRepository.getStandardSync(standardSync.getConnectionId()))
|
||||
@@ -329,10 +346,17 @@ class ConnectionsHandlerTest {
|
||||
|
||||
final WorkspaceIdRequestBody workspaceIdRequestBody = new WorkspaceIdRequestBody().workspaceId(source.getWorkspaceId());
|
||||
final ConnectionReadList actualConnectionReadList = connectionsHandler.listConnectionsForWorkspace(workspaceIdRequestBody);
|
||||
|
||||
assertEquals(1, actualConnectionReadList.getConnections().size());
|
||||
assertEquals(
|
||||
ConnectionHelpers.generateExpectedConnectionRead(standardSync),
|
||||
actualConnectionReadList.getConnections().get(0));
|
||||
|
||||
final ConnectionReadList actualConnectionReadListWithDeleted = connectionsHandler.listConnectionsForWorkspace(workspaceIdRequestBody, true);
|
||||
final List<ConnectionRead> connections = actualConnectionReadListWithDeleted.getConnections();
|
||||
assertEquals(2, connections.size());
|
||||
assertEquals(ConnectionHelpers.generateExpectedConnectionRead(standardSync), connections.get(0));
|
||||
assertEquals(ConnectionHelpers.generateExpectedConnectionRead(standardSyncDeleted), connections.get(1));
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -229,6 +229,23 @@ class WebBackendConnectionsHandlerTest {
|
||||
assertEquals(expected, WebBackendConnectionReadList.getConnections().get(0));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testWebBackendListAllConnectionsForWorkspace() throws ConfigNotFoundException, IOException, JsonValidationException {
|
||||
final WorkspaceIdRequestBody workspaceIdRequestBody = new WorkspaceIdRequestBody();
|
||||
workspaceIdRequestBody.setWorkspaceId(sourceRead.getWorkspaceId());
|
||||
|
||||
final ConnectionReadList connectionReadList = new ConnectionReadList();
|
||||
connectionReadList.setConnections(Collections.singletonList(connectionRead));
|
||||
final ConnectionIdRequestBody connectionIdRequestBody = new ConnectionIdRequestBody();
|
||||
connectionIdRequestBody.setConnectionId(connectionRead.getConnectionId());
|
||||
when(connectionsHandler.listAllConnectionsForWorkspace(workspaceIdRequestBody)).thenReturn(connectionReadList);
|
||||
when(operationsHandler.listOperationsForConnection(connectionIdRequestBody)).thenReturn(operationReadList);
|
||||
|
||||
final WebBackendConnectionReadList WebBackendConnectionReadList = wbHandler.webBackendListAllConnectionsForWorkspace(workspaceIdRequestBody);
|
||||
assertEquals(1, WebBackendConnectionReadList.getConnections().size());
|
||||
assertEquals(expected, WebBackendConnectionReadList.getConnections().get(0));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testWebBackendSearchConnections() throws ConfigNotFoundException, IOException, JsonValidationException {
|
||||
final ConnectionReadList connectionReadList = new ConnectionReadList();
|
||||
|
||||
@@ -224,6 +224,7 @@ font-style: italic;
|
||||
<li><a href="#deleteConnection"><code><span class="http-method">post</span> /v1/connections/delete</code></a></li>
|
||||
<li><a href="#getConnection"><code><span class="http-method">post</span> /v1/connections/get</code></a></li>
|
||||
<li><a href="#getState"><code><span class="http-method">post</span> /v1/state/get</code></a></li>
|
||||
<li><a href="#listAllConnectionsForWorkspace"><code><span class="http-method">post</span> /v1/connections/list_all</code></a></li>
|
||||
<li><a href="#listConnectionsForWorkspace"><code><span class="http-method">post</span> /v1/connections/list</code></a></li>
|
||||
<li><a href="#resetConnection"><code><span class="http-method">post</span> /v1/connections/reset</code></a></li>
|
||||
<li><a href="#searchConnections"><code><span class="http-method">post</span> /v1/connections/search</code></a></li>
|
||||
@@ -340,6 +341,7 @@ font-style: italic;
|
||||
<ul>
|
||||
<li><a href="#webBackendCreateConnection"><code><span class="http-method">post</span> /v1/web_backend/connections/create</code></a></li>
|
||||
<li><a href="#webBackendGetConnection"><code><span class="http-method">post</span> /v1/web_backend/connections/get</code></a></li>
|
||||
<li><a href="#webBackendListAllConnectionsForWorkspace"><code><span class="http-method">post</span> /v1/web_backend/connections/list_all</code></a></li>
|
||||
<li><a href="#webBackendListConnectionsForWorkspace"><code><span class="http-method">post</span> /v1/web_backend/connections/list</code></a></li>
|
||||
<li><a href="#webBackendSearchConnections"><code><span class="http-method">post</span> /v1/web_backend/connections/search</code></a></li>
|
||||
<li><a href="#webBackendUpdateConnection"><code><span class="http-method">post</span> /v1/web_backend/connections/update</code></a></li>
|
||||
@@ -672,6 +674,166 @@ font-style: italic;
|
||||
<a href="#InvalidInputExceptionInfo">InvalidInputExceptionInfo</a>
|
||||
</div> <!-- method -->
|
||||
<hr/>
|
||||
<div class="method"><a name="listAllConnectionsForWorkspace"/>
|
||||
<div class="method-path">
|
||||
<a class="up" href="#__Methods">Up</a>
|
||||
<pre class="post"><code class="huge"><span class="http-method">post</span> /v1/connections/list_all</code></pre></div>
|
||||
<div class="method-summary">Returns all connections for a workspace, including deleted connections. (<span class="nickname">listAllConnectionsForWorkspace</span>)</div>
|
||||
<div class="method-notes">List connections for workspace, including deleted connections.</div>
|
||||
|
||||
|
||||
<h3 class="field-label">Consumes</h3>
|
||||
This API call consumes the following media types via the <span class="header">Content-Type</span> request header:
|
||||
<ul>
|
||||
<li><code>application/json</code></li>
|
||||
</ul>
|
||||
|
||||
<h3 class="field-label">Request body</h3>
|
||||
<div class="field-items">
|
||||
<div class="param">WorkspaceIdRequestBody <a href="#WorkspaceIdRequestBody">WorkspaceIdRequestBody</a> (required)</div>
|
||||
|
||||
<div class="param-desc"><span class="param-type">Body Parameter</span> — </div>
|
||||
|
||||
</div> <!-- field-items -->
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 class="field-label">Return type</h3>
|
||||
<div class="return-type">
|
||||
<a href="#ConnectionReadList">ConnectionReadList</a>
|
||||
|
||||
</div>
|
||||
|
||||
<!--Todo: process Response Object and its headers, schema, examples -->
|
||||
|
||||
<h3 class="field-label">Example data</h3>
|
||||
<div class="example-data-content-type">Content-Type: application/json</div>
|
||||
<pre class="example"><code>{
|
||||
"connections" : [ {
|
||||
"sourceId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
|
||||
"resourceRequirements" : {
|
||||
"cpu_limit" : "cpu_limit",
|
||||
"memory_request" : "memory_request",
|
||||
"memory_limit" : "memory_limit",
|
||||
"cpu_request" : "cpu_request"
|
||||
},
|
||||
"schedule" : {
|
||||
"units" : 0,
|
||||
"timeUnit" : "minutes"
|
||||
},
|
||||
"prefix" : "prefix",
|
||||
"name" : "name",
|
||||
"syncCatalog" : {
|
||||
"streams" : [ {
|
||||
"stream" : {
|
||||
"sourceDefinedPrimaryKey" : [ [ "sourceDefinedPrimaryKey", "sourceDefinedPrimaryKey" ], [ "sourceDefinedPrimaryKey", "sourceDefinedPrimaryKey" ] ],
|
||||
"supportedSyncModes" : [ null, null ],
|
||||
"sourceDefinedCursor" : true,
|
||||
"name" : "name",
|
||||
"namespace" : "namespace",
|
||||
"defaultCursorField" : [ "defaultCursorField", "defaultCursorField" ]
|
||||
},
|
||||
"config" : {
|
||||
"aliasName" : "aliasName",
|
||||
"cursorField" : [ "cursorField", "cursorField" ],
|
||||
"selected" : true,
|
||||
"primaryKey" : [ [ "primaryKey", "primaryKey" ], [ "primaryKey", "primaryKey" ] ]
|
||||
}
|
||||
}, {
|
||||
"stream" : {
|
||||
"sourceDefinedPrimaryKey" : [ [ "sourceDefinedPrimaryKey", "sourceDefinedPrimaryKey" ], [ "sourceDefinedPrimaryKey", "sourceDefinedPrimaryKey" ] ],
|
||||
"supportedSyncModes" : [ null, null ],
|
||||
"sourceDefinedCursor" : true,
|
||||
"name" : "name",
|
||||
"namespace" : "namespace",
|
||||
"defaultCursorField" : [ "defaultCursorField", "defaultCursorField" ]
|
||||
},
|
||||
"config" : {
|
||||
"aliasName" : "aliasName",
|
||||
"cursorField" : [ "cursorField", "cursorField" ],
|
||||
"selected" : true,
|
||||
"primaryKey" : [ [ "primaryKey", "primaryKey" ], [ "primaryKey", "primaryKey" ] ]
|
||||
}
|
||||
} ]
|
||||
},
|
||||
"connectionId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
|
||||
"namespaceFormat" : "${SOURCE_NAMESPACE}",
|
||||
"operationIds" : [ null, null ],
|
||||
"destinationId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
|
||||
}, {
|
||||
"sourceId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
|
||||
"resourceRequirements" : {
|
||||
"cpu_limit" : "cpu_limit",
|
||||
"memory_request" : "memory_request",
|
||||
"memory_limit" : "memory_limit",
|
||||
"cpu_request" : "cpu_request"
|
||||
},
|
||||
"schedule" : {
|
||||
"units" : 0,
|
||||
"timeUnit" : "minutes"
|
||||
},
|
||||
"prefix" : "prefix",
|
||||
"name" : "name",
|
||||
"syncCatalog" : {
|
||||
"streams" : [ {
|
||||
"stream" : {
|
||||
"sourceDefinedPrimaryKey" : [ [ "sourceDefinedPrimaryKey", "sourceDefinedPrimaryKey" ], [ "sourceDefinedPrimaryKey", "sourceDefinedPrimaryKey" ] ],
|
||||
"supportedSyncModes" : [ null, null ],
|
||||
"sourceDefinedCursor" : true,
|
||||
"name" : "name",
|
||||
"namespace" : "namespace",
|
||||
"defaultCursorField" : [ "defaultCursorField", "defaultCursorField" ]
|
||||
},
|
||||
"config" : {
|
||||
"aliasName" : "aliasName",
|
||||
"cursorField" : [ "cursorField", "cursorField" ],
|
||||
"selected" : true,
|
||||
"primaryKey" : [ [ "primaryKey", "primaryKey" ], [ "primaryKey", "primaryKey" ] ]
|
||||
}
|
||||
}, {
|
||||
"stream" : {
|
||||
"sourceDefinedPrimaryKey" : [ [ "sourceDefinedPrimaryKey", "sourceDefinedPrimaryKey" ], [ "sourceDefinedPrimaryKey", "sourceDefinedPrimaryKey" ] ],
|
||||
"supportedSyncModes" : [ null, null ],
|
||||
"sourceDefinedCursor" : true,
|
||||
"name" : "name",
|
||||
"namespace" : "namespace",
|
||||
"defaultCursorField" : [ "defaultCursorField", "defaultCursorField" ]
|
||||
},
|
||||
"config" : {
|
||||
"aliasName" : "aliasName",
|
||||
"cursorField" : [ "cursorField", "cursorField" ],
|
||||
"selected" : true,
|
||||
"primaryKey" : [ [ "primaryKey", "primaryKey" ], [ "primaryKey", "primaryKey" ] ]
|
||||
}
|
||||
} ]
|
||||
},
|
||||
"connectionId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
|
||||
"namespaceFormat" : "${SOURCE_NAMESPACE}",
|
||||
"operationIds" : [ null, null ],
|
||||
"destinationId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
|
||||
} ]
|
||||
}</code></pre>
|
||||
|
||||
<h3 class="field-label">Produces</h3>
|
||||
This API call produces the following media types according to the <span class="header">Accept</span> request header;
|
||||
the media type will be conveyed by the <span class="header">Content-Type</span> response header.
|
||||
<ul>
|
||||
<li><code>application/json</code></li>
|
||||
</ul>
|
||||
|
||||
<h3 class="field-label">Responses</h3>
|
||||
<h4 class="field-label">200</h4>
|
||||
Successful operation
|
||||
<a href="#ConnectionReadList">ConnectionReadList</a>
|
||||
<h4 class="field-label">404</h4>
|
||||
Object with given id was not found.
|
||||
<a href="#NotFoundKnownExceptionInfo">NotFoundKnownExceptionInfo</a>
|
||||
<h4 class="field-label">422</h4>
|
||||
Input failed validation
|
||||
<a href="#InvalidInputExceptionInfo">InvalidInputExceptionInfo</a>
|
||||
</div> <!-- method -->
|
||||
<hr/>
|
||||
<div class="method"><a name="listConnectionsForWorkspace"/>
|
||||
<div class="method-path">
|
||||
<a class="up" href="#__Methods">Up</a>
|
||||
@@ -5323,11 +5485,277 @@ font-style: italic;
|
||||
<a href="#InvalidInputExceptionInfo">InvalidInputExceptionInfo</a>
|
||||
</div> <!-- method -->
|
||||
<hr/>
|
||||
<div class="method"><a name="webBackendListAllConnectionsForWorkspace"/>
|
||||
<div class="method-path">
|
||||
<a class="up" href="#__Methods">Up</a>
|
||||
<pre class="post"><code class="huge"><span class="http-method">post</span> /v1/web_backend/connections/list_all</code></pre></div>
|
||||
<div class="method-summary">Returns all connections for a workspace. (<span class="nickname">webBackendListAllConnectionsForWorkspace</span>)</div>
|
||||
<div class="method-notes"></div>
|
||||
|
||||
|
||||
<h3 class="field-label">Consumes</h3>
|
||||
This API call consumes the following media types via the <span class="header">Content-Type</span> request header:
|
||||
<ul>
|
||||
<li><code>application/json</code></li>
|
||||
</ul>
|
||||
|
||||
<h3 class="field-label">Request body</h3>
|
||||
<div class="field-items">
|
||||
<div class="param">WorkspaceIdRequestBody <a href="#WorkspaceIdRequestBody">WorkspaceIdRequestBody</a> (required)</div>
|
||||
|
||||
<div class="param-desc"><span class="param-type">Body Parameter</span> — </div>
|
||||
|
||||
</div> <!-- field-items -->
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 class="field-label">Return type</h3>
|
||||
<div class="return-type">
|
||||
<a href="#WebBackendConnectionReadList">WebBackendConnectionReadList</a>
|
||||
|
||||
</div>
|
||||
|
||||
<!--Todo: process Response Object and its headers, schema, examples -->
|
||||
|
||||
<h3 class="field-label">Example data</h3>
|
||||
<div class="example-data-content-type">Content-Type: application/json</div>
|
||||
<pre class="example"><code>{
|
||||
"connections" : [ {
|
||||
"sourceId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
|
||||
"latestSyncJobCreatedAt" : 0,
|
||||
"prefix" : "prefix",
|
||||
"destination" : {
|
||||
"connectionConfiguration" : {
|
||||
"user" : "charles"
|
||||
},
|
||||
"destinationName" : "destinationName",
|
||||
"name" : "name",
|
||||
"destinationDefinitionId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
|
||||
"destinationId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
|
||||
"workspaceId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
|
||||
},
|
||||
"isSyncing" : true,
|
||||
"source" : {
|
||||
"sourceId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
|
||||
"connectionConfiguration" : {
|
||||
"user" : "charles"
|
||||
},
|
||||
"name" : "name",
|
||||
"sourceDefinitionId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
|
||||
"sourceName" : "sourceName",
|
||||
"workspaceId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
|
||||
},
|
||||
"destinationId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
|
||||
"resourceRequirements" : {
|
||||
"cpu_limit" : "cpu_limit",
|
||||
"memory_request" : "memory_request",
|
||||
"memory_limit" : "memory_limit",
|
||||
"cpu_request" : "cpu_request"
|
||||
},
|
||||
"schedule" : {
|
||||
"units" : 0,
|
||||
"timeUnit" : "minutes"
|
||||
},
|
||||
"operations" : [ {
|
||||
"name" : "name",
|
||||
"operationId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
|
||||
"operatorConfiguration" : {
|
||||
"normalization" : {
|
||||
"option" : "basic"
|
||||
},
|
||||
"dbt" : {
|
||||
"gitRepoBranch" : "gitRepoBranch",
|
||||
"dockerImage" : "dockerImage",
|
||||
"dbtArguments" : "dbtArguments",
|
||||
"gitRepoUrl" : "gitRepoUrl"
|
||||
}
|
||||
},
|
||||
"workspaceId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
|
||||
}, {
|
||||
"name" : "name",
|
||||
"operationId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
|
||||
"operatorConfiguration" : {
|
||||
"normalization" : {
|
||||
"option" : "basic"
|
||||
},
|
||||
"dbt" : {
|
||||
"gitRepoBranch" : "gitRepoBranch",
|
||||
"dockerImage" : "dockerImage",
|
||||
"dbtArguments" : "dbtArguments",
|
||||
"gitRepoUrl" : "gitRepoUrl"
|
||||
}
|
||||
},
|
||||
"workspaceId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
|
||||
} ],
|
||||
"name" : "name",
|
||||
"syncCatalog" : {
|
||||
"streams" : [ {
|
||||
"stream" : {
|
||||
"sourceDefinedPrimaryKey" : [ [ "sourceDefinedPrimaryKey", "sourceDefinedPrimaryKey" ], [ "sourceDefinedPrimaryKey", "sourceDefinedPrimaryKey" ] ],
|
||||
"supportedSyncModes" : [ null, null ],
|
||||
"sourceDefinedCursor" : true,
|
||||
"name" : "name",
|
||||
"namespace" : "namespace",
|
||||
"defaultCursorField" : [ "defaultCursorField", "defaultCursorField" ]
|
||||
},
|
||||
"config" : {
|
||||
"aliasName" : "aliasName",
|
||||
"cursorField" : [ "cursorField", "cursorField" ],
|
||||
"selected" : true,
|
||||
"primaryKey" : [ [ "primaryKey", "primaryKey" ], [ "primaryKey", "primaryKey" ] ]
|
||||
}
|
||||
}, {
|
||||
"stream" : {
|
||||
"sourceDefinedPrimaryKey" : [ [ "sourceDefinedPrimaryKey", "sourceDefinedPrimaryKey" ], [ "sourceDefinedPrimaryKey", "sourceDefinedPrimaryKey" ] ],
|
||||
"supportedSyncModes" : [ null, null ],
|
||||
"sourceDefinedCursor" : true,
|
||||
"name" : "name",
|
||||
"namespace" : "namespace",
|
||||
"defaultCursorField" : [ "defaultCursorField", "defaultCursorField" ]
|
||||
},
|
||||
"config" : {
|
||||
"aliasName" : "aliasName",
|
||||
"cursorField" : [ "cursorField", "cursorField" ],
|
||||
"selected" : true,
|
||||
"primaryKey" : [ [ "primaryKey", "primaryKey" ], [ "primaryKey", "primaryKey" ] ]
|
||||
}
|
||||
} ]
|
||||
},
|
||||
"connectionId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
|
||||
"namespaceFormat" : "${SOURCE_NAMESPACE}",
|
||||
"operationIds" : [ null, null ]
|
||||
}, {
|
||||
"sourceId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
|
||||
"latestSyncJobCreatedAt" : 0,
|
||||
"prefix" : "prefix",
|
||||
"destination" : {
|
||||
"connectionConfiguration" : {
|
||||
"user" : "charles"
|
||||
},
|
||||
"destinationName" : "destinationName",
|
||||
"name" : "name",
|
||||
"destinationDefinitionId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
|
||||
"destinationId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
|
||||
"workspaceId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
|
||||
},
|
||||
"isSyncing" : true,
|
||||
"source" : {
|
||||
"sourceId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
|
||||
"connectionConfiguration" : {
|
||||
"user" : "charles"
|
||||
},
|
||||
"name" : "name",
|
||||
"sourceDefinitionId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
|
||||
"sourceName" : "sourceName",
|
||||
"workspaceId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
|
||||
},
|
||||
"destinationId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
|
||||
"resourceRequirements" : {
|
||||
"cpu_limit" : "cpu_limit",
|
||||
"memory_request" : "memory_request",
|
||||
"memory_limit" : "memory_limit",
|
||||
"cpu_request" : "cpu_request"
|
||||
},
|
||||
"schedule" : {
|
||||
"units" : 0,
|
||||
"timeUnit" : "minutes"
|
||||
},
|
||||
"operations" : [ {
|
||||
"name" : "name",
|
||||
"operationId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
|
||||
"operatorConfiguration" : {
|
||||
"normalization" : {
|
||||
"option" : "basic"
|
||||
},
|
||||
"dbt" : {
|
||||
"gitRepoBranch" : "gitRepoBranch",
|
||||
"dockerImage" : "dockerImage",
|
||||
"dbtArguments" : "dbtArguments",
|
||||
"gitRepoUrl" : "gitRepoUrl"
|
||||
}
|
||||
},
|
||||
"workspaceId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
|
||||
}, {
|
||||
"name" : "name",
|
||||
"operationId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
|
||||
"operatorConfiguration" : {
|
||||
"normalization" : {
|
||||
"option" : "basic"
|
||||
},
|
||||
"dbt" : {
|
||||
"gitRepoBranch" : "gitRepoBranch",
|
||||
"dockerImage" : "dockerImage",
|
||||
"dbtArguments" : "dbtArguments",
|
||||
"gitRepoUrl" : "gitRepoUrl"
|
||||
}
|
||||
},
|
||||
"workspaceId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
|
||||
} ],
|
||||
"name" : "name",
|
||||
"syncCatalog" : {
|
||||
"streams" : [ {
|
||||
"stream" : {
|
||||
"sourceDefinedPrimaryKey" : [ [ "sourceDefinedPrimaryKey", "sourceDefinedPrimaryKey" ], [ "sourceDefinedPrimaryKey", "sourceDefinedPrimaryKey" ] ],
|
||||
"supportedSyncModes" : [ null, null ],
|
||||
"sourceDefinedCursor" : true,
|
||||
"name" : "name",
|
||||
"namespace" : "namespace",
|
||||
"defaultCursorField" : [ "defaultCursorField", "defaultCursorField" ]
|
||||
},
|
||||
"config" : {
|
||||
"aliasName" : "aliasName",
|
||||
"cursorField" : [ "cursorField", "cursorField" ],
|
||||
"selected" : true,
|
||||
"primaryKey" : [ [ "primaryKey", "primaryKey" ], [ "primaryKey", "primaryKey" ] ]
|
||||
}
|
||||
}, {
|
||||
"stream" : {
|
||||
"sourceDefinedPrimaryKey" : [ [ "sourceDefinedPrimaryKey", "sourceDefinedPrimaryKey" ], [ "sourceDefinedPrimaryKey", "sourceDefinedPrimaryKey" ] ],
|
||||
"supportedSyncModes" : [ null, null ],
|
||||
"sourceDefinedCursor" : true,
|
||||
"name" : "name",
|
||||
"namespace" : "namespace",
|
||||
"defaultCursorField" : [ "defaultCursorField", "defaultCursorField" ]
|
||||
},
|
||||
"config" : {
|
||||
"aliasName" : "aliasName",
|
||||
"cursorField" : [ "cursorField", "cursorField" ],
|
||||
"selected" : true,
|
||||
"primaryKey" : [ [ "primaryKey", "primaryKey" ], [ "primaryKey", "primaryKey" ] ]
|
||||
}
|
||||
} ]
|
||||
},
|
||||
"connectionId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
|
||||
"namespaceFormat" : "${SOURCE_NAMESPACE}",
|
||||
"operationIds" : [ null, null ]
|
||||
} ]
|
||||
}</code></pre>
|
||||
|
||||
<h3 class="field-label">Produces</h3>
|
||||
This API call produces the following media types according to the <span class="header">Accept</span> request header;
|
||||
the media type will be conveyed by the <span class="header">Content-Type</span> response header.
|
||||
<ul>
|
||||
<li><code>application/json</code></li>
|
||||
</ul>
|
||||
|
||||
<h3 class="field-label">Responses</h3>
|
||||
<h4 class="field-label">200</h4>
|
||||
Successful operation
|
||||
<a href="#WebBackendConnectionReadList">WebBackendConnectionReadList</a>
|
||||
<h4 class="field-label">404</h4>
|
||||
Object with given id was not found.
|
||||
<a href="#NotFoundKnownExceptionInfo">NotFoundKnownExceptionInfo</a>
|
||||
<h4 class="field-label">422</h4>
|
||||
Input failed validation
|
||||
<a href="#InvalidInputExceptionInfo">InvalidInputExceptionInfo</a>
|
||||
</div> <!-- method -->
|
||||
<hr/>
|
||||
<div class="method"><a name="webBackendListConnectionsForWorkspace"/>
|
||||
<div class="method-path">
|
||||
<a class="up" href="#__Methods">Up</a>
|
||||
<pre class="post"><code class="huge"><span class="http-method">post</span> /v1/web_backend/connections/list</code></pre></div>
|
||||
<div class="method-summary">Returns all connections for a workspace. (<span class="nickname">webBackendListConnectionsForWorkspace</span>)</div>
|
||||
<div class="method-summary">Returns all non-deleted connections for a workspace. (<span class="nickname">webBackendListConnectionsForWorkspace</span>)</div>
|
||||
<div class="method-notes"></div>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user