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. Forms

Form Role

PreviousForm ContactsNextForm Stages

edit form roles

PUT https://ushahididocs.api.ushahidi.io/api/v3/forms/2/roles

Request Body

Name
Type
Description

form_id

String

The form ID

roles

Array

List of roles by ID

{
    // Response
}

get form roles

get
Authorizations
Query parameters
orderbystringOptional

Sorting parameter Available values : entity fields Default value : id

Example: id
orderstringOptional

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

Example: Desc
limitinteger · int32Optional

Paging parameter Default value : null

Example: 2
offsetinteger · int32Optional

Paging parameter Default value : 0

Example: 3
rolesinteger · int32Optional

Filter parameter check the role value

Example: 1
Responses
200
OK
application/json
get
GET /api/v3/forms/2/roles HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

OK

{
  "count": 1,
  "results": [
    {
      "id": 1,
      "url": "http://localhost:8000/forms/2/roles/1",
      "form_id": 2,
      "role_id": 1,
      "allowed_privileges": [
        "read",
        "create",
        "update",
        "delete",
        "search"
      ]
    }
  ],
  "offset": 0,
  "order": "asc",
  "orderby": "role_id",
  "curr": "http://localhost:8000/api/v3/forms/2/roles?orderby=role_id&order=asc&offset=0",
  "next": "http://localhost:8000/api/v3/forms/2/roles?orderby=role_id&order=asc&offset=0",
  "prev": "http://localhost:8000/api/v3/forms/2/roles?orderby=role_id&order=asc&offset=0",
  "total_count": 1
}
  • GETget form roles
  • edit form roles