POST /csvRequest
Use this method to manage devices using a bulk-import CSV file.
- The bulk import file must be in a comma-delimited CSV format.
- When managing switches using bulk import, HTTPS is enabled on the switch, and NTP clients on the switch are configured to use the NTP settings from the management server. To change these setting, use POST /manageRequest.
For information about downloading a template (Excel or CSV format) and completing the bulk import file, see Managing systems.
Authentication
Authentication with username and password is required.
Request URL
POST https://{management_server_IP}/csvRequest
Query parameters
Parameters | Required / Optional | Description |
---|---|---|
validationOnly={Boolean} | Optional | Indicates whether to only validate the bulk-import (CSV) file. This can be one of the following values.
|
POST https://192.0.2.0/csvRequest?validationOnly=true
POST https://192.0.2.0/csvRequest
Request body
Use the multipart/form-data
media type to import the CSV file. Use the attributes in the following table as the multipart name in the body. For more information about the multipart/form-data media type, see Returning Values from Forms: multipart/form-data webpage.
Request example
Content-Type: multipart/form-data; boundary=AaB03x
--AaB03x
Content-Disposition: form-data; name="uploadedfile"; filename="bulk_manage.csv"
Content-Type: application/octet-stream
--AaB03x--
Response codes
Code | Description | Comments |
---|---|---|
200 | OK | The request completed successfully. |
201 | Created | One or more new resources were successfully created. |
400 | Bad Request | A query parameter or request attribute is missing or not valid, or the operation is not supported. A descriptive error message is returned in the response body. |
403 | Forbidden | The orchestrator server was prevented from fulfilling the request. A descriptive error message is returned in the response body. Ensure that you have privileges to perform the request. |
404 | Not found | A specified resource cannot be found. A descriptive error message is returned in the response body. |
409 | Conflict | There is a conflict with the current state of the resource. A descriptive error message is returned in the response body. |
500 | Internal Server Error | An internal error occurred. A descriptive error message is returned in the response body. |
Response header
If this POST method results in a job getting started, the response header includes a URI in the form /augusta/discovery/jobs/{job_id} (for example, /augusta/discovery/jobs/12) that represents the job that is monitored by the management server. You can use GET /csvRequest/jobs/{job_id} to determine the status of the job.
If a job was not successfully started, refer to the response code and response body for details.
Response body
Attributes | Type | Description | ||
---|---|---|---|---|
currentIP | String | IP address or hostname for the device | ||
currentUserName | String | User name for authenticating to the device, if applicable | ||
displayName | String | Device display name | ||
failedValidationMessages | Array of strings | Input errors for the device | ||
roleGroups | Array of strings | List of role groups that are permitted to view and manage the device. To get a list of available role groups, use GET /roleGroups. You can specify only role groups to which the current user belongs. If you do not specify the roleGroups attribute, the default roles groups are assigned. You can obtain the list of default role group using GET /resourceAccessControl. If you specify roleGroup with an empty or null value, role groups are not assigned. Note If you add devices to a managed chassis, the new devices will belong to the same role groups as the chassis. | ||
managedAuthentication | Boolean | Indicates whether to use local authentication instead of XClarity Administrator managed authentication. For more information about managed and local authentication, see Managing the authentication server. This can be one of the following values.
| ||
rowNumber | Integer | Row in the CSV file in which the device input is specified | ||
serialNumber | String | Device serial number | ||
storedCredentialsID | String | Stored credential ID that is associated with the device, if applicable. To find the stored credential ID, use GET /storedCredentials. | ||
type | String | Device type. This can be one of the following values.
|
[{
"currentIP": "10.243.3.37",
"currentUsername": "USERID",
"displayName": null,
"failedValidationMessages": [],
"roleGroups": ["LXC-SUPERVISOR","LXC-HW-ADMIN",]
"rowNumber": 2,
"serialNumber": null,
"storedCredentialsId": null,
"type": "flexchassis",
"managedAuthEnabled": null
},
...,
{
"currentIP": "",
"currentUserName": "JOHN",
"displayName": "Server1"
"failedValidationMessages": ["Missing IP address or hostname","Invalid device type"],
"roleGroups": "",
"managedAuthentication": false,
"rowNumber": 1,
"serialNumber": "",
"storedCredentialsID": null,
"type": "Server"
}]
Attributes | Type | Description | ||
---|---|---|---|---|
result | String | Results of this operation. This can be one of the following values.
| ||
statusCode | String | Response code | ||
statusDescription | String | Response description | ||
messages | Array of objects | Information about zero or more messages | ||
id | String | Message identifier of a returned message | ||
explanation | String | Additional information to clarify the reason for the message | ||
recovery | String | User actions that can be taken to recover from the event | ||
recoveryUrl | String | Link to the help system for more information, if available | ||
text | String | Message text associated with the message identifier |
The following example is returned when validateOnly=false.
{
"result": "failure"
"statusCode": 400,
"statusDescription": "There was an error parsing the input to the bulk import request.",
"messages": [{
"id": "FQXDM0558G",
"explanation": "Field \"ManagedAuthEnabled\" is not allowed when field \"Type\" has
value \"flexchassis\".",
"recovery": "Correct the default values that are specified in the bulk import dialog and
the data on line 5 of the CSV file, and try again.",
"recoveryUrl": "",
"text": "A field was specified that is not compatible with the value of another field."
},
{
"id": "FQXDM0557G",
"explanation": "Field \"StoredCredentialsId\" is not allowed when field \"NewPassword\"
is specified.",
"recovery": "Correct the default values entered in the bulk import dialog and/or the data
on line 6 of the CSV file and try again.",
"recoveryUrl": "",
"text": "Incompatible fields were specified."
}]
}