Skip to content

jenkins.php

Jenkins integration module for task management: retrieving the list of available tasks and executing them for servers.

API Methods

Method Action Description
get_tasks get Jenkins task list Returns the list of available Jenkins tasks accessible to the current user or client.

jenkins/get_tasks

Returns the list of available Jenkins tasks accessible to the current user or client.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: get_tasks
token string Authorization token. Optional for the get_tasks method, but recommended for security and access rights verification.

Example Request

curl -s "https://api.hostkey.com/jenkins.php" -X POST \
--data "action=get_tasks"
Example of a successful response
{
"result": "OK",
"tasks": [
  {
    "id": 1,
    "name": "deploy_frontend",
    "task": "build-frontend",
    "description": "Frontend deployment",
    "status": "active"
  },
  {
    "id": 2,
    "name": "deploy_backend",
    "task": "build-backend",
    "description": "Backend deployment",
    "status": "active"
  }
]
}
Failure response
{
"code": -1,
"message": "Access denied or token is invalid",
"source": "auth_check_permission / auth_validate_token"
}

question_mark
Is there anything I can help you with?
question_mark
AI Assistant ×