Skip to main content

Get Deployment Logs

Retrieve all deployments for a specific application, compose project, or server.

GET /deployment.all

Get all deployments for an application.
applicationId
string
required
The unique identifier of the application

Authentication

This endpoint requires authentication using an API key or session token.

Example Request

curl -X GET "https://your-dokploy-instance.com/api/deployment.all?applicationId=app_123" \
  -H "Authorization: Bearer YOUR_TOKEN"

Example Response

[
  {
    "deploymentId": "dep_abc123",
    "applicationId": "app_123",
    "status": "success",
    "createdAt": "2024-03-15T10:00:00.000Z",
    "completedAt": "2024-03-15T10:05:00.000Z",
    "logPath": "/logs/dep_abc123.log"
  }
]

Get Deployments by Compose

GET /deployment.allByCompose

Retrieve all deployments for a Docker Compose project.
composeId
string
required
The unique identifier of the compose project

Example Request

curl -X GET "https://your-dokploy-instance.com/api/deployment.allByCompose?composeId=compose_456" \
  -H "Authorization: Bearer YOUR_TOKEN"

Get Deployments by Server

GET /deployment.allByServer

Retrieve all deployments for a specific server.
serverId
string
required
The unique identifier of the server

Example Request

curl -X GET "https://your-dokploy-instance.com/api/deployment.allByServer?serverId=server_789" \
  -H "Authorization: Bearer YOUR_TOKEN"

Get Deployments by Type

GET /deployment.allByType

Retrieve deployments filtered by resource type.
id
string
required
The unique identifier of the resource
type
string
required
The type of deployment resourceAllowed values:
  • application
  • compose
  • server
  • schedule
  • previewDeployment
  • backup
  • volumeBackup

Example Request

curl -X GET "https://your-dokploy-instance.com/api/deployment.allByType?id=res_123&type=application" \
  -H "Authorization: Bearer YOUR_TOKEN"

Kill Deployment Process

POST /deployment.killProcess

Terminate a running deployment process.
deploymentId
string
required
The unique identifier of the deployment to terminate

Example Request

curl -X POST "https://your-dokploy-instance.com/api/deployment.killProcess" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "deploymentId": "dep_abc123"
  }'

Example Response

{
  "success": true,
  "message": "Deployment process terminated"
}

Read Request Statistics

POST /settings.readStatsLogs

Retrieve access logs and request statistics with filtering and pagination.
This endpoint is disabled on Dokploy Cloud instances.
page
number
Page number for pagination (default: 1)
sort
object
Sorting configuration for results
Search term to filter logs
status
string
Filter logs by HTTP status code
dateRange
object
Date range filter for logs
start
string
Start date in ISO format
end
string
End date in ISO format

Example Request

curl -X POST "https://your-dokploy-instance.com/api/settings.readStatsLogs" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "page": 1,
    "search": "/api",
    "status": "200",
    "dateRange": {
      "start": "2024-03-01T00:00:00.000Z",
      "end": "2024-03-15T23:59:59.999Z"
    }
  }'

Example Response

{
  "data": [
    {
      "timestamp": "2024-03-15T10:30:15.000Z",
      "method": "GET",
      "path": "/api/projects",
      "status": 200,
      "duration": 45,
      "ip": "192.168.1.100",
      "userAgent": "Mozilla/5.0..."
    }
  ],
  "totalCount": 1250
}

Toggle Request Logging

POST /settings.toggleRequests

Enable or disable request logging in Traefik.
This endpoint is disabled on Dokploy Cloud instances.
enable
boolean
required
Set to true to enable request logging, false to disable

Example Request

curl -X POST "https://your-dokploy-instance.com/api/settings.toggleRequests" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "enable": true
  }'

Example Response

{
  "success": true,
  "enabled": true
}

Check Active Requests

GET /settings.haveActivateRequests

Check if request logging is currently enabled.

Example Request

curl -X GET "https://your-dokploy-instance.com/api/settings.haveActivateRequests" \
  -H "Authorization: Bearer YOUR_TOKEN"

Example Response

{
  "enabled": true,
  "filePath": "/etc/dokploy/traefik/dynamic/access.log"
}

Build docs developers (and LLMs) love