You can create “Views” through which personal information can be retrieved. The view defines a set of columns representing different personal information that can be stored in the view or retrieved from other sources within Zetkin.
Rows can be added to the view, or the view can be used to format lists of
people retrieved elsewhere using the ?view_id URL parameter. For example,
the list of matches to the Smart Search query with ID 2 can be formatted
according to the columns in view 3, by fetching it from
/orgs/1/people/queries/2/matches?view_id=3.
/orgs/{org_id}/people/views
Collection of Views belonging to this organization. A view can have any number of columns and rows.
GET
POST
/orgs/{org_id}/people/views/{view_id}
Single view item.
DELETE
GET
PATCH
/orgs/{org_id}/people/views/{view_id}/columns
Collection of columns in the view identified by view_id.
GET
Retrieve all columns in view view_id
POST
/orgs/{org_id}/people/views/{view_id}/columns/{col_id}
Single column identified by col_id, belonging to the view identified
by view_id.
DELETE
GET
Get column details.
PATCH
/orgs/{org_id}/people/views/{view_id}/rows
Collection of rows that belong to the view. Data retrieved from this endpoint will be formatted according to the view.
GET
Retrieves list of people that have been added to the view, formatted according to the configuration of the view, i.e. using the columns of the view.
The data returned will be formatted like this:
[
{ "id": 1, "content": [ "Alice", "Andersson", "alice@example.com", true ] },
{ "id": 2, "content": [ "Bob", "Boblaw", "bob@example.com", false ] }
]
Where id is the ID of the person, and content contains the column-by-column
values corresponding to that person. The order and type of the entries in the
content array depends on the view column configuration.
/orgs/{org_id}/people/views/{view_id}/rows/{person_id}
A single row (person) in a view.
DELETE
Delete a row (person identified by person_id) from the view. No actual
data is lost, regardless of column type.
GET
Get single person from the view, formatted according to view configuration.
PUT
Add a row (person identified by person_id) to the view and return the
data for that person, formatted according to the view configuration.