deseasion.backend.resources.share module

class deseasion.backend.resources.share.DataShareAPI

Bases: Resource

delete(uid)

Delete a data share.

Parameters:

uid (str) – The uid of a data share.

Status 403:

The user cannot delete share on this project.

Status 404:

The share or its project data does not exist.

endpoint = 'datashareapi'
get(uid)

Return the geometries of a shared data.

Parameters:

uid (str) – The uid of a data share.

Status 404:

The share does not exist at this time.

Status 415:

Output format is not supported.

Status 500:

There was an error with the geometry while creating the file or data type is currently not supported for download.

mediatypes()
methods: t.ClassVar[t.Collection[str] | None] = {'DELETE', 'GET'}

The methods this view is registered for. Uses the same default (["GET", "HEAD", "OPTIONS"]) as route and add_url_rule by default.

class deseasion.backend.resources.share.ProjectSharesAPI

Bases: Resource

endpoint = 'projectsharesapi'
get(project_id)

Get the list of data shares of a project.

Parameters:

project_id (int) – The id of the project.

Status 403:

The user is not allowed to access the project.

Status 404:

The project does not exist.

mediatypes()
methods: t.ClassVar[t.Collection[str] | None] = {'GET'}

The methods this view is registered for. Uses the same default (["GET", "HEAD", "OPTIONS"]) as route and add_url_rule by default.

class deseasion.backend.resources.share.ShareBaseDataAPI

Bases: Resource

endpoint = 'sharebasedataapi'
get(data_id)

Get the list of shares of a data.

Parameters:

data_id (int) – The id of the data.

Status 403:

The user is not allowed to access the data.

Status 404:

The data does not exist.

mediatypes()
methods: t.ClassVar[t.Collection[str] | None] = {'GET', 'POST'}

The methods this view is registered for. Uses the same default (["GET", "HEAD", "OPTIONS"]) as route and add_url_rule by default.

post(data_id)

Create a new data share.

Parameters:

data_id (int) – The id of the data.

Reqheader Authorization:

JSON Web Token with Bearer scheme (Authorization: Bearer <token>).

Status 403:

The user is not allowed to access the project data.

Status 404:

The project data does not exist.

class deseasion.backend.resources.share.ShareDataListAPI

Bases: Resource

endpoint = 'sharedatalistapi'
get()

Get the list of data shares.

Status 403:

The user is not logged in.

mediatypes()
methods: t.ClassVar[t.Collection[str] | None] = {'GET'}

The methods this view is registered for. Uses the same default (["GET", "HEAD", "OPTIONS"]) as route and add_url_rule by default.