Nexfs Management API Documentation
Method Index
PutCertificate
Upload a pem certificate chain bundle using the Nexfs Management API
Added: Nexfs 1.02.01(23)
Uploads a new certificate chain bundle in pem format.
The pem must include the private key and one or more certificates that make up the complete chain. The private key can be at the start or the end of the pem, if a self signed certificate is used, only the singel cerificate should be included along with the corresponding private key.
The pem chain can also include if required, the intermendiate and a root certificate.
The format of the pem is:
-----BEGIN PRIVATE KEY-----
-----END PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
(Intermediate and root certificates if required)
Action: PutCertificate
UpLoad a certificate pem chain bundle
Permissions
To update the certifcate pem a requesting session must have the nexfs/ManageCertificate role enabled.
Request Parameters
A GET request must be made against the nexfs management console api with the PutConfiguration.
The request must be signed with a valid AWS V4 style Signature using an active temporary session security token.
Action
PutCertificate
Cerfificate
uri encoded pem file
Request Body
The request does not have a request body.
Response Syntax
HTTP1/1 200
<?xml version="1.0" encoding="UTF-8"?>
<RequestCompleted>
<Code>string</Code>
<Message>
<PutCertificateResponse>
<PutCertificateResult>
<Certificate>
<Index>integer</Index>
<Subject>string</Subject>
<Issuer>string</Issuer>
<Version>integer</Version>
<ValidFrom>string</ValidFrom>
<ValidUntil>string</ValidUntil>
<ca>string</ca>
<SelfSigned>string</SelfSigned>
</Certificate>
</PutCertificateResult>
</PutCertificateResponse>
</Message>
<Resource>string</Resource>
<RequestId>integer</RequestId>
</RequestCompleted>
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in XML format by the service:
RequestCompleted
Root Level tag for the successful response
Code
OK
Message
PutCertificateResponse
Tag for the response
PutCertificateResult
Tag for the request result
Certificate
Tag for the start of the loaded certificate information
Index
The index number Nexfs has assigned to the certificate, this index number will remain for the life of the certificate in Nexfs, and remains static between nexfs restarts. This index is used to identify the certifcate in an last management api calls.
Subject
Details of the certificate subject
Issuer
Details of the certificate issuer
Version
The certificate version
ValidFrom
Date the certificate is valid from
ValidUntil
Date the certificate is valid until
ca
True or False
SelfSigned
True or False
Resource
PutCertificateResponse
RequestId
A requestid number that identifies the request made against the management api
Errors
Also See Rest Error Responses
400 BadRequest The request was Malformed
400 BadRequest Unable to parse certificate. Please ensure the certificate is in PEM format, including the matching privatekey
400 Could not validate the certificate with the certificate chain
401 Unauthorized The request cannot be authenticated
403 Forbidden Session does not have the rights to perform the requested action
500 InternalServerError An Internal Error was encountered
Example Request
The certificate in the following example request is:
-----BEGIN PRIVATE KEY-----
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCSiKI+McyG8Ps2
+n52+FEAhWEX8uCg0lfVC+tdApBfgeqFJgl3SwocejssSowkXWFJz+3Z7C4U3JWK
O14C9RacX1yhef0GHXWKeOc9cA6GjTFKTYb09ffMI/3lDCrKPI+Yh+bP8gOPuFgl
0uSZYLbIt1NSnn9idhAfoNLa8/XzzWE9xcqTVby0ih67baUUjv6kx1yziSzBSDla
VNPIAEjGg5KAE5Gsqsb9bBKbVGiO0QmBBVA20t9XehbBKO1oiP7t1Ec2DgRmots9
sMiIjvUGb7vYDJKQdk+rAvhdt42FZqURWLaZTS+a/lgDmR/4cLBFoMVFBf4RTYsc
HUdt94qlAgMBAAECggEAMBJbB4RW0L4l6/dpnaYBDOa036JyRtA6uE3cvPqmWm7I
fT3pRRV9D7KZzwH1z8hCrnBkW2W8CGQFOwAW62l0LYCrZt4aP/NSKEdZtTIZ0dJo
JTQh3iMDVBlKpeXD8+zCPwv2kKmYuYGEiYQSMq8jx908nJIawDZzO60K/4GhYoWy
5ahrKf4XAgsms2zGhSjmFQwUnXoQsprlEtHJZ+XxlSeVVRSg7W8gO+9B0FpHgumh
BWGTGao/GNgKcYkP7CN3BM+D6wyglu3n2OQCOJKe3EvF8jttBGp6DA4saJXr690K
4Z6lAqYWhrmALqZaIEabg18cxgqc2La2BtYso6V90QKBgQDM0vb5EU2XJXAv6zp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iYf
DGbuPKsvJ5lIYweGEUUVdVZNOLkz15P+CknGYLxHwzhXbvFoqVD2dDajWu3HWSF6
ukGbK2HxEqdXA6HHXzKXWO+r6Qr36jaSdvsqSZIRd4wy01cUMXfA+RvFYb6Nlqlv
LgxWNpo=
-----END CERTIFICATE-----
Authorization: AWS4-HMAC-SHA256 Credential=fe34e1be46d3422ba81bc5865d512bcb/20230813/nexfs/nexfsconsoleapi/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=9ce264d3a4a743587db0c100f9347d58c1eb3cb293f1b1800cad760fac56a6d2
content-type: application/x-www-form-urlencoded; charset=utf-8
host: nexfs.example.com
x-amz-date: 20220905T122912Z
Example Response
<?xml version="1.0" encoding="UTF-8"?>
<RequestCompleted>
<Code>Ok</Code>
<Message>
<PutCertificateResponse>
<PutCertificateResult>
<Certificate>
<Index>0</Index>
<Subject>/C=NZ/ST=Kapiti/L=Paraparaumu/O=Nexustorage Ltd/CN=nexfs.com/emailAddress=info@nexustorage.com</Subject>
<Issuer>/C=NZ/ST=Kapiti/L=Paraparaumu/O=Nexustorage Ltd/CN=nexfs.com/emailAddress=info@nexustorage.com</Issuer>
<Version>3</Version>
<ValidFrom>Aug 5 07:19:58 2023 GMT</ValidFrom>
<ValidUntil>Aug 4 07:19:58 2024 GMT</ValidUntil>
<ca>True</ca>
<SelfSigned>True</SelfSigned>
</Certificate>
</PutCertificateResult>
</PutCertificateResponse>
</Message>
<Resource>PutCertificateResponse</Resource>
<RequestId>11</RequestId>
</RequestCompleted>