MCPcopy Create free account
hub / github.com/IQEngine/IQEngine / getSasToken

Method getSasToken

client/src/api/datasource/api-client.ts:58–77  ·  view source on GitHub ↗
(account: string, container: string, filepath: string, write: boolean)

Source from the content-addressed store, hash-verified

56 return response.data;
57 }
58 async getSasToken(account: string, container: string, filepath: string, write: boolean): Promise<Object> {
59 try {
60 const response = await this.authUtil.requestWithAuthIfRequired({
61 method: 'get',
62 url: `/api/datasources/${account}/${container}/${filepath}/sas?write=${write}`,
63 });
64 if (!response.data) {
65 return null;
66 }
67
68 return response
69
70 } catch (error) {
71 const status = error.response.status
72 if (status !== 200) {
73 throw new Error(`Unexpected status code: ${status}`);
74 }
75 }
76
77 }
78 async update(dataSource: DataSource): Promise<DataSource> {
79 const response = await this.authUtil.requestWithAuthIfRequired({
80 method: 'put',

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected