Filesfolders REST API Documentation

This document contains the HTTP REST API documentation for the filesfolders app. The provided API endpoints allow file operations through HTTP API calls in addition to the GUI.

For general information on REST API usage in SODAR Core, see Projectroles REST API Documentation.

class filesfolders.views_api.FolderListCreateAPIView(**kwargs)[source]

List folders or create a folder.

URL: /files/api/folder/list-create/{Project.sodar_uuid}

Methods: GET, POST

Parameters for POST:

  • name: Folder name (string)

  • folder: Parent folder UUID (string)

  • owner: User UUID of folder owner (string)

  • flag: Folder flag (string, optional)

  • description: Folder description (string, optional)

class filesfolders.views_api.FolderRetrieveUpdateDestroyAPIView(**kwargs)[source]

Retrieve, update or destroy a folder.

URL: /files/api/folder/retrieve-update-destroy/{Folder.sodar_uuid}

Methods: GET, PUT, PATCH, DELETE

Parameters for PUT and PATCH:

  • name: Folder name (string)

  • folder: Parent folder UUID (string)

  • owner: User UUID of folder owner (string)

  • flag: Folder flag (string, optional)

  • description: Folder description (string, optional)

class filesfolders.views_api.FileListCreateAPIView(**kwargs)[source]

List files or upload a file. For uploads, the request must be made in the multipart format.

URL: /files/api/file/list-create/{Project.sodar_uuid}

Methods: GET, POST

Parameters for POST:

  • name: Folder name (string)

  • folder: Parent folder UUID (string)

  • owner: User UUID of folder owner (string)

  • flag: Folder flag (string, optional)

  • description: Folder description (string, optional)

  • public_url: Allow creation of a publicly viewable URL (bool)

  • file: File to be uploaded

class filesfolders.views_api.FileRetrieveUpdateDestroyAPIView(**kwargs)[source]

Retrieve, update or destroy a file.

URL: /files/api/file/retrieve-update-destroy/{File.sodar_uuid}

Methods: GET, PUT, PATCH, DELETE

Parameters for PUT and PATCH:

  • name: Folder name (string)

  • folder: Parent folder UUID (string)

  • owner: User UUID of folder owner (string)

  • flag: Folder flag (string, optional)

  • description: Folder description (string, optional)

  • public_url: Allow creation of a publicly viewable URL (bool)

  • file: File to be uploaded

class filesfolders.views_api.FileServeAPIView(**kwargs)[source]

Serve the file content.

URL: /files/api/file/serve/{File.sodar_uuid}

Methods: GET

class filesfolders.views_api.HyperLinkListCreateAPIView(**kwargs)[source]

List hyperlinks or create a hyperlink.

URL: /files/api/hyperlink/list-create/{Project.sodar_uuid}

Methods: GET, POST

Parameters for POST:

  • name: Folder name (string)

  • folder: Parent folder UUID (string)

  • owner: User UUID of folder owner (string)

  • flag: Folder flag (string, optional)

  • description: Folder description (string, optional)

  • url: URL for the link (string)

class filesfolders.views_api.HyperLinkRetrieveUpdateDestroyAPIView(**kwargs)[source]

Retrieve, update or destroy a hyperlink.

URL: /files/api/hyperlink/retrieve-update-destroy/{HyperLink.sodar_uuid}

Methods: GET, PUT, PATCH, DELETE

Parameters for PUT and PATCH:

  • name: Folder name (string)

  • folder: Parent folder UUID (string)

  • owner: User UUID of folder owner (string)

  • flag: Folder flag (string, optional)

  • description: Folder description (string, optional)

  • url: URL for the link (string)