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
  2. Users

User Settings

PreviousUsersNextSaved Search

add user settings

POST https://ushahididocs.api.ushahidi.io/api/v3/users/5/settings

Request Body

Name
Type
Description

config_key

String

The configuration key

config_value

String

The configuration value

{
    "id": 1,
    "url": "http://localhost:8000/api/v3/user_settings/1",
    "user": {
        "id": 2,
        "url": "http://localhost:8000/api/v3/users/2"
    },
    "config_key": "api some key222",
    "config_value": "******alue",
    "created": "2030-01-01T06:00:00+00:00",
    "updated": "2022-10-12T18:09:31+00:00",
    "allowed_privileges": [
        "read",
        "create",
        "update",
        "delete",
        "search",
        "read_full",
        "register"
    ]
}{
    "id": 1,
    "url": "http://localhost:8000/api/v3/user_settings/1",
    "user": {
        "id": 2,
        "url": "http://localhost:8000/api/v3/users/2"
    },
    "config_key": "api some key222",
    "config_value": "******alue",
    "created": "2030-01-01T06:00:00+00:00",
    "updated": "2022-10-12T18:09:31+00:00",
    "allowed_privileges": [
        "read",
        "create",
        "update",
        "delete",
        "search",
        "read_full",
        "register"
    ]
}

edit user settings

PUT https://ushahididocs.api.ushahidi.io/api/v3/users/2/settings/6

Request Body

Name
Type
Description

config_key

String

The configuration key

config_value

String

The configuration value

{
    "id": 1,
    "url": "http://localhost:8000/api/v3/user_settings/1",
    "user": {
        "id": 2,
        "url": "http://localhost:8000/api/v3/users/2"
    },
    "config_key": "api some key222",
    "config_value": "******alue",
    "created": "2030-01-01T06:00:00+00:00",
    "updated": "2022-10-12T18:09:31+00:00",
    "allowed_privileges": [
        "read",
        "create",
        "update",
        "delete",
        "search",
        "read_full",
        "register"
    ]
}{
    "id": 1,
    "url": "http://localhost:8000/api/v3/user_settings/1",
    "user": {
        "id": 2,
        "url": "http://localhost:8000/api/v3/users/2"
    },
    "config_key": "api some key222",
    "config_value": "******alue",
    "created": "2030-01-01T06:00:00+00:00",
    "updated": "2022-10-12T18:09:31+00:00",
    "allowed_privileges": [
        "read",
        "create",
        "update",
        "delete",
        "search",
        "read_full",
        "register"
    ]
}

get user settings

get
Authorizations
Responses
200
OK
application/json
get
GET /api/v3/users/2/settings HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

OK

{
  "count": 1,
  "results": [
    {
      "id": 1,
      "url": "https://ushahididocs.api.ushahidi.io//api/v3/user_settings/1",
      "user": {
        "id": 2,
        "url": "https://ushahididocs.api.ushahidi.io//api/v3/users/2"
      },
      "config_key": "api some key",
      "config_value": "******alue",
      "created": "2030-01-01T06:00:00.000Z",
      "updated": "2030-01-01T06:00:00.000Z",
      "allowed_privileges": [
        "read",
        "create",
        "update",
        "delete",
        "search",
        "read_full",
        "register"
      ]
    }
  ],
  "offset": 0,
  "order": "asc",
  "orderby": "id",
  "curr": "https://ushahididocs.api.ushahidi.io//api/v3/users/2/settings?orderby=id&order=asc&offset=0",
  "next": "https://ushahididocs.api.ushahidi.io//api/v3/users/2/settings?orderby=id&order=asc&offset=0",
  "prev": "https://ushahididocs.api.ushahidi.io//api/v3/users/2/settings?orderby=id&order=asc&offset=0",
  "total_count": 1
}

delete user settings

delete
Authorizations
Responses
200
OK
application/json
404
Not Found
application/json
delete
DELETE /api/v3/users/1/settings/40 HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": 4,
  "url": "https://ushahididocs.api.ushahidi.io//api/v3/user_settings/4",
  "user": {
    "id": 2,
    "url": "https://ushahididocs.api.ushahidi.io//api/v3/users/2"
  },
  "config_key": "api some key2",
  "config_value": "******alue",
  "created": "2030-01-01T06:00:00.000Z",
  "updated": "2030-01-01T06:00:00.000Z",
  "allowed_privileges": [
    "read",
    "create",
    "update",
    "delete",
    "search",
    "read_full",
    "register"
  ]
}
  • GETget user settings
  • add user settings
  • edit user settings
  • DELETEdelete user settings