You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

/api/import/forms

Lists all data import forms available to the user.

Resource Information

Request Parameters

None.

Response Structure

{
  "importForms": [ ]
}

Element "importForms" is an array that contains multiple form objects with following definition: 

Name

Description

id

Import form identifier.

name

Name of import form.

recordTimestampBoolean flag indicating if timestamp should be recorded.
elements

Array of form elements - fields.

NameDescription
idElement identifier.
nameElement name - title displayed next to field.
type

Element type. Allowed values:

ValueDescription
usernameField for username values
textfieldField for text values
datefieldField for dates
checkboxField for boolean values
timestampField for timestamps
selectField for selection

Sample Request / Response

Using curl:

curl -H "Authorization: OAuth realm=\"https://service.belladati.com/\", oauth_consumer_key=\"myConsumer\", oauth_token=\"mh7an9dkrg59\", oauth_timestamp=\"135131231\", oauth_nonce=\"randomString\"" https://service.belladati.com/api/import/forms

The JSON format response:

{
  "importForms": [
    {
      "id": 123,
      "name": "My Data Collecting Form",
      "recordTimestamp": false,
      "elements": [
        {
          "id": "mNdZBe1rMY",
          "name": "Username",
          "type": "username"
        },
        {
          "id": "wo35CMzcGV",
          "name": "Country",
          "type": "textfield"
        },
        {,
          "id": "N9zpsXG4WI",
          "name": "Birth Date",
          "type": "datefield",
          "mapToDateColumn": true
        },
        {
          "id": "ZdXAW61ko5",
          "name": "Gender",
          "type": "select",
          "items": [
            {"name": "Male"},
            {"name": "Female"},
            {"name": "Other"}
          ]
        },
        {
          "name": "Are you smiling right now?",
          "id": "WSyh9tSkut",
          "type": "checkbox"
        },
        {
          "name": "Timestamp Value",
          "id": "mw0qjAfe66",
          "type": "timestamp"
        }
      ]
    }
  ]
}
  • No labels