Saved Search

get saved search by ID

get
Authorizations
Responses
200
OK
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"
  ]
}

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"
    ]
}

delete saved search by ID

delete
Authorizations
Responses
200
OK
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"
  ]
}