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

Tags

PreviousSub Posts & TranslationNextConfiguration

Add tag

POST ushahididocs.api.ushahidi.io/api/v3/tags

Request Body

Name
Type
Description

parent_id

integer

Parent identifier for Tag

icon

String

Tag icon name

description

String

Tag description

color

String

Tag color

type

String

Type of tag

tag

String

Tag name

role

Array

Tag role

priority

Integer

Tag priority value

children

Array

An array of other dependent children tag

{
  "id": 0,
  "url": "string",
  "parent_id": "string",
  "tag": "string",
  "slug": "string",
  "type": "string",
  "color": "string",
  "icon": "string",
  "description": "string",
  "priority": 0,
  "created": "string",
  "role": [
    "string"
  ],
  "children": [
    "string"
  ],
  "allowed_privileges": [
    "string"
  ]
}

Edit tag

PUT ushahididocs.api.ushahidi.io/api/v3/tags/2

Request Body

Name
Type
Description

parent_id

Integer

Parent identifier for Tag

icon

String

Tag icon name

description

String

Tag description

color

String

Tag color

type

String

Type of tag

tag

String

Tag name

role

Array

Tag role

priority

Integer

Tag priority value

children

Array

An array of other dependent children tag

{
  "id": 0,
  "url": "string",
  "parent_id": "string",
  "tag": "string",
  "slug": "string",
  "type": "string",
  "color": "string",
  "icon": "string",
  "description": "string",
  "priority": 0,
  "created": "string",
  "role": [
    "string"
  ],
  "children": [
    "string"
  ],
  "allowed_privileges": [
    "string"
  ]
}

Get tags

get
Authorizations
Query parameters
orderbystringOptional

Sorting parameter Available values : entity fields Default value : id

orderstringOptional

Sorting parameter Available values : [ASC,DESC] !! Default value : ASC "default not working"

limitinteger · int32Optional

Paging parameter Default value : null

offsetinteger · int32Optional

Paging parameter Default value : 0

tagstringOptional

Filter parameter return categories have a tag field exactly same as the value

typestringOptional

Filter parameter return categories have a this type

qstringOptional
levelstringOptional

Filter parameter return only parent categories if it has (parent) value

parent_idinteger · int32Optional

filter paramter return the sub categories of parent

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

OK

{
  "count": 2,
  "results": [
    {
      "id": 10,
      "url": "https://ushahididocs.api.ushahidi.io//api/v3/tags/10",
      "parent": {
        "id": 9,
        "url": "https://ushahididocs.api.ushahidi.io//api/v3/tags/9"
      },
      "tag": "Child 1",
      "slug": "child-one",
      "type": "category",
      "icon": "tag",
      "priority": 0,
      "created": "1970-01-01T00:00:00.000Z",
      "role": [
        "admin"
      ],
      "children": [],
      "allowed_privileges": [
        "read",
        "create",
        "update",
        "delete",
        "search"
      ]
    },
    {
      "id": 11,
      "url": "https://ushahididocs.api.ushahidi.io//api/v3/tags/11",
      "parent": {
        "id": 9,
        "url": "https://ushahididocs.api.ushahidi.io//api/v3/tags/9"
      },
      "tag": "Child 2",
      "slug": "child-two",
      "type": "category",
      "icon": "tag",
      "priority": 0,
      "created": "1970-01-01T00:00:00.000Z",
      "role": [
        "admin"
      ],
      "children": [],
      "allowed_privileges": [
        "read",
        "create",
        "update",
        "delete",
        "search"
      ]
    }
  ],
  "offset": 0,
  "order": "asc",
  "orderby": "id",
  "curr": "https://ushahididocs.api.ushahidi.io//api/v3/tags?orderby=id&order=asc&offset=0",
  "next": "https://ushahididocs.api.ushahidi.io//api/v3/tags?orderby=id&order=asc&offset=0",
  "prev": "https://ushahididocs.api.ushahidi.io//api/v3/tags?orderby=id&order=asc&offset=0",
  "total_count": 2
}

Get tag

get
Authorizations
Responses
200
OK
application/json
404
Not Found
application/json
get
GET /api/v3/tags/5 HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": 1,
  "url": "https://ushahididocs.api.ushahidi.io//api/v3/tags/1",
  "tag": "Test tag",
  "slug": "test-tag",
  "type": "category",
  "icon": "tag",
  "priority": 0,
  "created": "1970-01-01T00:00:00.000Z",
  "role": [
    "admin",
    "user"
  ],
  "children": [],
  "allowed_privileges": [
    "read",
    "create",
    "update",
    "delete",
    "search"
  ]
}

Delete tag

delete
Authorizations
Responses
200
OK
application/json
404
Not Found
application/json
delete
DELETE /api/v3/tags/5 HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": 5,
  "url": "https://ushahididocs.api.ushahidi.io//api/v3/tags/5",
  "tag": "Todo",
  "slug": "todo",
  "type": "status",
  "icon": "tag",
  "priority": 0,
  "created": "1970-01-01T00:00:00.000Z",
  "children": [
    {
      "id": 7,
      "url": "https://ushahididocs.api.ushahidi.io//api/v3/tags/7"
    },
    {
      "id": 23,
      "url": "https://ushahididocs.api.ushahidi.io//api/v3/tags/23"
    }
  ],
  "allowed_privileges": [
    "read",
    "create",
    "update",
    "delete",
    "search"
  ]
}
  • GETGet tags
  • Add tag
  • Edit tag
  • GETGet tag
  • DELETEDelete tag