@@ -78,77 +78,77 @@ class DSRemoteWebknossosClient @Inject()(
7878
7979 private def reportStatus (): Fox [_] =
8080 rpc(s " $webknossosUri/api/datastores/ $dataStoreName/status " )
81- .addQueryString (" key" -> dataStoreKey)
81+ .addQueryParam (" key" , dataStoreKey)
8282 .patchJson(DataStoreStatus (ok = true , dataStoreUri, Some (reportUsedStorageEnabled)))
8383
8484 def reportDataSource (dataSource : DataSource ): Fox [_] =
8585 rpc(s " $webknossosUri/api/datastores/ $dataStoreName/datasource " )
86- .addQueryString (" key" -> dataStoreKey)
86+ .addQueryParam (" key" , dataStoreKey)
8787 .putJson(dataSource)
8888
8989 def getUnfinishedUploadsForUser (organizationName : String )(implicit tc : TokenContext ): Fox [List [UnfinishedUpload ]] =
9090 for {
9191 unfinishedUploads <- rpc(s " $webknossosUri/api/datastores/ $dataStoreName/getUnfinishedUploadsForUser " )
92- .addQueryString (" key" -> dataStoreKey)
93- .addQueryString (" organizationName" -> organizationName)
92+ .addQueryParam (" key" , dataStoreKey)
93+ .addQueryParam (" organizationName" , organizationName)
9494 .withTokenFromContext
9595 .getWithJsonResponse[List [UnfinishedUpload ]]
9696 } yield unfinishedUploads
9797
9898 def reportUpload (datasetId : ObjectId , parameters : ReportDatasetUploadParameters )(implicit tc : TokenContext ): Fox [_] =
9999 rpc(s " $webknossosUri/api/datastores/ $dataStoreName/reportDatasetUpload " )
100- .addQueryString (" key" -> dataStoreKey)
101- .addQueryString (" datasetId" -> datasetId.toString )
100+ .addQueryParam (" key" , dataStoreKey)
101+ .addQueryParam (" datasetId" , datasetId)
102102 .withTokenFromContext
103103 .postJson[ReportDatasetUploadParameters ](parameters)
104104
105105 def reportDataSources (dataSources : List [DataSource ], organizationId : Option [String ]): Fox [_] =
106106 rpc(s " $webknossosUri/api/datastores/ $dataStoreName/datasources " )
107- .addQueryString (" key" -> dataStoreKey)
108- .addQueryStringOptional (" organizationId" , organizationId)
107+ .addQueryParam (" key" , dataStoreKey)
108+ .addQueryParam (" organizationId" , organizationId)
109109 .silent
110110 .putJson(dataSources)
111111
112112 def reportRealPaths (dataSourcePaths : List [DataSourcePathInfo ]): Fox [_] =
113113 rpc(s " $webknossosUri/api/datastores/ $dataStoreName/datasources/paths " )
114- .addQueryString (" key" -> dataStoreKey)
114+ .addQueryParam (" key" , dataStoreKey)
115115 .silent
116116 .putJson(dataSourcePaths)
117117
118118 def fetchPaths (datasetId : ObjectId ): Fox [List [LayerMagLinkInfo ]] =
119119 rpc(s " $webknossosUri/api/datastores/ $dataStoreName/datasources/ $datasetId/paths " )
120- .addQueryString (" key" -> dataStoreKey)
120+ .addQueryParam (" key" , dataStoreKey)
121121 .getWithJsonResponse[List [LayerMagLinkInfo ]]
122122
123123 def reserveDataSourceUpload (info : ReserveUploadInformation )(
124124 implicit tc : TokenContext ): Fox [ReserveAdditionalInformation ] =
125125 for {
126126 reserveUploadInfo <- rpc(s " $webknossosUri/api/datastores/ $dataStoreName/reserveUpload " )
127- .addQueryString (" key" -> dataStoreKey)
127+ .addQueryParam (" key" , dataStoreKey)
128128 .withTokenFromContext
129129 .postJsonWithJsonResponse[ReserveUploadInformation , ReserveAdditionalInformation ](info)
130130 } yield reserveUploadInfo
131131
132132 def updateDataSource (dataSource : DataSource , datasetId : ObjectId )(implicit tc : TokenContext ): Fox [_] =
133133 rpc(s " $webknossosUri/api/datastores/ $dataStoreName/datasources/ ${datasetId.toString}" )
134- .addQueryString (" key" -> dataStoreKey)
134+ .addQueryParam (" key" , dataStoreKey)
135135 .withTokenFromContext
136136 .putJson(dataSource)
137137
138138 def deleteDataset (datasetId : ObjectId ): Fox [_] =
139139 rpc(s " $webknossosUri/api/datastores/ $dataStoreName/deleteDataset " )
140- .addQueryString (" key" -> dataStoreKey)
140+ .addQueryParam (" key" , dataStoreKey)
141141 .postJson(datasetId)
142142
143143 def getJobExportProperties (jobId : String ): Fox [JobExportProperties ] =
144144 rpc(s " $webknossosUri/api/datastores/ $dataStoreName/jobExportProperties " )
145- .addQueryString (" jobId" -> jobId)
146- .addQueryString (" key" -> dataStoreKey)
145+ .addQueryParam (" jobId" , jobId)
146+ .addQueryParam (" key" , dataStoreKey)
147147 .getWithJsonResponse[JobExportProperties ]
148148
149149 override def requestUserAccess (accessRequest : UserAccessRequest )(implicit tc : TokenContext ): Fox [UserAccessAnswer ] =
150150 rpc(s " $webknossosUri/api/datastores/ $dataStoreName/validateUserAccess " )
151- .addQueryString (" key" -> dataStoreKey)
151+ .addQueryParam (" key" , dataStoreKey)
152152 .withTokenFromContext
153153 .postJsonWithJsonResponse[UserAccessRequest , UserAccessAnswer ](accessRequest)
154154
@@ -159,7 +159,7 @@ class DSRemoteWebknossosClient @Inject()(
159159 _ =>
160160 for {
161161 tracingStoreInfo <- rpc(s " $webknossosUri/api/tracingstore " )
162- .addQueryString (" key" -> dataStoreKey)
162+ .addQueryParam (" key" , dataStoreKey)
163163 .getWithJsonResponse[TracingStoreInfo ]
164164 } yield tracingStoreInfo.url
165165 )
@@ -174,8 +174,8 @@ class DSRemoteWebknossosClient @Inject()(
174174 (accessToken, tc.userTokenOpt),
175175 _ =>
176176 rpc(s " $webknossosUri/api/annotations/source/ $accessToken" )
177- .addQueryString (" key" -> dataStoreKey)
178- .addQueryStringOptional (" userToken" , tc.userTokenOpt)
177+ .addQueryParam (" key" , dataStoreKey)
178+ .addQueryParam (" userToken" , tc.userTokenOpt)
179179 .getWithJsonResponse[AnnotationSource ]
180180 )
181181
@@ -187,16 +187,16 @@ class DSRemoteWebknossosClient @Inject()(
187187 credentialId,
188188 _ =>
189189 rpc(s " $webknossosUri/api/datastores/ $dataStoreName/findCredential " )
190- .addQueryString (" credentialId" -> credentialId)
191- .addQueryString (" key" -> dataStoreKey)
190+ .addQueryParam (" credentialId" , credentialId)
191+ .addQueryParam (" key" , dataStoreKey)
192192 .silent
193193 .getWithJsonResponse[DataVaultCredential ]
194194 )
195195
196196 def getDataSource (datasetId : ObjectId ): Fox [DataSource ] =
197197 for {
198198 dataSource <- rpc(s " $webknossosUri/api/datastores/ $dataStoreName/datasources/ $datasetId" )
199- .addQueryString (" key" -> dataStoreKey)
199+ .addQueryParam (" key" , dataStoreKey)
200200 .getWithJsonResponse[DataSource ] ?~> " Failed to get data source from remote webknossos"
201201 } yield dataSource
202202
@@ -208,9 +208,9 @@ class DSRemoteWebknossosClient @Inject()(
208208 (organizationId, datasetDirectoryName),
209209 _ =>
210210 rpc(s " $webknossosUri/api/datastores/ $dataStoreName/findDatasetId " )
211- .addQueryString (" key" -> dataStoreKey)
212- .addQueryString (" organizationId" -> organizationId)
213- .addQueryString (" datasetDirectoryName" -> datasetDirectoryName)
211+ .addQueryParam (" key" , dataStoreKey)
212+ .addQueryParam (" organizationId" , organizationId)
213+ .addQueryParam (" datasetDirectoryName" , datasetDirectoryName)
214214 .getWithJsonResponse[ObjectId ] ?~> " Failed to get dataset id from remote webknossos"
215215 )
216216}
0 commit comments