Fetching and setting custom server name via API
... / Fetching and setting cust...
BMPCreated with Sketch.BMPZIPCreated with Sketch.ZIPXLSCreated with Sketch.XLSTXTCreated with Sketch.TXTPPTCreated with Sketch.PPTPNGCreated with Sketch.PNGPDFCreated with Sketch.PDFJPGCreated with Sketch.JPGGIFCreated with Sketch.GIFDOCCreated with Sketch.DOC Error Created with Sketch.
Question

Fetching and setting custom server name via API

by
JoeB
Created on 2021-07-07 09:15:40 (edited on 2024-09-04 14:26:08) in Dedicated Servers

Hi,

I'm using `https://api.ovh.com/` to interact with OVH API for bare metal machines. Currently I would like to list servers and that works via `ck.add_recursive_rules(ovh.API_READ_ONLY, "/dedicated/server")` [Python]. However I cannot find a way to get our custom names of the servers. API lists for example:

```
=====> ns.ip---.eu () <=====
{
"bootId": 1,
"commercialRange": "ADVANCE-2",
"datacenter": "rbx7",
"ip": "...",
"linkSpeed": 1000,
"monitoring": true,
"name": "ns.ip---.eu",
"newUpgradeSystem": true,
"noIntervention": false,
"os": "ubuntu1804-server_64",
"professionalUse": false,
"rack": "",
"rescueMail": null,
"reverse": "ns.ip---.eu",
"rootDevice": null,
"serverId": ,
"state": "ok",
"supportLevel": "pro"
}
```
Above there is only OVH name, but above server in OVH web UI has our own custom name `andromeda123456.example.com`

Is there any way to get both, internal OVH name (`ns.ip---.eu`) and our own custom name?

Also, be able to update / rename it via API would be great too.

Regards.


Replies are currently disabled for this question.