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

Exports

PreviousMessagesNextContacts

add export

POST https://ushahididocs.api.ushahidi.io/api/v3/exports/jobs

Request Body

Name
Type
Description

user_id

String

The user identifier

url_expiration

Integer

updated

String

header_row

String

status

String

filters

String

fields

String

entity_type

String

The entity types

hxl_heading_row

String

send_to_hdx

String

Set true to send HXL and false not to send HXL

send_to_browser

String

include_hxl

Boolean

Set true to include HXL and false not to include HXL

total_rows

String

total_batches

String

hxl_meta_data_id

String

{
    "id": 9,
    "url": null,
    "user": {
        "id": 2,
        "url": "http://localhost:8000/api/v3/users/2"
    },
    "entity_type": "post",
    "fields": null,
    "filters": {
        "status": [
            "all"
        ]
    },
    "status": "PENDING",
    "header_row": null,
    "created": "2022-11-02T15:42:55+00:00",
    "updated": null,
    "url_expiration": 0,
    "include_hxl": false,
    "send_to_browser": true,
    "send_to_hdx": false,
    "hxl_heading_row": null,
    "hxl_meta_data_id": null,
    "total_batches": null,
    "total_rows": null,
    "allowed_privileges": [
        "read",
        "create",
        "update",
        "delete",
        "search"
    ]
}

edit export

PUT https://ushahididocs.api.ushahidi.io/api/v3/exports/jobs/1

Request Body

Name
Type
Description

user_id

String

The user identifier

url_expiration

Integer

updated

String

header_row

String

status

String

filters

String

fields

String

entity_type

String

The entity types

hxl_heading_row

String

send_to_hdx

String

Set true to send HXL and false not to send HXL

send_to_browser

String

include_hxl

Boolean

Set true to include HXL and false not to include HXL

total_rows

String

total_batches

String

hxl_meta_data_id

String

{
    "id": 9,
    "url": null,
    "user": {
        "id": 2,
        "url": "http://localhost:8000/api/v3/users/2"
    },
    "entity_type": "post",
    "fields": null,
    "filters": {
        "status": [
            "all"
        ]
    },
    "status": "PENDING",
    "header_row": null,
    "created": "2022-11-02T15:42:55+00:00",
    "updated": null,
    "url_expiration": 0,
    "include_hxl": false,
    "send_to_browser": true,
    "send_to_hdx": false,
    "hxl_heading_row": null,
    "hxl_meta_data_id": null,
    "total_batches": null,
    "total_rows": null,
    "allowed_privileges": [
        "read",
        "create",
        "update",
        "delete",
        "search"
    ]
}

get exports

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

Example: asc
limitinteger · int32Optional

Paging parameter Default value : null

Example: 2
offsetinteger · int32Optional

Paging parameter Default value : 0

Example: 3
max_expirationstringOptional

filter parameter return jobs with url_expiration less than this date or have 0 value

Example: 2018-08-22
userstringOptional

filter parameter return jobs that created by user/users accept multi values

Example: 2,3
entity_typestringOptional
Responses
200
OK
application/json
401
Unauthorized
application/json
get
GET /api/v3/exports/jobs HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "count": 1,
  "results": [
    {
      "id": 1,
      "url": "text",
      "user": "{\"id\":1,\"url\":\"http://localhost:8000/api/v3/users/1\"}",
      "entity_type": "text",
      "fields": "text",
      "filters": {
        "status": [
          "text"
        ]
      },
      "status": "text",
      "header_row": {
        "label": "text",
        "key": "text",
        "type": "text",
        "input": "text",
        "form_id": 1,
        "form_stage_id": 1,
        "form_stage_priority": 1,
        "priority": 1,
        "unstructured": true,
        "id": "text",
        "instructions": "text",
        "required": "text",
        "default": "text",
        "options": "text",
        "cardinality": "text",
        "config": "text",
        "response_private": "text",
        "description": "text",
        "form_name": "text"
      },
      "created": "text",
      "updated": "text",
      "url_expiration": 1,
      "include_hxl": true,
      "send_to_browser": true,
      "send_to_hdx": true,
      "hxl_heading_row": [
        "text"
      ],
      "hxl_meta_data_id": 1,
      "total_batches": "text",
      "total_rows": "text",
      "allowed_privileges": [
        "text"
      ]
    }
  ],
  "limit": "text",
  "offset": 1,
  "order": "text",
  "orderby": "text",
  "curr": "text",
  "next": "text",
  "prev": "text",
  "total_count": 1
}

get export

get
Authorizations
Responses
200
OK
application/json
401
Unauthorized
application/json
404
Not Found
application/json
get
GET /api/v3/exports/jobs/1 HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": 1,
  "user": {
    "id": 2,
    "url": "http://localhost:8000/api/v3/users/2"
  },
  "entity_type": "post",
  "created": "1970-01-01T00:00:00+00:00",
  "url_expiration": 0,
  "include_hxl": false,
  "send_to_browser": false,
  "send_to_hdx": false,
  "hxl_meta_data_id": 1,
  "allowed_privileges": [
    "read",
    "create",
    "update",
    "delete",
    "search"
  ]
}
  • GETget exports
  • add export
  • edit export
  • GETget export