Fetching SSL details via REST API

777
1
01-09-2017 06:02 AM
ADITYAKUMAR1
Occasional Contributor II

Hi Users,

  i am trying to fetch SSL details using the REST API.

Following is the code I have written

username = "admin"
password = "admin"
url = "https://testmap.com/arcgis/portaladmin"
sh = arcrest.AGSTokenSecurityHandler(username=username,
                                         password=password,
                                         token_url=url+ '/tokens/',
                                     proxy_url=None,
                                 proxy_port=None)

I am able to make connection to the portal through this.Now I need to use the REST API

https://tesmap.com/arcgis/portaladmin/security/sslCertificates/

so that I can print the details.

Any help on this will be useful.

Thanks

Aditya Kumar

Tags (3)
0 Kudos
1 Reply
ClintonDow1
Occasional Contributor II

I haven't used ArcREST for Portal Administration personally, but I am fairly sure the usage is as follows:

Once you have your SecurityHandler, you can use it to connect to your Portal Administration using the arcrest.manageportal.administration module  arcrest.manageportal package — ArcREST 3.5.4 documentation 

From here you can access the PortalAdministration.security property which should give you access to the security functionality of your portal, assuming the username/password has the necessary permissions on your install. 

This follows a similar pattern to the sample on the github page: GitHub - Esri/ArcREST: python package for REST API (AGS, AGOL, webmap JSON, etc..)  

0 Kudos