# Projects

## Overview of all projects

<mark style="color:blue;">`GET`</mark> `https://cronly.app/api/projects`

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer: `API token` |

{% tabs %}
{% tab title="200 All of your projects" %}

```json
[
    {
        "id": 2,
        "name": "Project name",
        "company_id": 1,
        "deleted_at": null,
        "created_at": "2022-05-30T13:28:12.000000Z",
        "updated_at": "2022-05-30T13:28:12.000000Z"
    }
]
```

{% endtab %}
{% endtabs %}

## Details of project

<mark style="color:blue;">`GET`</mark> `https://cronly.app/api/projects/{id}`

#### Query Parameters

| Name                                 | Type    | Description                            |
| ------------------------------------ | ------- | -------------------------------------- |
| id<mark style="color:red;">\*</mark> | Integer | The ID of the project you want to view |

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer: `API token` |

{% tabs %}
{% tab title="200 The project" %}

```json
{
    "id": 2,
    "name": "Project name",
    "company_id": 1,
    "deleted_at": null,
    "created_at": "2022-05-30T13:28:12.000000Z",
    "updated_at": "2022-05-30T13:28:12.000000Z"
}
```

{% endtab %}

{% tab title="404: Not Found The project was not found" %}

```json
{
    "error": "Project not found"
}
```

{% endtab %}
{% endtabs %}

## Create a new project

<mark style="color:green;">`POST`</mark> `https://cronly.app/api/projects`

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer: `API token` |

#### Request Body

| Name                                   | Type   | Description |
| -------------------------------------- | ------ | ----------- |
| name<mark style="color:red;">\*</mark> | String |             |

{% tabs %}
{% tab title="200 The newly created project" %}

```json
{
    "name": "new project",
    "company_id": 1,
    "updated_at": "2022-05-31T19:50:29.000000Z",
    "created_at": "2022-05-31T19:50:29.000000Z",
    "id": 4
}
```

{% endtab %}
{% endtabs %}

## Delete a project

<mark style="color:red;">`DELETE`</mark> `https://cronly.app/api/projects/{id}`

#### Query Parameters

| Name                                 | Type    | Description                                |
| ------------------------------------ | ------- | ------------------------------------------ |
| id<mark style="color:red;">\*</mark> | Integer | The ID of the certificate you want to view |

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer: `API token` |

{% tabs %}
{% tab title="204: No Content The project has been deleted successfully" %}

```json
{
    "success": "Project deleted"
}
```

{% endtab %}

{% tab title="404: Not Found The project was not found" %}

```json
{
    "error": "Project not found"
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cronly.app/api/cron-job-monitor-3.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
