This URL imports the SSL key to the Manager for the Sensors other than 9.2 NS-series.
Resource URL
POST /sensor/<sensor_id>/action/sslkey
Content-type value
multipart/form-data; boundary=<x>
Request Parameters
URL Parameters:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Sensor id | Number | Yes |
Payload Request Parameters:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Holds the body part objects | Object | Yes |
Details of BodyPart[0]:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Holds the user credential object | Application/json object | Yes |
Details of user credential:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Alias name for the key file | String | Yes |
| Passphrase | String | Yes |
Details of BodyPart[1]:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Holds the .p12 file as input stream | Application/octet-stream | Yes |
Details of .p12 file:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| SSL key input stream | ByteArrayInput Stream | Yes |
Response Parameters
Following fields are returned if the request parameters are correct, otherwise error details are returned.
Field Name | Description | Data Type |
|---|---|---|
| Created resource id | Number |
Example
Request
POST https://<NSM_IP>/sdkapi/sensor/1001/action/sslkey
Payload:
PUT /sdkapi/sensor/1001/action/sslkey HTTP/1.1
NSM-SDK-API: ODlGRkEwQzEwMTE4QkFFRDc5MUUwMDk5OTg3OTI0NDk6MQ==
Accept: application/vnd.nsm.v1.0+json
Content-Type: multipart/form-data; boundary=Boundary_5_29812760_1360143901032
MIME-Version: 1.0
User-Agent: Java/1.6.0_25
Host: localhost:8888
Connection: keep-alive
Content-Length: 3974
--Boundary_5_29812760_1360143901032
Content-Type: application/json
{"AliasName":"test5","PassPhrase":"admin123"}
--Boundary_5_29812760_1360143901032
Content-Type: application/octet-stream
ÒrÝ?ü0¥ÿ<ˆ}c,¢eXœ^:4 JhÍ2µ�rDYñÇÚd¶/¿í�F~ ÆIc§¼éá©ÿ_8Öø« C6Ô654îÞg‘J6?x ‚*T2¡qhã4ÎÅVµGƒo9ŸCÒª„í¹Ì —Áë&1¹ì,Ú‹y ì^î‘Vö5U.kÝ$±Ñ g§zï0� wÌ [:…œ`Žíì’ DŒ¾¸xŒ7è�L“t"á}ñÕùA‡B6W¦P!;Ð?j*;G¾=X¦Š1s(�ì_œ8•¯Ð"®ƒMîQ,®UÉÔ `7»©2xN£o†¾$h;Õe ÆÄŸ0ÀÑĦûNü,1”1Sõ±œ'n¨$èŒ`I¤@ã¥?$ˆhé_gÙÎ�4L[gàÏ©:•ŒÔ òH‰KÃïÃÒ"ÑÆ*¼²žØ|r-Þ„”¶K¥*¾�k}ddZ¡�ßÔ ¥dK9¥Ð¾ýÎk“{Oj�¬ ¾€ýb3ÔÏ&«PƒTF âê¡‚4Â{0ä!ÈÝ]ðä[”¿1•!;d³_
--Boundary_5_29812760_1360143901032-- Response
{
"createdResourceId":1002
}
Error Information
Following error codes are returned by this URL:
S.No | HTTP Error Code | SDK API errorId | SDK API errorMessage |
|---|---|---|---|
1 | 404 | 1106 | Invalid Sensor |
2 | 400 | 1001 | internal error |
3 | 400 | 2202 | Input stream read error |
4 | 400 | 2203 | Alias name already exist |