MCPcopy Index your code
hub / github.com/outerbase/studio / requestOuterbase

Function requestOuterbase

src/outerbase-cloud/api.ts:16–37  ·  view source on GitHub ↗
(
  url: string,
  method: "GET" | "POST" | "DELETE" | "PUT" = "GET",
  body?: unknown
)

Source from the content-addressed store, hash-verified

14} from "./api-type";
15
16export async function requestOuterbase<T = unknown>(
17 url: string,
18 method: "GET" | "POST" | "DELETE" | "PUT" = "GET",
19 body?: unknown
20) {
21 const raw = await fetch(url, {
22 method,
23 headers: {
24 "Content-Type": "application/json",
25 "x-auth-token": localStorage.getItem("ob-token") || "",
26 },
27 body: body ? JSON.stringify(body) : undefined,
28 });
29
30 const json = (await raw.json()) as OuterbaseAPIResponse<T>;
31
32 if (json.error) {
33 throw new OuterbaseAPIError(json.error);
34 }
35
36 return json.response;
37}
38
39export function getOuterbaseWorkspace() {
40 return requestOuterbase<OuterbaseAPIWorkspaceResponse>("/api/v1/workspace");

Callers 15

createOuterbaseWorkspaceFunction · 0.90
updateOuterbaseWorkspaceFunction · 0.90
deleteOuterbaseWorkspaceFunction · 0.90
createOuterbaseBaseFunction · 0.90
testOuterbaseSourceFunction · 0.90
updateOuterbaseSourceFunction · 0.90
createOuterbaseSourceFunction · 0.90
updateOuterbaseUserFlagFunction · 0.90
requestResetPasswordFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…