Suppose I want to enable/disable the "test" repository via the API, looking here this should be or in fact is possible:
https://pve.proxmox.com/pve-docs/api-viewer/#/nodes/{node}/apt/repositories
Except:
Required params are index, node, path. Let's look at the output from `get /nodes/$(hostname -s)/apt/repositories` for a moment:
	
	
	
		
The problem here is that there is no direct mapping between index, which is required, and the actual repository that's to be enabled/disabled. The best I could figure is to count the number of entries under files/repositories and then use that to get the index, using files/path and index/path as a join.
Am I missing something here or is this a design bug?
				
			https://pve.proxmox.com/pve-docs/api-viewer/#/nodes/{node}/apt/repositories
Except:
Required params are index, node, path. Let's look at the output from `get /nodes/$(hostname -s)/apt/repositories` for a moment:
		JSON:
	
	{
  "files": [
    {
      "path": "/etc/apt/sources.list",
      "repositories": [
        {...},
        {
          "description": "This is the recommended repository for testing and non-production use. Its packages are not as heavily tested and validated as the production ready enterp
rise repository. You don't need a subscription key to access this repository.",
          "handle": "no-subscription",
          "name": "No-Subscription",
          "status": 1
        },
        {
          "description": "This repository contains the latest packages and is primarily used for test labs and by developers to test new features.",
          "handle": "test",
          "name": "Test",
          "status": 1
        },
        {...}
      ]
    },
    ...
  ],
  "infos": [
    {"index": 0, "path": "/etc/apt/sources.list"},
    {"index": 1, "path": "/etc/apt/sources.list"},
    ...
  ]
}Am I missing something here or is this a design bug?
 
	 
	
