Skip to content

Commit 91f3274

Browse files
authored
api files updated to v1.0.4
Updated API files based on ClearPass v6.11.5
1 parent 98aa8fc commit 91f3274

16 files changed

+3517
-2463
lines changed

pyclearpass/api_apioperations.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ def new_oauth(self, body=({})):
1717
Required Body Parameters:['grant_type', 'client_id']
1818
Parameter Type: body, Name: body
1919
Body example with descriptions and object types below (type(dict):
20+
2021
body={
2122
"grant_type" : "", #OAuth2 authentication method. Object Type: string
2223
"client_id" : "", #Client ID defined in API Clients. Object Type: string
@@ -25,6 +26,7 @@ def new_oauth(self, body=({})):
2526
"password" : "", #Password for authentication, required for grant_type "password". Object Type: string
2627
"scope" : "", #Scope of the access request. Object Type: string
2728
"refresh_token" : "", #Refresh token issued to the client, required for grant_type "refresh_token". Object Type: string
29+
2830
}
2931
"""
3032
url_path = "/oauth"
@@ -49,10 +51,12 @@ def new_oauth_me(self, body=({})):
4951
Required Body Parameters:['info', 'name']
5052
Parameter Type: body, Name: body
5153
Body example with descriptions and object types below (type(dict):
54+
5255
body={
5356
"info" : "", #Defaults to the operator profile name. Object Type: string
5457
"name" : "", #Defaults to the authenticated username. Object Type: string
5558
"..." : "", #Additional properties may be returned for grant_type "password" if corresponding properties are defined in the OAuth API enforcement profile. Object Type: string
59+
5660
}
5761
"""
5862
url_path = "/oauth/me"

pyclearpass/api_certificateauthority.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,14 @@ def new_certificate_by_cert_id_export(self, cert_id="", body=({})):
7979
Required Body Parameters:['export_format']
8080
Parameter Type: body, Name: body
8181
Body example with descriptions and object types below (type(dict):
82+
8283
body={
8384
"export_format" : "", #Select the file format for the exported item. Object Type: string
8485
"include_chain" : False, #Select this option to include the certificates for the CA and any intermediate certificate authorities. Object Type: boolean
8586
"include_ca" : "", #Select which certificate authorities to include.. Object Type: string
8687
"export_password" : "", #Passphrase to protect the PKCS#12 file. Object Type: string
8788
"export_password2" : "", #Re-enter the passphrase. Object Type: string
89+
8890
}
8991
"""
9092
url_path = "/certificate/{cert_id}/export"
@@ -104,6 +106,7 @@ def new_certificate_import(self, body=({})):
104106
Required Body Parameters:['type', 'certificate_file', 'certificate_file_encoding']
105107
Parameter Type: body, Name: body
106108
Body example with descriptions and object types below (type(dict):
109+
107110
body={
108111
"ca_id" : 0, #Numeric ID of the certificate authority. Object Type: integer
109112
"type" : "", #Type of certificate to import. Object Type: string
@@ -112,6 +115,7 @@ def new_certificate_import(self, body=({})):
112115
"key_file" : "", #Contents of private key to import. Object Type: string
113116
"key_file_encoding" : "", #Encoding used for 'key_file' parameter. Object Type: string
114117
"key_passphrase" : "", #Enter the passphrase that was used to encrypt the private key. If the private key is not encrypted, leave this field blank. Object Type: string
118+
115119
}
116120
"""
117121
url_path = "/certificate/import"
@@ -128,6 +132,7 @@ def new_certificate_new(self, body=({})):
128132
Required Body Parameters:['ca_id', 'cert_type', 'country', 'state', 'locality', 'organization', 'common_name', 'email_address', 'key_type']
129133
Parameter Type: body, Name: body
130134
Body example with descriptions and object types below (type(dict):
135+
131136
body={
132137
"ca_id" : 0, #Select the certificate authority that will be used to sign this request. Object Type: integer
133138
"cert_type" : "", #Select the type of certificate to create from this signing request. Object Type: string
@@ -154,6 +159,7 @@ def new_certificate_new(self, body=({})):
154159
"device_name" : "", #Device name to store in certificate subject alternative name. Object Type: string
155160
"custom_field" : "", #Custom fields to store in certificate subject alternative name. Object Type: string
156161
"user_email_address" : "", #User’s email address to store in certificate subject alternative name. Object Type: string
162+
157163
}
158164
"""
159165
url_path = "/certificate/new"
@@ -171,8 +177,10 @@ def new_certificate_by_cert_id_reject(self, cert_id="", body=({})):
171177
Required Body Parameters: None listed
172178
Parameter Type: body, Name: body
173179
Body example with descriptions and object types below (type(dict):
180+
174181
body={
175182
"confirm_reject" : False, #Select this checkbox to confirm the rejection of this request. Object Type: boolean
183+
176184
}
177185
"""
178186
url_path = "/certificate/{cert_id}/reject"
@@ -192,13 +200,15 @@ def new_certificate_request(self, body=({})):
192200
Required Body Parameters:['ca_id', 'file_csr', 'cert_type']
193201
Parameter Type: body, Name: body
194202
Body example with descriptions and object types below (type(dict):
203+
195204
body={
196205
"ca_id" : 0, #Select the certificate authority that will be used to sign this request. Object Type: integer
197206
"file_csr_encoding" : "", #Encoding used for 'file_csr' parameter. Object Type: string
198207
"file_csr" : "", #Choose a digital certificate signing request to upload. This should be a PEM encoded PKCS#10 certificate request file. Object Type: string
199208
"cert_type" : "", #Select the type of certificate to create from this signing request. Object Type: string
200209
"issue_cert" : False, #To modify the subject of the certificate before signing, do not select this checkbox. Object Type: boolean
201210
"days" : "", #The number of days before the certificate will expire. Object Type: string
211+
202212
}
203213
"""
204214
url_path = "/certificate/request"
@@ -216,9 +226,11 @@ def new_certificate_by_cert_id_revoke(self, cert_id="", body=({})):
216226
Required Body Parameters:['ca_id', 'confirm_revoke']
217227
Parameter Type: body, Name: body
218228
Body example with descriptions and object types below (type(dict):
229+
219230
body={
220231
"ca_id" : 0, #Numeric ID of the certificate authority. Object Type: integer
221232
"confirm_revoke" : False, #Select this checkbox to confirm the certificate revocation. Object Type: boolean
233+
222234
}
223235
"""
224236
url_path = "/certificate/{cert_id}/revoke"
@@ -239,6 +251,7 @@ def new_certificate_by_cert_id_sign(self, cert_id="", body=({})):
239251
Required Body Parameters:['ca_id', 'days', 'confirm_sign']
240252
Parameter Type: body, Name: body
241253
Body example with descriptions and object types below (type(dict):
254+
242255
body={
243256
"ca_id" : 0, #Numeric ID of the certificate authority. Object Type: integer
244257
"days" : 0, #The number of days before the certificate will expire. Object Type: integer
@@ -251,6 +264,7 @@ def new_certificate_by_cert_id_sign(self, cert_id="", body=({})):
251264
"field":"", #Field within the subject alt name. Object Type: string
252265
"value":"", #Value of the field. Object Type: string
253266
}], #If specified, a list of field/value pairs for the subjectAltName of the issued certificate. Object Type: array
267+
254268
}
255269
"""
256270
url_path = "/certificate/{cert_id}/sign"
@@ -306,6 +320,7 @@ def update_onboard_device_by_id(self, id="", body=({})):
306320
Required Body Parameters: None listed
307321
Parameter Type: body, Name: body
308322
Body example with descriptions and object types below (type(dict):
323+
309324
body={
310325
"id" : 0, #Numeric ID of the device. Object Type: integer
311326
"status" : "", #Determines whether the device is able to enroll and access the network. Object Type: string
@@ -324,6 +339,7 @@ def update_onboard_device_by_id(self, id="", body=({})):
324339
"expanded_type" : "", #Marketing name for the product. Object Type: string
325340
"mdm_managed" : "", #Mobile device management (MDM) vendor name, if an endpoint context server reports the device as managed. Object Type: string
326341
"device_identifier" : "", #Unique identifier string . Object Type: string
342+
327343
}
328344
"""
329345
url_path = "/onboard/device/{id}"
@@ -404,11 +420,13 @@ def update_user_by_id(self, id="", body=({})):
404420
Required Body Parameters: None listed
405421
Parameter Type: body, Name: body
406422
Body example with descriptions and object types below (type(dict):
423+
407424
body={
408425
"id" : 0, #Numeric ID of the user. Object Type: integer
409426
"status" : "", #Determines whether the user can enroll devices. Object Type: string
410427
"username" : "", #Username of the user. Object Type: string
411428
"device_count" : "", #Number of devices enrolled by this user. Object Type: string
429+
412430
}
413431
"""
414432
url_path = "/user/{id}"

0 commit comments

Comments
 (0)