Marking the download log example

Here’s a sample POST request that marks the system logs with the message, Mark+the+log. The request is made using a system-level user account that includes the administrator role.

Request with cURL command line

curl -X POST -k -i -H "Authorization: HCP YWxscm9sZXM=:04EC9F614D89FF5C7126D32ACB448382" https://admin.hcp.example.com:9090/mapi/logs?mark=Mark+the+log

Request in Python using PycURL

import pycurl
markMessage = "Mark+the+log"
curl = pycurl.Curl()
curl.setopt(pycurl.VERBOSE, True)
curl.setopt(pycurl.CUSTOMREQUEST, "POST")
curl.setopt(pycurl.HTTPHEADER, ["Authorization: HCP \
  YWxscm9sZXM=:04EC9F614D89FF5C7126D32ACB448382"])
curl.setopt(pycurl.URL, ("https://admin.hcp.example.com:9090/mapi/logs/?mark=" Mark+the+log))
curl.setopt(pycurl.SSL_VERIFYPEER, False)
curl.setopt(pycurl.SSL_VERIFYHOST, False)
curl.perform()
curl.close()

 

Request headers

POST /mapi/logs?mark=Mark+the+log HTTP/1.1
User-Agent: curl/7.27.0
Host: admin.hcp.example.com:9090
Accept: */*
Authorization: HCP YWxscm9sZXM=:04EC9F614D89FF5C7126D32ACB448382

Response headers

HTTP/1.1 200 OK
X-HCP-SoftwareVersion: 7.2.0.589
Content-Length: 0

Trademark and LegalDisclaimer

© 2015 Hitachi Data Systems Corporation. All rights reserved.