Closed arthur-shaw closed 3 years ago
While the REST endpoint has been deprecated, it still continues to work (as of v21.05.3) and allows extraction of lists of questionnaires from any workspace that the API user has access to;
. .suso.workspace="primary"
. .suso.qx_list
. list qx_identity
+------------------------------------+
| qx_identity |
|------------------------------------|
1. | 0434573c67b34d93b1f0799fb042f9e6$1 |
2. | cdbc65c276664111a44bb602553ae727$1 |
3. | f2b783f5aa1d41489bddc8aaf24f2947$1 |
4. | ad59e88ffe7648f0881131b9ed57952e$1 |
5. | a6e20ab2c7d34e5e9171f8c7ebfd7788$1 |
|------------------------------------|
6. | 03478235291748c3beddaa7fd70e53c6$1 |
+------------------------------------+
.
. .suso.workspace="chile1"
. .suso.qx_list
. list qx_identity
+------------------------------------+
| qx_identity |
|------------------------------------|
1. | ab814e96e64c4200b1657c2446d500ac$1 |
+------------------------------------+
One can see the lists of the questionnaires are non-overlapping. Questionnaires from the "primary" workspace are not listed in the "chile1" workspace.
In #2 , @ashwinikalantri points out that:
The issue is twofold:
GET /api/v1/questionnaires
, may have been soft deprecatedThe solution is to rewrite the function to rely on the GraphQL endpoint and specify a target workspace in the query. For example:
This may point to a larger set of function rewrites, since other objects are specific to workspaces (e.g., interviews, assignments, etc.) and, in principal, face the same problem, even if their endpoints have not yet been deprecated in 21.05.
Awaiting reply from SuSo dev team to decide on the optimal path--likely to be moving from REST to GraphQL endpoints for function business logic, and adding a
workspace
parameter to functions.