v3 Ushahidi Platform REST API Documentation
  • V3
    • Overview
    • Login & Register
    • Posts
      • Sub Posts & Translation
    • Tags
    • Configuration
    • Data provider
    • Country Code
    • Tos
    • Permissons
    • Roles
    • Users
      • User Settings
    • Saved Search
    • Collections
      • Collections Page
    • Messages
    • Exports
    • Contacts
    • HXL
    • Media
    • Verifier
    • Migration
    • Notification
    • Layer
    • Webhooks
    • Api Keys
    • Forms
      • Form Attribute
      • Form Contacts
      • Form Role
      • Form Stages
    • CSV
    • Test
  • V5
    • Overview
    • Posts
    • Surveys
    • Categories
Powered by GitBook
On this page
  1. V3

Saved Search

PreviousUser SettingsNextCollections

add saved search

POST https://ushahididocs.api.ushahidi.io/api/v3/savedsearches

Request Body

Name
Type
Description

filter

Object

The flter keyword

role

String

Roles

view

String

View type for saved search

description

String

Search description

name

String

name of search

user_id

String

The user identifier

view_options

String

View options

featured

Boolean

Set True for featured and false for not featured

{
    "id": 10,
    "url": null,
    "user": {
        "id": 2,
        "url": "http://localhost:8000/api/v3/users/2"
    },
    "filter": {
        "q": "test"
    },
    "name": "Test search",
    "description": "",
    "view": "list",
    "view_options": null,
    "role": null,
    "featured": false,
    "created": "2022-11-01T07:13:17+00:00",
    "updated": null,
    "allowed_privileges": [
        "read",
        "create",
        "update",
        "delete",
        "search"
    ]
}

edit saved search by ID

PUT https://ushahididocs.api.ushahidi.io/api/v3/savedsearches/4

Request Body

Name
Type
Description

filter

Object

The flter keyword

role

String

Roles

view

String

View type for saved search

description

String

Search description

name

String

name of search

user_id

String

The user identifier

view_options

String

View options

featured

Boolean

Set True for featured and false for not featured

{
    "id": 10,
    "url": null,
    "user": {
        "id": 2,
        "url": "http://localhost:8000/api/v3/users/2"
    },
    "filter": {
        "q": "test"
    },
    "name": "Test search",
    "description": "",
    "view": "list",
    "view_options": null,
    "role": null,
    "featured": false,
    "created": "2022-11-01T07:13:17+00:00",
    "updated": null,
    "allowed_privileges": [
        "read",
        "create",
        "update",
        "delete",
        "search"
    ]
}

get saved search by ID

get
Authorizations
Responses
200
OK
application/json
404
Not Found
application/json
get
GET /api/v3/savedsearches/4 HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": 4,
  "filter": {
    "q": "test"
  },
  "name": "Test search",
  "description": "",
  "view": "list",
  "featured": false,
  "created": "1970-01-01T00:00:00+00:00",
  "allowed_privileges": [
    "read",
    "create",
    "update",
    "delete",
    "search"
  ]
}

delete saved search by ID

delete
Authorizations
Responses
200
OK
application/json
401
Unauthorized
application/json
404
Not Found
application/json
delete
DELETE /api/v3/savedsearches/8 HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": 9,
  "user": {
    "id": 2,
    "url": "http://localhost:8000/api/v3/users/2"
  },
  "filter": {
    "q": "test"
  },
  "name": "Test search",
  "description": "",
  "view": "list",
  "featured": false,
  "created": "2022-10-12T19:01:13+00:00",
  "allowed_privileges": [
    "read",
    "create",
    "update",
    "delete",
    "search"
  ]
}
  • GETget saved search by ID
  • add saved search
  • edit saved search by ID
  • DELETEdelete saved search by ID