Forms

Get a list of form templates.

Returns a list of the organization's form templates for the specified list of IDs. If no IDs are provided, all form templates for the organization will be returned.

<b>Rate limit:</b> 5 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).

To use this endpoint, select Read Form Submissions under the Forms category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>

Submit Feedback: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.

get/form-templates

Request

  • Base URL
    https://api.samsara.com
  • Auth
    HTTP bearer

Query parameters

idsstring[]

A comma-separated list containing up to 100 template IDs to filter on.

afterstring

If specified, this should be the endCursor value from the previous page of results. When present, this request will return the next page of results that occur immediately after the previous page of results.

Response

OK response.

Example response

{
  "data": [
    {
      "approvalConfig": {
        "singleApprovalConfig": {
          "allowManualApproverSelection": true,
          "requirements": {
            "roleIds": [
              "23d4d8d3-dc10-4e7a-a183-69968751f23e"
            ]
          }
        },
        "type": "singleApproval"
      },
      "createdAtTime": "2019-06-13T19:08:25Z",
      "createdBy": {
        "id": "938172",
        "type": "driver"
      },
      "description": "This is a form template description.",
      "fields": [
        {
          "allowManualEntry": true,
          "allowedAssetTypes": [
            "vehicle",
            "trailer"
          ],
          "allowedDateTimeValueType": "datetime",
          "autofillFromId": "9814a1fa-f0c6-408b-bf85-51dc3bc71ac7",
          "columns": [
            {
              "allowManualEntry": true,
              "allowedDateTimeValueType": "datetime",
              "filterByRoleIds": [
                "23d4d8d3-dc10-4e7a-a183-69968751f23e"
              ],
              "id": "9814a1fa-f0c6-408b-bf85-51dc3bc71ac7",
              "includeDrivers": true,
              "includeUsers": true,
              "label": "Engine Hours",
              "numDecimalPlaces": 2,
              "options": [
                {
                  "id": "e879028d-bce5-0238-ffec-11cd9236bcda",
                  "label": "Yes",
                  "optionScoreWeight": 5
                }
              ],
              "type": "number"
            }
          ],
          "conditionalActions": [
            {
              "actions": [
                {
                  "fieldId": "bd673690-f09b-4f3d-93bd-99c4b2971554",
                  "sectionId": "bd673690-f09b-4f3d-93bd-99c4b2971554",
                  "type": "askFollowupQuestion"
                }
              ],
              "condition": {
                "selectedOptionIds": [
                  "9814a1fa-f0c6-408b-bf85-51dc3bc71ac7"
                ],
                "type": "multipleChoiceValueCondition"
              }
            }
          ],
          "filterByRoleIds": [
            "23d4d8d3-dc10-4e7a-a183-69968751f23e"
          ],
          "id": "9814a1fa-f0c6-408b-bf85-51dc3bc71ac7",
          "includeDrivers": true,
          "includeUsers": true,
          "isAutofillSource": true,
          "isRequired": true,
          "label": "Engine Hours",
          "numDecimalPlaces": 2,
          "options": [
            {
              "id": "e879028d-bce5-0238-ffec-11cd9236bcda",
              "label": "Yes",
              "optionScoreWeight": 5
            }
          ],
          "questionWeight": 5,
          "type": "number"
        }
      ],
      "formCategory": "general",
      "id": "9814a1fa-f0c6-408b-bf85-51dc3bc71ac7",
      "revisionId": "1214a1fa-f0c6-408b-bf85-51dc3bc71ac7",
      "sections": [
        {
          "fieldIndexLastInclusive": 9,
          "id": "dbab5bc8-e41c-4b52-bfa5-fd2c7e809b00",
          "label": "Engine Hours"
        }
      ],
      "title": "Form Template Title",
      "updatedAtTime": "2019-06-13T19:08:25Z",
      "updatedBy": {
        "id": "938172",
        "type": "driver"
      }
    }
  ],
  "pagination": {
    "endCursor": "MjkY",
    "hasNextPage": true
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.