Skip to main content
  • Place orders quickly and easily
  • View orders and track your shipping status
  • Create and access a list of your products
  • Manage your Dell EMC sites, products, and product-level contacts using Company Administration.

Dell Unity™ Family Unisphere® Management REST API Programmer's Guide

PDF

Downloading and uploading x.509 certificates

You can download and upload x.509 certificates.

Syntax for downloading an x.509 certificate

To download an x.509 certificate file from the storage system to the local host, use the following request components:

Headers
Accept: application/json
Content-Type: application/json
X-EMC-REST-CLIENT: true
Operation
GET
URI pattern
/download/x509Certificate/<cert_id>
where <cert_id> is the unique identifier of the x.509 certificate to download.
Body
Empty.

A successful download request returns a 200 OK HTTP status code. If the request does not succeed, the server returns a 4nn or 5nn HTTP status code in the response header and a message entity in the response body.

Syntax for uploading a configuration file from a NAS server

To upload an x.509 certificate from the local host to the storage system, use the following request components:

Headers
Accept: application/json
Content-Type: application/json
X-EMC-REST-CLIENT: true
Operations
POST
URI pattern
/upload/x509Certificate
Body
See the Usage row.
Usage
You must POST the certificate file using a multipart/form-data format as if from a simple web page form, like that shown in the following example:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <body>
    <form enctype="multipart/form-data" method="post"
      action="https://<IP_address>/upload/x509Certificate">
      <input type="file" name="filename"/>
      <input type="text" name="paramMap"/>
      <input type="submit"/> 
    </form>
  </body>
</html>
where paramMap is in JSON format and is defined by the following attributes:
  • type - Certificate type, as defined by the CertifcateTypeEnum enumeration.
  • service - Service with which the certificate is associated, as defined by the ServiceTypeEnum enumeration.
  • scope (optional) - Certificate scope, as defined by the certificateScope enumeration.
  • passphrase - Pass phrase used to decrypt the private key. This attribute is required if the file contains a private key.
For a list of enumeration values, see the Unisphere Management REST API Reference Guide.

A successful upload request returns a 200 OK HTTP status code. If the request does not succeed, the server returns a 4nn or 5nn HTTP status code in the response header and a message entity in the response body.

Example 1: Downloading an x.509 certificate

The following example downloads the vasa_http-vc1-cacert-1 certificate file to the local host:

Headers
Accept: application/json
X-EMC-REST-CLIENT: true
Request
GET https://10.108.53.216/download/x509Certificate/vasa_http-vc1-servercert-1
Request body
Empty.
Response body (raw) for a successful response
Contains the downloaded x.509 certificate file.

Example 2: Uploading an x.509 certificate file to a NAS server

The following example uploads certificate1.pem to authorize communication between NAS server nas_0 and the VASA provider.

Headers
Accept: application/json
X-EMC-REST-CLIENT: true
EMC-CSRF-TOKEN: <token>
Request
<html>
  <body>
    <form enctype="multipart/form-data" method="post"
     action="https://10.108.253.216/upload/x509Certificate">
      <input type="file" name="filename"/>
      <input type="text" name="paramMap"/>
      <input type="submit"/>
    </form>
  </body>
filename="certificate1.pem"
paramMap={"type":1,"service":2, "passphrase":"ddd","scope":{"nasServer":"nas_0"}}
Request body
Empty.
Response body (raw) for a successful response
Empty.

Example 3: Uploading an x.509 certificate file to an LDAP server

The following example uploads certificate1.cer to authenticate a connection to an LDAP server.

Headers
Accept: application/json
X-EMC-REST-CLIENT: true
EMC-CSRF-TOKEN: <token>
Request
<html>
	<body>
		<form enctype="multipart/form-data" method="post" action="https://10.108.253.216/upload/x509Certificate">
			<input type="file" name="filename"/>
			<input type="text" name="paramMap"/>
			<input type="submit"/>
		</form>
	</body>
filename="certificate.cer"
paramMap={"type":2,"service":3}
Request body
Empty.
Response body (raw) for a successful response
Empty.

Rate this content

Accurate
Useful
Easy to understand
Was this article helpful?
0/3000 characters
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please select whether the article was helpful or not.
  Comments cannot contain these special characters: <>()\