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

Configuration

PreviousTagsNextData provider

Edit Configuration

PUT https://ushahididocs.api.ushahidi.io/api/v3/config/map

Request Body

Name
Type
Description

lat

Integer

Map latitude

default_view

Object

This object contains more data on the map view

location_precision

Integer

location precision

cluster_radius

Integer

The cluster radius

clustering

Boolean

True for clustering and false for not clustering

url

String

Configuration URL

id

String

Body Identifier for configuration. E.g. Map

fit_map_boundaries

Boolean

Set True to fit map boundaries and false not to fit boundaries

baselayer

String

View base area

zoom

integer

Map zoom

lon

Integer

Map longitude

color

String

view color

icon

String

map icon name

allowed_privileges

Objects

The configuration privilege

{
    "id": "map",
    "url": "http://localhost:8000/api/v3/config/map",
    "clustering": false,
    "cluster_radius": 80,
    "location_precision": 2,
    "default_view": {
        "lat": -1.3048035,
        "lon": 36.8473969,
        "zoom": 3,
        "baselayer": "MapQuestAerial",
        "fit_map_boundaries": true,
        "icon": "map-marker",
        "color": "blue"
    },
    "allowed_privileges": [
        "read",
        "create",
        "update",
        "delete",
        "search"
    ]
}

get configuration

get
Authorizations
Responses
200
OK
application/json
401
Unauthorized
application/json
get
GET /api/v3/config HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "count": 8,
  "results": [
    {
      "id": "features",
      "url": "http://localhost:8000/api/v3/config/features",
      "views": {
        "data": true,
        "map": true,
        "list": true,
        "chart": true,
        "timeline": true,
        "activity": true,
        "plan": false
      },
      "data-providers": {
        "smssync": true,
        "twitter": true,
        "frontlinesms": true,
        "email": true,
        "outgoingemail": true,
        "twilio": true,
        "nexmo": true,
        "testservice": false,
        "gmail": false
      },
      "limits": {
        "posts": true,
        "forms": true,
        "admin_users": true
      },
      "private": {
        "enabled": true
      },
      "disable_registration": {
        "enabled": true
      },
      "roles": {
        "enabled": true
      },
      "webhooks": {
        "enabled": true
      },
      "data-import": {
        "enabled": true
      },
      "targeted-surveys": {
        "enabled": false
      },
      "csv-speedup": {
        "enabled": false
      },
      "hxl": {
        "enabled": true
      },
      "user-settings": {
        "enabled": true
      },
      "anonymise-reporters": {
        "enabled": true
      },
      "donation": {
        "enabled": true
      },
      "gmail-support": {
        "enabled": false
      },
      "allowed_privileges": [
        "read",
        "delete",
        "search"
      ]
    },
    {
      "id": "site",
      "url": "http://localhost:8000/api/v3/config/site",
      "name": "Ushahidi",
      "description": "This is my Ushahidi deployment. There are many like it, but this one is mine.",
      "email": "someone@somewhere.somehow",
      "timezone": "UTC",
      "language": "en-US",
      "date_format": "n/j/Y",
      "client_url": false,
      "first_login": true,
      "tier": "free",
      "private": false,
      "donation": {
        "enabled": false,
        "title": "",
        "description": "",
        "wallet": "",
        "images": []
      },
      "allowed_privileges": [
        "read",
        "create",
        "update",
        "delete",
        "search"
      ]
    },
    {
      "id": "deployment_id",
      "url": "http://localhost:8000/api/v3/config/deployment_id",
      "multisite": [],
      "analytics": [],
      "allowed_privileges": [
        "read",
        "delete",
        "search"
      ]
    },
    {
      "id": "test",
      "url": "http://localhost:8000/api/v3/config/test",
      "testkey": "testval",
      "allowed_privileges": [
        "read",
        "create",
        "update",
        "delete",
        "search"
      ]
    },
    {
      "id": "data-provider",
      "url": "http://localhost:8000/api/v3/config/data-provider",
      "providers": {
        "smssync": true,
        "email": false,
        "outgoingemail": false,
        "twilio": true,
        "nexmo": true,
        "twitter": false,
        "frontlinesms": true,
        "gmail": false
      },
      "authenticable-providers": {
        "gmail": true
      },
      "email": {
        "incoming_type": "",
        "incoming_server": "",
        "incoming_port": "",
        "incoming_security": "",
        "incoming_username": "",
        "incoming_password": ""
      },
      "twilio": {
        "account_sid": "1234",
        "sms_auto_response": "Thanks!"
      },
      "smssync": {
        "from": "12345",
        "secret": "1234"
      },
      "twitter": {},
      "nexmo": {
        "from": "",
        "api_key": "",
        "api_secret": ""
      },
      "frontlinesms": {
        "f": "12345",
        "key": "1234",
        "frontlinecloud_api_url": "http://frontlinesms.com:8130/api/1/webconnection/11",
        "secret": "abc123"
      },
      "gmail": {
        "redirect_uri": "urn:ietf:wg:oauth:2.0:oob",
        "authenticated": false
      },
      "default_providers": {
        "sms": "smssync",
        "ivr": false,
        "email": "email",
        "twitter": "twitter"
      },
      "allowed_privileges": [
        "read",
        "create",
        "update",
        "delete",
        "search"
      ]
    },
    {
      "id": "map",
      "url": "http://localhost:8000/api/v3/config/map",
      "clustering": false,
      "cluster_radius": 50,
      "location_precision": 2,
      "default_view": {
        "lat": -1.3048035,
        "lon": 36.8473969,
        "zoom": 3,
        "baselayer": "MapQuestAerial",
        "fit_map_boundaries": true,
        "icon": "map-marker",
        "color": "blue"
      },
      "allowed_privileges": [
        "read",
        "create",
        "update",
        "delete",
        "search"
      ]
    },
    {
      "id": "twitter",
      "url": "http://localhost:8000/api/v3/config/twitter",
      "allowed_privileges": [
        "read",
        "create",
        "update",
        "delete",
        "search"
      ]
    },
    {
      "id": "gmail",
      "url": "http://localhost:8000/api/v3/config/gmail",
      "allowed_privileges": [
        "read",
        "create",
        "update",
        "delete",
        "search"
      ]
    }
  ]
}

