List scripts

List all the scripts for the current user.


GET/api/scripts

List all scripts

Returns a paginated list of all scripts in your account.

Request

GET
/api/scripts
curl -X GET "https://ploi.io/api/scripts" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json"

Response

{
  "data": [
    {
      "id": 1,
      "user": "root",
      "label": "Install Elastic Search",
      "content": "#!/bin/bash\n\napt-get install elasticsearch\"",
      "created_at": "2018-06-18 14:05:00"
    }
  ],
  "links": {
    "first": "http://ploi.io/api/scripts?page=1",
    "last": "http://ploi.io/api/scripts?page=1",
    "prev": null,
    "next": null
  },
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 1,
    "path": "http://ploi.test/api/scripts",
    "per_page": 15,
    "to": 1,
    "total": 1
  }
}