Ploi API
Ploi API

Create project

Create a project

POST api/projects

Parameters

Parameter Type Status Description
title string required The title to recognize the project
servers array optional An array of ID's of your servers to attach to this project, if a server is already attached to another project you cannot attach it to the newly created one.
sites array optional An array of ID's of your sites to attach to this project, if a site is already attached to another project you cannot attach it to the newly created one.

Example request:

curl -X POST "https://ploi.io/api/projects" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
   --data '{"title":"My Awesome Project"}'

Example response:

HTTP/1.1 201 CREATED
Content-Type: application/json

{
    "data": {
        "id": 1,
        "title": "My Awesome Project",
        "servers": [],
        "sites": [],
        "created_at": "2022-07-29 07:44:23"
    }
}