thebe-core / Exports / ServerRestAPI

Implemented by

Table of contents

Properties

Properties

createDirectory

createDirectory: (opts: { path: string }) => Promise<RestAPIContentsResponse>

Type declaration

▸ (opts): Promise<RestAPIContentsResponse>

Parameters
NameType
optsObject
opts.pathstring
Returns

Promise<RestAPIContentsResponse>

Defined in

packages/core/src/types.ts:155


duplicateFile

duplicateFile: (opts: { copy_from: string ; ext?: string ; path: string ; type?: "notebook" | "file" }) => Promise<RestAPIContentsResponse>

Type declaration

▸ (opts): Promise<RestAPIContentsResponse>

Parameters
NameType
optsObject
opts.copy_fromstring
opts.ext?string
opts.pathstring
opts.type?"notebook" | "file"
Returns

Promise<RestAPIContentsResponse>

Defined in

packages/core/src/types.ts:142


getContents

getContents: (opts: { format?: "text" | "base64" ; path: string ; returnContent?: boolean ; type?: "notebook" | "file" | "directory" }) => Promise<RestAPIContentsResponse>

Type declaration

▸ (opts): Promise<RestAPIContentsResponse>

Parameters
NameType
optsObject
opts.format?"text" | "base64"
opts.pathstring
opts.returnContent?boolean
opts.type?"notebook" | "file" | "directory"
Returns

Promise<RestAPIContentsResponse>

Defined in

packages/core/src/types.ts:136


getKernelSpecs

getKernelSpecs: () => Promise<ISpecModels>

Type declaration

▸ (): Promise<ISpecModels>

Returns

Promise<ISpecModels>

Defined in

packages/core/src/types.ts:156


renameContents

renameContents: (opts: { newPath: string ; path: string }) => Promise<RestAPIContentsResponse>

Type declaration

▸ (opts): Promise<RestAPIContentsResponse>

Parameters
NameType
optsObject
opts.newPathstring
opts.pathstring
Returns

Promise<RestAPIContentsResponse>

Defined in

packages/core/src/types.ts:148


uploadFile

uploadFile: (opts: { content: string ; format?: "text" | "base64" | "json" ; path: string ; type?: "notebook" | "file" }) => Promise<RestAPIContentsResponse>

Type declaration

▸ (opts): Promise<RestAPIContentsResponse>

Parameters
NameType
optsObject
opts.contentstring
opts.format?"text" | "base64" | "json"
opts.pathstring
opts.type?"notebook" | "file"
Returns

Promise<RestAPIContentsResponse>

Defined in

packages/core/src/types.ts:149