API
Userdata
List userdata scripts

List Userdata Scripts

  • Name
    get
    Type
    /v1/userdata
    Description

    You can get a list of userdata scripts associated with your account by sending a GET.

Request

Example

curl -X GET "https://api.simplystack.com/v1/userdata" \
  -H "Content-Type: application/json" \
  -H "Authorization: Token d359ad9cc9422b5ff07aede0cd2707da4ff82be0"

Response

JSON object with a key named userdata which is an array of the following attributes:

Attributes

See userdata model.

Example

json
{
  "userdata": [
    {
      "uuid": "69604814-f02f-4978-8c90-4a0957889218",
      "name": "script01",
      "userdata": "#!/bin/sh\necho "Hello World.  The time is now $(date -R)!" | tee /root/output.txt",
      "created_at": "2021-02-01T12:14:47.134880Z"
    },
    {
      "uuid": "55722f46-e520-4e27-ba37-68b8c468a038",
      "name": "script02",
      "userdata": "#!/bin/sh\necho "Hello World.  The time is now $(date -R)!" | tee /root/output.txt",
      "created_at": "2021-02-02T17:14:47.134880Z"
    }
  ],
  "meta": {
    "pagination": {
      "current_page": 1,
      "next_page": null,
      "pages": 1,
      "per_page": 25,
      "previous_page": null,
      "total": 2
    },
    "query": null,
    "sort": null
  }
}