根据路径查询模板详情

更新时间:
2025-01-14

根据路径查询模板详情

此接口用于根据模板全路径查询资源模板的详细信息。

接口描述

通信协议:HTTP

URL: GET /api/v1/provision-template/path-label

传参方式:querystring

请求参数

字段名类型是否必填说明
pathstring资源模板的全路径

响应参数

字段名类型说明
idstring资源模板 ID
namestring资源模板名称
kindstring类型。folder 代表模板目录;service 代表资源模板
specTmplSpec资源模板的配置信息
createdTimestring资源模板的创建时间
updatedTimestring资源模板的更新时间

请求示例

curl --location --request GET 'http://localhost:3001/api/v1/provision-template/path-label?path=/foo/nginx-001'

响应示例

{
    "status": 200,
    "message": "success",
    "data": {
        "id": "c751e9b0a0d24e6e9b417facd0e051c6",
        "name": "con_1-latest-NIPJd9E8",
        "kind": "service",
        "spec": {
            "image": {
                "ref": "24526e10-415f-40ec-8945-bc9fedcaea15",
                "vsoa": {
                    "password": "root",
                    "port": 9001,
                    "healthPath": "/health",
                    "healthTimeout": 3000,
                    "healthRetries": 3,
                    "healthStartPeriod": 5000,
                    "healthInterval": 5000
                }
            },
            "config": {
                "process": {
                    "args": [
                        "/root/task_base.js"
                    ],
                    "env": [
                        "PATH=/usr/bin:/bin:/usr/pkg/sbin:/sbin:/usr/local/bin",
                        "LD_LIBRARY_PATH=/usr/lib:/lib:/usr/local/lib:/lib/jsre:/lib/jsre/ext",
                        "TERM=vt100"
                    ]
                },
                "hostname": "jsre_ecs",
                "mounts": [
                    {
                        "destination": "/qt",
                        "source": "/qt",
                        "options": [
                            "rx"
                        ]
                    },
                    {
                        "destination": "/lib/jsre",
                        "source": "/lib/jsre",
                        "options": [
                            "rx"
                        ]
                    }
                ],
                "sylixos": {
                    "devices": [
                        {
                            "path": "/dev/fb0",
                            "access": "rw"
                        },
                        {
                            "path": "/dev/input/xmse",
                            "access": "rw"
                        },
                        {
                            "path": "/dev/input/xkbd",
                            "access": "rw"
                        },
                        {
                            "path": "/dev/net/vnd",
                            "access": "rw"
                        }
                    ],
                    "resources": {
                        "cpu": {
                            "highestPrio": 161,
                            "lowestPrio": 251
                        },
                        "memory": {
                            "kheapLimit": 2097153,
                            "memoryLimitMB": 2049
                        },
                        "disk": {
                            "limitMB": 2049
                        },
                        "kernelObject": {
                            "eventLimit": 801,
                            "eventSetLimit": 51,
                            "msgQueueLimit": 51,
                            "partitionLimit": 6,
                            "regionLimit": 6,
                            "threadLimit": 301,
                            "threadPoolLimit": 2,
                            "timerLimit": 6
                        }
                    },
                    "network": {
                        "ftpdEnable": true,
                        "telnetdEnable": true
                    }
                }
            },
            "node": {
                "ids": [
                    "a11cf2e6-d8b7-47ef-81fe-e18e7209b3b3"
                ]
            }
        },
        "createdTime": "2023-02-15 10:56:31",
        "updatedTime": "2023-02-15 10:56:31"
    },
    "fieldErrors": null
}

错误码

具体请参见 错误码说明

文档内容是否对您有所帮助?
有帮助
没帮助