Skip to content

Commit

Permalink
Revert "Provide the FullExecutionStatus and more flags in queryDescri…
Browse files Browse the repository at this point in the history
…ption"
  • Loading branch information
awildturtok authored Jun 1, 2022
1 parent e0f7fc3 commit d9c5d04
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ public ExternalUploadResult uploadEntities(Subject subject, Dataset dataset, Ext
* @return
* @implNote we don't do anything special here, this request could also be made manually. We however want to encapsulate this behaviour to shield the frontend from knowing too much about the query engine.
*/
public FullExecutionStatus getSingleEntityExport(Subject subject, UriBuilder uriBuilder, String idKind, String entity, List<Connector> sources, Dataset dataset, Range<LocalDate> dateRange) {
public List<URL> getSingleEntityExport(Subject subject, UriBuilder uriBuilder, String idKind, String entity, List<Connector> sources, Dataset dataset, Range<LocalDate> dateRange) {

final ConceptQuery entitySelectQuery =
new ConceptQuery(new CQDateRestriction(Objects.requireNonNullElse(dateRange, Range.all()), new CQExternal(List.of(idKind), new String[][]{{"HEAD"}, {entity}})));
Expand Down Expand Up @@ -423,7 +423,7 @@ public FullExecutionStatus getSingleEntityExport(Subject subject, UriBuilder uri


// Use the provided format name to find the respective provider.
return getQueryFullStatus(execution, subject, uriBuilder, true);
return getDownloadUrls(config.getResultProviders(), execution, uriBuilder, true);

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import static com.bakdata.conquery.resources.ResourceConstants.DATASET;
import static com.bakdata.conquery.resources.ResourceConstants.QUERY;

import java.net.URL;
import java.time.LocalDate;
import java.util.List;
import java.util.Optional;
Expand Down Expand Up @@ -159,7 +160,7 @@ public static class EntityPreview {

@POST
@Path("/entity")
public FullExecutionStatus getEntityData(@Auth Subject subject, EntityPreview query, @Context HttpServletRequest request) {
public List<URL> getEntityData(@Auth Subject subject, EntityPreview query, @Context HttpServletRequest request) {
final UriBuilder uriBuilder = RequestAwareUriBuilder.fromRequest(request);
return processor.getSingleEntityExport(subject, uriBuilder, query.getIdKind(), query.getEntityId(), query.getSources(), dataset, query.getTime());
}
Expand Down
20 changes: 10 additions & 10 deletions docs/REST API JSONs.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ Returns: `Stream<ConnectorId>`

</p></details>

### GET datasets/{dataset}/queries<sup><sub><sup> [](https://github.com/bakdata/conquery/edit/develop/backend/src/main/java/com/bakdata/conquery/resources/api/QueryResource.java#L69)</sup></sub></sup>
### GET datasets/{dataset}/queries<sup><sub><sup> [](https://github.com/bakdata/conquery/edit/develop/backend/src/main/java/com/bakdata/conquery/resources/api/QueryResource.java#L70)</sup></sub></sup>


<details><summary>Details</summary><p>
Expand All @@ -128,7 +128,7 @@ Returns: list of [ExecutionStatus](#Type-ExecutionStatus)

</p></details>

### POST datasets/{dataset}/queries<sup><sub><sup> [](https://github.com/bakdata/conquery/edit/develop/backend/src/main/java/com/bakdata/conquery/resources/api/QueryResource.java#L78)</sup></sub></sup>
### POST datasets/{dataset}/queries<sup><sub><sup> [](https://github.com/bakdata/conquery/edit/develop/backend/src/main/java/com/bakdata/conquery/resources/api/QueryResource.java#L79)</sup></sub></sup>


<details><summary>Details</summary><p>
Expand All @@ -143,7 +143,7 @@ Returns: `Response`

</p></details>

### POST datasets/{dataset}/queries/entity<sup><sub><sup> [](https://github.com/bakdata/conquery/edit/develop/backend/src/main/java/com/bakdata/conquery/resources/api/QueryResource.java#L160)</sup></sub></sup>
### POST datasets/{dataset}/queries/entity<sup><sub><sup> [](https://github.com/bakdata/conquery/edit/develop/backend/src/main/java/com/bakdata/conquery/resources/api/QueryResource.java#L161)</sup></sub></sup>


<details><summary>Details</summary><p>
Expand All @@ -153,11 +153,11 @@ Java Type: `com.bakdata.conquery.resources.api.QueryResource`
Method: `getEntityData`

Expects: `EntityPreview`
Returns: [FullExecutionStatus](#Type-FullExecutionStatus)
Returns: list of `URL`

</p></details>

### POST datasets/{dataset}/queries/upload<sup><sub><sup> [](https://github.com/bakdata/conquery/edit/develop/backend/src/main/java/com/bakdata/conquery/resources/api/QueryResource.java#L144)</sup></sub></sup>
### POST datasets/{dataset}/queries/upload<sup><sub><sup> [](https://github.com/bakdata/conquery/edit/develop/backend/src/main/java/com/bakdata/conquery/resources/api/QueryResource.java#L145)</sup></sub></sup>


<details><summary>Details</summary><p>
Expand All @@ -171,7 +171,7 @@ Returns: `ExternalUploadResult`

</p></details>

### GET datasets/{dataset}/queries/{query}<sup><sub><sup> [](https://github.com/bakdata/conquery/edit/develop/backend/src/main/java/com/bakdata/conquery/resources/api/QueryResource.java#L90)</sup></sub></sup>
### GET datasets/{dataset}/queries/{query}<sup><sub><sup> [](https://github.com/bakdata/conquery/edit/develop/backend/src/main/java/com/bakdata/conquery/resources/api/QueryResource.java#L91)</sup></sub></sup>


<details><summary>Details</summary><p>
Expand All @@ -185,7 +185,7 @@ Returns: [FullExecutionStatus](#Type-FullExecutionStatus)

</p></details>

### PATCH datasets/{dataset}/queries/{query}<sup><sub><sup> [](https://github.com/bakdata/conquery/edit/develop/backend/src/main/java/com/bakdata/conquery/resources/api/QueryResource.java#L103)</sup></sub></sup>
### PATCH datasets/{dataset}/queries/{query}<sup><sub><sup> [](https://github.com/bakdata/conquery/edit/develop/backend/src/main/java/com/bakdata/conquery/resources/api/QueryResource.java#L104)</sup></sub></sup>


<details><summary>Details</summary><p>
Expand All @@ -200,7 +200,7 @@ Returns: [FullExecutionStatus](#Type-FullExecutionStatus)

</p></details>

### DELETE datasets/{dataset}/queries/{query}<sup><sub><sup> [](https://github.com/bakdata/conquery/edit/develop/backend/src/main/java/com/bakdata/conquery/resources/api/QueryResource.java#L115)</sup></sub></sup>
### DELETE datasets/{dataset}/queries/{query}<sup><sub><sup> [](https://github.com/bakdata/conquery/edit/develop/backend/src/main/java/com/bakdata/conquery/resources/api/QueryResource.java#L116)</sup></sub></sup>


<details><summary>Details</summary><p>
Expand All @@ -213,7 +213,7 @@ Returns: `void`

</p></details>

### POST datasets/{dataset}/queries/{query}/cancel<sup><sub><sup> [](https://github.com/bakdata/conquery/edit/develop/backend/src/main/java/com/bakdata/conquery/resources/api/QueryResource.java#L134)</sup></sub></sup>
### POST datasets/{dataset}/queries/{query}/cancel<sup><sub><sup> [](https://github.com/bakdata/conquery/edit/develop/backend/src/main/java/com/bakdata/conquery/resources/api/QueryResource.java#L135)</sup></sub></sup>


<details><summary>Details</summary><p>
Expand All @@ -226,7 +226,7 @@ Returns: `void`

</p></details>

### POST datasets/{dataset}/queries/{query}/reexecute<sup><sub><sup> [](https://github.com/bakdata/conquery/edit/develop/backend/src/main/java/com/bakdata/conquery/resources/api/QueryResource.java#L124)</sup></sub></sup>
### POST datasets/{dataset}/queries/{query}/reexecute<sup><sub><sup> [](https://github.com/bakdata/conquery/edit/develop/backend/src/main/java/com/bakdata/conquery/resources/api/QueryResource.java#L125)</sup></sub></sup>


<details><summary>Details</summary><p>
Expand Down

0 comments on commit d9c5d04

Please sign in to comment.