青龙面板[Qinglong] icon

青龙面板[Qinglong]

青龙面板计划任务节点.详细API请参考:https://qinglong.online/api/

Overview

This node integrates with the QingLong panel API to manage scheduled tasks and related resources. Specifically, for the "定时任务" (Scheduled Task) resource and the "创建视图" (Create View) operation, it allows users to create a new view in the QingLong crontab system by sending a JSON body describing the view's properties such as name, sorting rules, filters, and filter relations.

Common scenarios include:

  • Automating the creation of custom views to organize scheduled tasks based on specific criteria.
  • Dynamically managing task views in QingLong from workflows, enabling better task categorization and filtering.
  • Integrating with other systems to programmatically update or add views without manual intervention.

Example use case:
A user wants to create a new view named "Nightly Jobs" that filters scheduled tasks running at night and sorts them by priority. This node can be used to send the appropriate JSON configuration to QingLong to create this view automatically.

Properties

Name Meaning
请求Body JSON object defining the view to create. It includes:
- name: The name of the view (string).
- sorts: An array defining sorting rules (Array).
- filters: An array defining filtering rules (Array).
- filterRelation: A string specifying how filters relate (e.g., AND/OR).

The property expects a JSON structure similar to:

{
  "name": "视图名称string",
  "sorts": ["排序规则Array<any>"],
  "filters": ["过滤规则Array<any>"],
  "filterRelation": "过滤关系string"
}

Output

The node outputs the result of the API call in the json field under the key result. This typically contains the response from the QingLong API after creating the view, which may include details about the newly created view such as its ID, status, or any metadata returned by the server.

No binary data output is involved in this operation.

Dependencies

  • Requires an API key credential for authenticating with the QingLong API.
  • The node uses the QingLong API endpoint /open/crons/views with HTTP POST method to create views.
  • Proper network access to the QingLong API server is necessary.
  • The node depends on internal helper functions to obtain tokens and make authenticated requests.

Troubleshooting

  • Common issues:

    • Invalid JSON format in the "请求Body" property will cause parsing errors.
    • Missing or incorrect API authentication token will lead to authorization failures.
    • Providing incomplete or invalid fields in the JSON body may cause the API to reject the request.
  • Error messages:

    • If the operation is not implemented or recognized, the node throws an error indicating the operation is not supported.
    • API errors from QingLong are surfaced as node API errors; check the message for details like invalid parameters or permission issues.
  • Resolutions:

    • Ensure the JSON body is correctly formatted and matches the expected schema.
    • Verify that the API key credential is configured and valid.
    • Confirm that the QingLong API endpoint is reachable and the user has permissions to create views.

Links and References

Discussion