The SOLIDserverRest is a library to drive EfficientIP API
pip install SOLIDserverRest==2.1.7
This 'SOLIDserverRest' allows to easily interact with SOLIDserver's REST API. It allows managing all IPAM objects through CRUD operations.
This 'SOLIDserverRest' is compatible with SOLIDserver version 6.0.1P3 and higher.
Install 'SOLIDserverRest' using pip in your virtualenv:
pip install SOLIDserverRest
Set the API endpoint you want to talk with through API. Could use an IP address (v4 or v6) or a host name
con = SOLIDserverRest("fqdn_host.org")
You can use native connection mode using SOLIDserver default method which provide authentication through headers in the requests with information encoded in base64
con.use_native_sds(user="apiuser", password="apipwd")
You can also use the basic authentication method for connecting the SOLIDserver.
con.use_basicauth_sds(user="apiuser", password="apipwd")
SSL certificate chain is validated by default, to disable it, use the set_ssl_verify method
con.set_ssl_verify(False) # True by default
rest_answer = con.query("method", "parameters")
Otherwise, you have to provide the certificate file:
con = SOLIDserverRest(SERVER)
If the certificate file is not valide, an exception SDSInitError
is raised.
You need parameters:
rest_answer = con.query("method", "parameters")
Example:
print(rest_answer)
print(rest_answer.status_code)
print(rest_answer.content)
Methods are organized to match the ontology used in SOLIDServer, you will find:
More information about supported methods in the specific document