List scripts
List all the scripts for the current user
GET api/scripts
Example request:
curl -X GET "https://ploi.io/api/scripts" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
{
"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
}
}