Overview
This article describes how to add an endpoint to the endpoint collection using the REST API.
The process involves sending a POST request with endpoint details in JSON format to register a new endpoint in the system.
API Request
POST /vmanage-server/rest/rest-api/servers
Request Syntax
|
POST https:///vmanage-server/rest/rest-api/servers Content-Type: application/json |
Request Body
|
{ "ip": "", "os": "", "osFullName": "", "name": "", "dnsname": "" } |
Example Request
|
curl -k --digest \ -u ':' \ -H 'Content-Type: application/json' \ -X POST \ -d '{ "ip": "10.10.20.51", "os": "Microsoft Windows Server 2008 R2", "osFullName": "Microsoft Windows Server 2008 R2", "name": "Intigua Splunk Server", "dnsname": "w08r264sp2" }' \ 'https:///vmanage-server/rest/rest-api/servers' |
| Warning: This operating system or version is End-of-Life (EOL) and may no longer be supported or receive updates. |
Parameters
| Parameter | Description |
| ip | Endpoint IP address |
| os | Endpoint operating system. Use either a guest OS identifier defined in the VMware vSphere SDK, or a string containing the OS commercial name and 64-bit or 32-bit |
| osFullName | Full operating system name |
| name | Descriptive endpoint name shown in the endpoint list |
| dnsname | Endpoint DNS hostname |
Important Considerations
| Important: Use the endpoint URL without a trailing slash. In some environments, using the trailing slash may return 404 Not Found. |
Correct URL format:
| https:///vmanage-server/rest/rest-api/servers |
Do not use:
| https:///vmanage-server/rest/rest-api/servers/ |
Notes
|
Note:
|
Troubleshooting
If the request returns 401 Unauthorized, verify the username, API key, permissions, and authentication method.
If the request returns 404 Not Found, verify that the request is being sent to:
| https:///vmanage-server/rest/rest-api/servers |
and not to the same path with a trailing slash.
Comments
0 comments
Please sign in to leave a comment.