Package ganymede.jupyter.notebook.api
Class ContentsApi
- java.lang.Object
-
- ganymede.jupyter.notebook.api.ContentsApi
-
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.6.0") public class ContentsApi extends Object
-
-
Constructor Summary
Constructors Constructor Description ContentsApi()
ContentsApi(ApiClient apiClient)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
apiContentsPathCheckpointsCheckpointIdDelete(String path, String checkpointId)
Delete a checkpointApiResponse<Void>
apiContentsPathCheckpointsCheckpointIdDeleteWithHttpInfo(String path, String checkpointId)
Delete a checkpointvoid
apiContentsPathCheckpointsCheckpointIdPost(String path, String checkpointId)
Restore a file to a particular checkpointed stateApiResponse<Void>
apiContentsPathCheckpointsCheckpointIdPostWithHttpInfo(String path, String checkpointId)
Restore a file to a particular checkpointed stateList<Checkpoints>
apiContentsPathCheckpointsGet(String path)
Get a list of checkpoints for a file List checkpoints for a given file.ApiResponse<List<Checkpoints>>
apiContentsPathCheckpointsGetWithHttpInfo(String path)
Get a list of checkpoints for a file List checkpoints for a given file.Checkpoints
apiContentsPathCheckpointsPost(String path)
Create a new checkpoint for a file Create a new checkpoint with the current state of a file.ApiResponse<Checkpoints>
apiContentsPathCheckpointsPostWithHttpInfo(String path)
Create a new checkpoint for a file Create a new checkpoint with the current state of a file.void
apiContentsPathDelete(String path)
Delete a file in the given pathApiResponse<Void>
apiContentsPathDeleteWithHttpInfo(String path)
Delete a file in the given pathContents
apiContentsPathGet(String path, String type, String format, Integer content, Integer hash)
Get contents of file or directory A client can optionally specify a type and/or format argument via URL parameter.ApiResponse<Contents>
apiContentsPathGetWithHttpInfo(String path, String type, String format, Integer content, Integer hash)
Get contents of file or directory A client can optionally specify a type and/or format argument via URL parameter.Contents
apiContentsPathPatch(String path)
Rename a file or directory without re-uploading contentApiResponse<Contents>
apiContentsPathPatchWithHttpInfo(String path)
Rename a file or directory without re-uploading contentContents
apiContentsPathPost(String path, ApiContentsPathPostRequest model)
Create a new file in the specified path A POST to /api/contents/path creates a New untitled, empty file or directory.ApiResponse<Contents>
apiContentsPathPostWithHttpInfo(String path, ApiContentsPathPostRequest model)
Create a new file in the specified path A POST to /api/contents/path creates a New untitled, empty file or directory.Contents
apiContentsPathPut(String path, ApiContentsPathPutRequest model)
Save or upload file.ApiResponse<Contents>
apiContentsPathPutWithHttpInfo(String path, ApiContentsPathPutRequest model)
Save or upload file.protected ApiException
getApiException(String operationId, HttpResponse<InputStream> response)
-
-
-
Constructor Detail
-
ContentsApi
public ContentsApi()
-
ContentsApi
public ContentsApi(ApiClient apiClient)
-
-
Method Detail
-
getApiException
protected ApiException getApiException(String operationId, HttpResponse<InputStream> response) throws IOException
- Throws:
IOException
-
apiContentsPathCheckpointsCheckpointIdDelete
public void apiContentsPathCheckpointsCheckpointIdDelete(String path, String checkpointId) throws ApiException
Delete a checkpoint- Parameters:
path
- file path (required)checkpointId
- Checkpoint id for a file (required)- Throws:
ApiException
- if fails to make API call
-
apiContentsPathCheckpointsCheckpointIdDeleteWithHttpInfo
public ApiResponse<Void> apiContentsPathCheckpointsCheckpointIdDeleteWithHttpInfo(String path, String checkpointId) throws ApiException
Delete a checkpoint- Parameters:
path
- file path (required)checkpointId
- Checkpoint id for a file (required)- Returns:
- ApiResponse<Void>
- Throws:
ApiException
- if fails to make API call
-
apiContentsPathCheckpointsCheckpointIdPost
public void apiContentsPathCheckpointsCheckpointIdPost(String path, String checkpointId) throws ApiException
Restore a file to a particular checkpointed state- Parameters:
path
- file path (required)checkpointId
- Checkpoint id for a file (required)- Throws:
ApiException
- if fails to make API call
-
apiContentsPathCheckpointsCheckpointIdPostWithHttpInfo
public ApiResponse<Void> apiContentsPathCheckpointsCheckpointIdPostWithHttpInfo(String path, String checkpointId) throws ApiException
Restore a file to a particular checkpointed state- Parameters:
path
- file path (required)checkpointId
- Checkpoint id for a file (required)- Returns:
- ApiResponse<Void>
- Throws:
ApiException
- if fails to make API call
-
apiContentsPathCheckpointsGet
public List<Checkpoints> apiContentsPathCheckpointsGet(String path) throws ApiException
Get a list of checkpoints for a file List checkpoints for a given file. There will typically be zero or one results.- Parameters:
path
- file path (required)- Returns:
- List<Checkpoints>
- Throws:
ApiException
- if fails to make API call
-
apiContentsPathCheckpointsGetWithHttpInfo
public ApiResponse<List<Checkpoints>> apiContentsPathCheckpointsGetWithHttpInfo(String path) throws ApiException
Get a list of checkpoints for a file List checkpoints for a given file. There will typically be zero or one results.- Parameters:
path
- file path (required)- Returns:
- ApiResponse<List<Checkpoints>>
- Throws:
ApiException
- if fails to make API call
-
apiContentsPathCheckpointsPost
public Checkpoints apiContentsPathCheckpointsPost(String path) throws ApiException
Create a new checkpoint for a file Create a new checkpoint with the current state of a file. With the default FileContentsManager, only one checkpoint is supported, so creating new checkpoints clobbers existing ones.- Parameters:
path
- file path (required)- Returns:
- Checkpoints
- Throws:
ApiException
- if fails to make API call
-
apiContentsPathCheckpointsPostWithHttpInfo
public ApiResponse<Checkpoints> apiContentsPathCheckpointsPostWithHttpInfo(String path) throws ApiException
Create a new checkpoint for a file Create a new checkpoint with the current state of a file. With the default FileContentsManager, only one checkpoint is supported, so creating new checkpoints clobbers existing ones.- Parameters:
path
- file path (required)- Returns:
- ApiResponse<Checkpoints>
- Throws:
ApiException
- if fails to make API call
-
apiContentsPathDelete
public void apiContentsPathDelete(String path) throws ApiException
Delete a file in the given path- Parameters:
path
- file path (required)- Throws:
ApiException
- if fails to make API call
-
apiContentsPathDeleteWithHttpInfo
public ApiResponse<Void> apiContentsPathDeleteWithHttpInfo(String path) throws ApiException
Delete a file in the given path- Parameters:
path
- file path (required)- Returns:
- ApiResponse<Void>
- Throws:
ApiException
- if fails to make API call
-
apiContentsPathGet
public Contents apiContentsPathGet(String path, String type, String format, Integer content, Integer hash) throws ApiException
Get contents of file or directory A client can optionally specify a type and/or format argument via URL parameter. When given, the Contents service shall return a model in the requested type and/or format. If the request cannot be satisfied, e.g. type=text is requested, but the file is binary, then the request shall fail with 400 and have a JSON response containing a 'reason' field, with the value 'bad format' or 'bad type', depending on what was requested.- Parameters:
path
- file path (required)type
- File type ('file', 'directory') (optional)format
- How file content should be returned ('text', 'base64') (optional)content
- Return content (0 for no content, 1 for return content) (optional)hash
- May return hash hexdigest string of content and the hash algorithm (0 for no hash - default, 1 for return hash). It may be ignored by the content manager. (optional)- Returns:
- Contents
- Throws:
ApiException
- if fails to make API call
-
apiContentsPathGetWithHttpInfo
public ApiResponse<Contents> apiContentsPathGetWithHttpInfo(String path, String type, String format, Integer content, Integer hash) throws ApiException
Get contents of file or directory A client can optionally specify a type and/or format argument via URL parameter. When given, the Contents service shall return a model in the requested type and/or format. If the request cannot be satisfied, e.g. type=text is requested, but the file is binary, then the request shall fail with 400 and have a JSON response containing a 'reason' field, with the value 'bad format' or 'bad type', depending on what was requested.- Parameters:
path
- file path (required)type
- File type ('file', 'directory') (optional)format
- How file content should be returned ('text', 'base64') (optional)content
- Return content (0 for no content, 1 for return content) (optional)hash
- May return hash hexdigest string of content and the hash algorithm (0 for no hash - default, 1 for return hash). It may be ignored by the content manager. (optional)- Returns:
- ApiResponse<Contents>
- Throws:
ApiException
- if fails to make API call
-
apiContentsPathPatch
public Contents apiContentsPathPatch(String path) throws ApiException
Rename a file or directory without re-uploading content- Parameters:
path
- file path (required)- Returns:
- Contents
- Throws:
ApiException
- if fails to make API call
-
apiContentsPathPatchWithHttpInfo
public ApiResponse<Contents> apiContentsPathPatchWithHttpInfo(String path) throws ApiException
Rename a file or directory without re-uploading content- Parameters:
path
- file path (required)- Returns:
- ApiResponse<Contents>
- Throws:
ApiException
- if fails to make API call
-
apiContentsPathPost
public Contents apiContentsPathPost(String path, ApiContentsPathPostRequest model) throws ApiException
Create a new file in the specified path A POST to /api/contents/path creates a New untitled, empty file or directory. A POST to /api/contents/path with body {'copy_from': '/path/to/OtherNotebook.ipynb'} creates a new copy of OtherNotebook in path.- Parameters:
path
- file path (required)model
- Path of file to copy (optional)- Returns:
- Contents
- Throws:
ApiException
- if fails to make API call
-
apiContentsPathPostWithHttpInfo
public ApiResponse<Contents> apiContentsPathPostWithHttpInfo(String path, ApiContentsPathPostRequest model) throws ApiException
Create a new file in the specified path A POST to /api/contents/path creates a New untitled, empty file or directory. A POST to /api/contents/path with body {'copy_from': '/path/to/OtherNotebook.ipynb'} creates a new copy of OtherNotebook in path.- Parameters:
path
- file path (required)model
- Path of file to copy (optional)- Returns:
- ApiResponse<Contents>
- Throws:
ApiException
- if fails to make API call
-
apiContentsPathPut
public Contents apiContentsPathPut(String path, ApiContentsPathPutRequest model) throws ApiException
Save or upload file. Saves the file in the location specified by name and path. PUT is very similar to POST, but the requester specifies the name, whereas with POST, the server picks the name.- Parameters:
path
- file path (required)model
- New path for file or directory (optional)- Returns:
- Contents
- Throws:
ApiException
- if fails to make API call
-
apiContentsPathPutWithHttpInfo
public ApiResponse<Contents> apiContentsPathPutWithHttpInfo(String path, ApiContentsPathPutRequest model) throws ApiException
Save or upload file. Saves the file in the location specified by name and path. PUT is very similar to POST, but the requester specifies the name, whereas with POST, the server picks the name.- Parameters:
path
- file path (required)model
- New path for file or directory (optional)- Returns:
- ApiResponse<Contents>
- Throws:
ApiException
- if fails to make API call
-
-