Skip to content
This repository has been archived by the owner on Jun 6, 2019. It is now read-only.

Latest commit

 

History

History
307 lines (203 loc) · 14.8 KB

ckan-cadasta-wrapped-endpoints.md

File metadata and controls

307 lines (203 loc) · 14.8 KB

CKAN to Cadasta API Wrappers

Overview

The Angular views in this application retrieve data from the cadasta-api. To handle authorization around API CRUD endpoints all calls are proxied through CKAN so the user's role can be validated.

What follows below is a brief description of the CKAN endpoints and where the authentication functions are located. If you are interested to see a breakdown of API calls per view per and per user permission, then refer to the /docs/CadastaRelatedViewsEndpointsandPermissions.docx.pdf. For a high-level description about where these pieces are and how to update them refer to the endpoint README

Endpoints Description

The following endpoints are the RPC action names in http://{ckan_hostname}/api/3/action/{action_name}

GET(s)

user_role_show

Get a bundle of information about the user and their organization membership to be used in show/hide logic

  • Endpoint
  • Does Not Wrap Cadasta
  • No Auth Required

cadasta_get_project_overview

Get activity, resources, project extent and parcel geometries for a single project

cadasta_get_all_projects

Get all projects (from the project table)

cadasta_get_project_resources

Get records from the resources table with a specific project id

cadasta_get_project_activities

Get a project's activity records

cadasta_get_project_mapdata

Get project extent geometry, and all project parcel geometries

cadasta_get_project_parcel_list

Get records from the show_parcels_list database view with a specific project id

cadasta_get_project_parcel

Get a project specific parcel (from the parcels table)

cadasta_get_project_parcel_details

Get all details for a project parcel: parcel attributes, parcel history (most recent 10), relationships (most recent 10)

cadasta_get_project_parcel_relationship_history

Get a project parcel's relationship history (from the show_relationship_history view)

cadasta_get_project_parcel_resources

Get all parcel resources (from the resource_parcel table)

cadasta_get_project_details

Get project

cadasta_get_project

Get project

cadasta_get_project_parties

Get a project's parties

cadasta_get_project_party_details

Get the details for a project party

cadasta_get_project_party_resources

Get the resources for a project party

cadasta_get_project_relationship_details

Get the details for a project relationship

cadasta_get_project_relationship_list

Get all the relationships for a project

cadasta_get_project_relationship_resources

Get the resources for a project relationship

cadasta_get_project_fielddata_responses

Get the fielddata responses for a project

cadasta_get_project_fielddata

Get all the fielddata for a project

PATCH AND POST

cadasta_create_project

Create a project

cadasta_create_organization

Create an organization

cadasta_create_project_parcel

Create a parcel for this project

cadasta_update_organization

Update an organization

cadasta_update_project

Update a project

cadasta_update_project_parcel

Update a project parcel

cadasta_update_project_party

Update a project's party information

cadasta_update_project_relationship

Update a project's relationship information

cadasta_update_project_fielddata_respondents

Update a project's fielddata respondent's validated data

cadasta_upload_project_resources

Upload parcel, party, or relationship project resource

cadasta_upload_ona_form

Upload .xls file to for ona mobile user