List projects

List all the projects for the current user.


GET/api/projects

List all projects

This endpoint allows you to retrieve a paginated list of all projects for the current user.

Request

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

Response

{
  "data": [
    {
      "id": 7,
      "title": "My Project",
      "servers": [],
      "sites": [
        {
          "id": 1,
          "root_domain": "example.com"
        }
      ],
      "created_at": "2022-07-29 07:37:51"
    }
  ],
  "links": {
    "first": "http://ploi.test/api/projects?page=1",
    "last": "http://ploi.test/api/projects?page=1",
    "prev": null,
    "next": null
  },
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 1,
    "links": [
      {
        "url": null,
        "label": "«",
        "active": false
      },
      {
        "url": "http://ploi.test/api/projects?page=1",
        "label": "1",
        "active": true
      },
      {
        "url": null,
        "label": "»",
        "active": false
      }
    ],
    "path": "http://ploi.test/api/projects",
    "per_page": 15,
    "to": 4,
    "total": 4
  }
}