请求的默认分配当前未分配给此服务器。翼手龙面板

The requested default allocation is not currently assigned to this server. Pterodactyl panel


我有自己的 API 并且想修复服务器编辑并更新构建配置,但是当我想测试它时它说需要分配字段之类的东西,然后我就去了到 https://dashflo.net/docs/api/pterodactyl/v1/#req_11fc764c3ed648ca8e6d60bff860ca6d 进一步阅读,在他们的示例中,他们使用了“分配:1”,我也这样做了,然后它说“请求的默认分配当前未分配给此服务器。”,“状态:400”, “代码:'DisplayException'”,我不知道如何解决我尝试了分配:“2”或“0”,但它说无效...

这是我的要求:

{
"id": id,
"allocation": "1",
'memory': RAM,
'swap': "0",
'disk': Disk,
'io': IO,
'cpu': CPU,
"threads": null,
'feature_limits': {
    'databases': AmountOfDatabases,
    'allocations': AmountOfAllocations,
    "backups": Backups
},
}

我正在使用 axios 发送 PATCH 请求。

我知道我需要更改我的创建服务器请求的错误

{
        'name': NameOfServer,
        'user': OwnerID,
        'description': 'A Nodeactyl server',
        'egg': EggID,
        'pack': NestID,
        'docker_image': DockerImage,
        'startup': StartupCmd,
        'limits': {
            'memory': RAM,
            'swap': Swap,
            'disk': Disk,
            'io': IO,
            'cpu': CPU,
        },
        'feature_limits': {
            'databases': AmountOfDatabases,
            'allocations': AmountOfAllocations,
            'backups': backups
        },
        'environment': {
            'DL_VERSION': Version,
            'SERVER_JARFILE': 'server.jar',
            'VANILLA_VERSION': Version,
            'BUNGEE_VERSION': Version,
            'PAPER_VERSION': Version,
            'MC_VERSION': Version,
            'BUILD_NUMBER': Version,
            'INSTALL_REPO': Version,
            "BOT_JS_FILE": "index.js",
            "AUTO_UPDATE": true,
            "USER_UPLOAD": true
        },
        'allocation': {
            'default': 1,
            'additional': [],
        },
        'deploy': {
            'locations': [1],
            'dedicated_ip': false,
            'port_range': [],
        },
        'start_on_completion': true,
        'skip_scripts': false,
        'oom_disabled': true
}

至:

{
        'name': NameOfServer,
        'user': OwnerID,
        'description': 'A Nodeactyl-v1-support server',
        'egg': EggID,
        'pack': NestID,
        'docker_image': DockerImage,
        'startup': StartupCmd,
        'limits': {
            'memory': RAM,
            'swap': Swap,
            'disk': Disk,
            'io': IO,
            'cpu': CPU,
        },
        'feature_limits': {
            'databases': AmountOfDatabases,
            'allocations': AmountOfAllocations,
            'backups': backups
        },
        'environment': {
            'DL_VERSION': Version,
            'SERVER_JARFILE': 'server.jar',
            'VANILLA_VERSION': Version,
            'BUNGEE_VERSION': Version,
            'PAPER_VERSION': Version,
            'MC_VERSION': Version,
            'BUILD_NUMBER': Version,
            'INSTALL_REPO': Version,
            "BOT_JS_FILE": "index.js",
            "AUTO_UPDATE": true,
            "USER_UPLOAD": true
        },
        "allocation": {
            "default": 1
        },
        'start_on_completion': true,
        'skip_scripts': false,
        'oom_disabled': true
}