Beta APIs

[beta] Get a Function.

Retrieve the current state of an existing Function, including its configuration, code package status, and a lastUpdateTimestampMs value for use in subsequent PATCH requests.

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

To use this endpoint, select Read Functions under the Functions 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/functions/{name}

Request

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

Path parameters

namestring required

The name of the Function to retrieve.

Response

OK response.

Example response

{
  "data": {
    "codePackage": {
      "downloadGetUrl": "https://example.com/download?token=...",
      "status": "deployed"
    },
    "config": {
      "handler": "index.handler",
      "isScheduleEnabled": true,
      "params": {
        "Nihil vitae modi accusamus est.": "Eos dolor magni mollitia.",
        "Qui ex quos perferendis eveniet repudiandae.": "Qui quia quam quam vel voluptas."
      },
      "schedule": {
        "entries": [
          {
            "daysOfWeek": [
              false,
              true,
              true,
              true,
              true,
              true,
              false
            ],
            "timeSinceMidnightMs": 32400000
          }
        ],
        "timezone": "America/Los_Angeles"
      },
      "secrets": {
        "Qui sint earum cum nam voluptatum nihil.": "Voluptatem est nemo nisi.",
        "Sequi eos sunt.": "Fuga quisquam distinctio nostrum rerum debitis ut."
      }
    },
    "createdAtTime": "2021-01-01T00:00:00Z",
    "description": "Processes incoming telemetry data.",
    "effects": {
      "nextScheduledAtTime": "2021-01-01T00:00:00Z"
    },
    "lastUpdateTimestampMs": 1609459200000,
    "name": "my-function",
    "updatedAtTime": "2021-01-01T00:00:00Z"
  }
}

Changes

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