Skip to content

Commit

Permalink
api files updated to v1.0.4
Browse files Browse the repository at this point in the history
Updated API files based on ClearPass v6.11.5
  • Loading branch information
jazzyj123 authored Nov 6, 2023
1 parent 98aa8fc commit 91f3274
Show file tree
Hide file tree
Showing 16 changed files with 3,517 additions and 2,463 deletions.
4 changes: 4 additions & 0 deletions pyclearpass/api_apioperations.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def new_oauth(self, body=({})):
Required Body Parameters:['grant_type', 'client_id']
Parameter Type: body, Name: body
Body example with descriptions and object types below (type(dict):
body={
"grant_type" : "", #OAuth2 authentication method. Object Type: string
"client_id" : "", #Client ID defined in API Clients. Object Type: string
Expand All @@ -25,6 +26,7 @@ def new_oauth(self, body=({})):
"password" : "", #Password for authentication, required for grant_type "password". Object Type: string
"scope" : "", #Scope of the access request. Object Type: string
"refresh_token" : "", #Refresh token issued to the client, required for grant_type "refresh_token". Object Type: string
}
"""
url_path = "/oauth"
Expand All @@ -49,10 +51,12 @@ def new_oauth_me(self, body=({})):
Required Body Parameters:['info', 'name']
Parameter Type: body, Name: body
Body example with descriptions and object types below (type(dict):
body={
"info" : "", #Defaults to the operator profile name. Object Type: string
"name" : "", #Defaults to the authenticated username. Object Type: string
"..." : "", #Additional properties may be returned for grant_type "password" if corresponding properties are defined in the OAuth API enforcement profile. Object Type: string
}
"""
url_path = "/oauth/me"
Expand Down
18 changes: 18 additions & 0 deletions pyclearpass/api_certificateauthority.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,14 @@ def new_certificate_by_cert_id_export(self, cert_id="", body=({})):
Required Body Parameters:['export_format']
Parameter Type: body, Name: body
Body example with descriptions and object types below (type(dict):
body={
"export_format" : "", #Select the file format for the exported item. Object Type: string
"include_chain" : False, #Select this option to include the certificates for the CA and any intermediate certificate authorities. Object Type: boolean
"include_ca" : "", #Select which certificate authorities to include.. Object Type: string
"export_password" : "", #Passphrase to protect the PKCS#12 file. Object Type: string
"export_password2" : "", #Re-enter the passphrase. Object Type: string
}
"""
url_path = "/certificate/{cert_id}/export"
Expand All @@ -104,6 +106,7 @@ def new_certificate_import(self, body=({})):
Required Body Parameters:['type', 'certificate_file', 'certificate_file_encoding']
Parameter Type: body, Name: body
Body example with descriptions and object types below (type(dict):
body={
"ca_id" : 0, #Numeric ID of the certificate authority. Object Type: integer
"type" : "", #Type of certificate to import. Object Type: string
Expand All @@ -112,6 +115,7 @@ def new_certificate_import(self, body=({})):
"key_file" : "", #Contents of private key to import. Object Type: string
"key_file_encoding" : "", #Encoding used for 'key_file' parameter. Object Type: string
"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
}
"""
url_path = "/certificate/import"
Expand All @@ -128,6 +132,7 @@ def new_certificate_new(self, body=({})):
Required Body Parameters:['ca_id', 'cert_type', 'country', 'state', 'locality', 'organization', 'common_name', 'email_address', 'key_type']
Parameter Type: body, Name: body
Body example with descriptions and object types below (type(dict):
body={
"ca_id" : 0, #Select the certificate authority that will be used to sign this request. Object Type: integer
"cert_type" : "", #Select the type of certificate to create from this signing request. Object Type: string
Expand All @@ -154,6 +159,7 @@ def new_certificate_new(self, body=({})):
"device_name" : "", #Device name to store in certificate subject alternative name. Object Type: string
"custom_field" : "", #Custom fields to store in certificate subject alternative name. Object Type: string
"user_email_address" : "", #User’s email address to store in certificate subject alternative name. Object Type: string
}
"""
url_path = "/certificate/new"
Expand All @@ -171,8 +177,10 @@ def new_certificate_by_cert_id_reject(self, cert_id="", body=({})):
Required Body Parameters: None listed
Parameter Type: body, Name: body
Body example with descriptions and object types below (type(dict):
body={
"confirm_reject" : False, #Select this checkbox to confirm the rejection of this request. Object Type: boolean
}
"""
url_path = "/certificate/{cert_id}/reject"
Expand All @@ -192,13 +200,15 @@ def new_certificate_request(self, body=({})):
Required Body Parameters:['ca_id', 'file_csr', 'cert_type']
Parameter Type: body, Name: body
Body example with descriptions and object types below (type(dict):
body={
"ca_id" : 0, #Select the certificate authority that will be used to sign this request. Object Type: integer
"file_csr_encoding" : "", #Encoding used for 'file_csr' parameter. Object Type: string
"file_csr" : "", #Choose a digital certificate signing request to upload. This should be a PEM encoded PKCS#10 certificate request file. Object Type: string
"cert_type" : "", #Select the type of certificate to create from this signing request. Object Type: string
"issue_cert" : False, #To modify the subject of the certificate before signing, do not select this checkbox. Object Type: boolean
"days" : "", #The number of days before the certificate will expire. Object Type: string
}
"""
url_path = "/certificate/request"
Expand All @@ -216,9 +226,11 @@ def new_certificate_by_cert_id_revoke(self, cert_id="", body=({})):
Required Body Parameters:['ca_id', 'confirm_revoke']
Parameter Type: body, Name: body
Body example with descriptions and object types below (type(dict):
body={
"ca_id" : 0, #Numeric ID of the certificate authority. Object Type: integer
"confirm_revoke" : False, #Select this checkbox to confirm the certificate revocation. Object Type: boolean
}
"""
url_path = "/certificate/{cert_id}/revoke"
Expand All @@ -239,6 +251,7 @@ def new_certificate_by_cert_id_sign(self, cert_id="", body=({})):
Required Body Parameters:['ca_id', 'days', 'confirm_sign']
Parameter Type: body, Name: body
Body example with descriptions and object types below (type(dict):
body={
"ca_id" : 0, #Numeric ID of the certificate authority. Object Type: integer
"days" : 0, #The number of days before the certificate will expire. Object Type: integer
Expand All @@ -251,6 +264,7 @@ def new_certificate_by_cert_id_sign(self, cert_id="", body=({})):
"field":"", #Field within the subject alt name. Object Type: string
"value":"", #Value of the field. Object Type: string
}], #If specified, a list of field/value pairs for the subjectAltName of the issued certificate. Object Type: array
}
"""
url_path = "/certificate/{cert_id}/sign"
Expand Down Expand Up @@ -306,6 +320,7 @@ def update_onboard_device_by_id(self, id="", body=({})):
Required Body Parameters: None listed
Parameter Type: body, Name: body
Body example with descriptions and object types below (type(dict):
body={
"id" : 0, #Numeric ID of the device. Object Type: integer
"status" : "", #Determines whether the device is able to enroll and access the network. Object Type: string
Expand All @@ -324,6 +339,7 @@ def update_onboard_device_by_id(self, id="", body=({})):
"expanded_type" : "", #Marketing name for the product. Object Type: string
"mdm_managed" : "", #Mobile device management (MDM) vendor name, if an endpoint context server reports the device as managed. Object Type: string
"device_identifier" : "", #Unique identifier string . Object Type: string
}
"""
url_path = "/onboard/device/{id}"
Expand Down Expand Up @@ -404,11 +420,13 @@ def update_user_by_id(self, id="", body=({})):
Required Body Parameters: None listed
Parameter Type: body, Name: body
Body example with descriptions and object types below (type(dict):
body={
"id" : 0, #Numeric ID of the user. Object Type: integer
"status" : "", #Determines whether the user can enroll devices. Object Type: string
"username" : "", #Username of the user. Object Type: string
"device_count" : "", #Number of devices enrolled by this user. Object Type: string
}
"""
url_path = "/user/{id}"
Expand Down
Loading

0 comments on commit 91f3274

Please sign in to comment.