isogeo_pysdk.api.routes_datasource module

Isogeo API v1 - API Routes for Datasources entities

See: http://help.isogeo.com/api/complete/index.html

class isogeo_pysdk.api.routes_datasource.ApiDatasource(api_client=None)[source]

Bases: object

Routes as methods of Isogeo API used to manipulate datasources (CSW entry-points).

create(workgroup_id: str, datasource: object = {'_created': None, '_id': None, '_modified': None, '_tag': None, 'enabled': None, 'lastSession': None, 'location': None, 'name': None, 'resourceCount': None, 'sessions': None}, check_exists: int = 2) → isogeo_pysdk.models.datasource.Datasource[source]

Add a new datasource to a workgroup.

Parameters:
  • workgroup_id (str) – identifier of the owner workgroup
  • check_exists (int) – check if a datasource already exists inot the workgroup:
  • 0 = no check
  • 1 = compare name
  • 2 = compare URL (location) [DEFAULT]
Parameters:datasource (class) – Datasource model object to create
datasource(workgroup_id: str, datasource_id: str) → isogeo_pysdk.models.datasource.Datasource[source]

Get details about a specific datasource.

Parameters:
  • workgroup_id (str) – identifier of the owner workgroup
  • datasource_id (str) – datasource UUID
datasources(workgroup_id: str = None, include: list = [], caching: bool = 1) → list[source]

Get workgroup datasources.

Parameters:
  • workgroup_id (str) – identifier of the owner workgroup
  • include (list) – additionnal subresource to include in the response
  • caching (bool) – option to cache the response
delete(workgroup_id: str, datasource_id: str)[source]

Delete a datasource from Isogeo database.

Parameters:
  • workgroup_id (str) – identifier of the owner workgroup
  • datasource_id (str) – identifier of the resource to delete
exists(workgroup_id: str, datasource_id: str) → bool[source]

Check if the specified datasource exists and is available for the authenticated user.

Parameters:
  • workgroup_id (str) – identifier of the owner workgroup
  • datasource_id (str) – identifier of the datasource to verify
update(workgroup_id: str, datasource: isogeo_pysdk.models.datasource.Datasource, caching: bool = 1) → isogeo_pysdk.models.datasource.Datasource[source]

Update a datasource owned by a workgroup.

Parameters:
  • workgroup_id (str) – identifier of the owner workgroup
  • datasource (class) – Datasource model object to update
  • caching (bool) – option to cache the response