Get map configuration

get
Authorizations
Responses
200
OK
application/json
404
Not Found
application/json
get
GET /api/v3/config/map HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": "features",
  "url": "https://ushahididocs.api.ushahidi.io//api/v3/config/features",
  "views": {
    "data": true,
    "map": true,
    "list": true,
    "chart": true,
    "timeline": true,
    "activity": true,
    "plan": false
  },
  "data-providers": {
    "smssync": true,
    "twitter": true,
    "frontlinesms": true,
    "email": true,
    "outgoingemail": true,
    "twilio": true,
    "nexmo": true,
    "testservice": false,
    "gmail": false
  },
  "limits": {
    "posts": true,
    "forms": true,
    "admin_users": true
  },
  "private": {
    "enabled": true
  },
  "disable_registration": {
    "enabled": true
  },
  "roles": {
    "enabled": true
  },
  "webhooks": {
    "enabled": true
  },
  "data-import": {
    "enabled": true
  },
  "targeted-surveys": {
    "enabled": false
  },
  "csv-speedup": {
    "enabled": false
  },
  "hxl": {
    "enabled": true
  },
  "user-settings": {
    "enabled": true
  },
  "anonymise-reporters": {
    "enabled": true
  },
  "donation": {
    "enabled": true
  },
  "gmail-support": {
    "enabled": false
  },
  "allowed_privileges": [
    "read",
    "search"
  ]
}
  • GETget configuration
  • GETGet map configuration
  • Edit Configuration