Class: MistApi::MSPsSSORoles
- Inherits:
-
BaseController
- Object
- BaseController
- MistApi::MSPsSSORoles
- Defined in:
- lib/mist_api/controllers/ms_ps_sso_roles.rb
Overview
MSPsSSORoles
Constant Summary
Constants inherited from BaseController
Instance Attribute Summary
Attributes inherited from BaseController
Instance Method Summary collapse
-
#create_msp_sso_role(msp_id, body: nil) ⇒ ApiResponse
Create MSP Role here.
-
#delete_msp_sso_role(msp_id, ssorole_id) ⇒ ApiResponse
Delete MSP SSO Roles here description here.
-
#list_msp_sso_roles(msp_id) ⇒ ApiResponse
Get List of MSP SSO Roles here.
-
#update_msp_sso_role(msp_id, ssorole_id, body: nil) ⇒ ApiResponse
Update SSO Role here description here.
Methods inherited from BaseController
#initialize, #new_parameter, #new_request_builder, #new_response_handler, user_agent
Constructor Details
This class inherits a constructor from MistApi::BaseController
Instance Method Details
#create_msp_sso_role(msp_id, body: nil) ⇒ ApiResponse
Create MSP Role here
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/mist_api/controllers/ms_ps_sso_roles.rb', line 52 def create_msp_sso_role(msp_id, body: nil) @api_call .request(new_request_builder(HttpMethodEnum::POST, '/api/v1/msps/{msp_id}/ssoroles', Server::API_HOST) .template_param(new_parameter(msp_id, key: 'msp_id') .should_encode(true)) .header_param(new_parameter('application/json', key: 'Content-Type')) .body_param(new_parameter(body)) .body_serializer(proc do |param| param.to_json unless param.nil? end) .auth(Or.new('apiToken', 'basicAuth', And.new('basicAuth', 'csrfToken')))) .response(new_response_handler .is_nullify404(true) .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(SsoRoleMsp.method(:from_hash)) .is_api_response(true) .local_error('400', 'Bad Syntax', APIException) .local_error('401', 'Unauthorized', APIException) .local_error('403', 'Permission Denied', APIException) .local_error('404', 'Not found. The API endpoint doesn’t exist or resource doesn’ t'\ ' exist', APIException) .local_error('429', 'Too Many Request. The API Token used for the request reached'\ ' the 5000 API Calls per hour threshold', APIException)) .execute end |
#delete_msp_sso_role(msp_id, ssorole_id) ⇒ ApiResponse
Delete MSP SSO Roles here description here
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
# File 'lib/mist_api/controllers/ms_ps_sso_roles.rb', line 95 def delete_msp_sso_role(msp_id, ssorole_id) @api_call .request(new_request_builder(HttpMethodEnum::DELETE, '/api/v1/msps/{msp_id}/ssoroles/{ssorole_id}', Server::API_HOST) .template_param(new_parameter(msp_id, key: 'msp_id') .should_encode(true)) .template_param(new_parameter(ssorole_id, key: 'ssorole_id') .should_encode(true)) .auth(Or.new('apiToken', 'basicAuth', And.new('basicAuth', 'csrfToken')))) .response(new_response_handler .is_nullify404(true) .is_response_void(true) .is_api_response(true) .local_error('400', 'Bad Syntax', APIException) .local_error('401', 'Unauthorized', APIException) .local_error('403', 'Permission Denied', APIException) .local_error('404', 'Not found. The API endpoint doesn’t exist or resource doesn’ t'\ ' exist', APIException) .local_error('429', 'Too Many Request. The API Token used for the request reached'\ ' the 5000 API Calls per hour threshold', APIException)) .execute end |
#list_msp_sso_roles(msp_id) ⇒ ApiResponse
Get List of MSP SSO Roles here
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/mist_api/controllers/ms_ps_sso_roles.rb', line 13 def list_msp_sso_roles(msp_id) @api_call .request(new_request_builder(HttpMethodEnum::GET, '/api/v1/msps/{msp_id}/ssoroles', Server::API_HOST) .template_param(new_parameter(msp_id, key: 'msp_id') .should_encode(true)) .auth(Or.new('apiToken', 'basicAuth', And.new('basicAuth', 'csrfToken')))) .response(new_response_handler .is_nullify404(true) .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(SsoRoleMsp.method(:from_hash)) .is_api_response(true) .is_response_array(true) .local_error('400', 'Bad Syntax', APIException) .local_error('401', 'Unauthorized', APIException) .local_error('403', 'Permission Denied', APIException) .local_error('404', 'Not found. The API endpoint doesn’t exist or resource doesn’ t'\ ' exist', APIException) .local_error('429', 'Too Many Request. The API Token used for the request reached'\ ' the 5000 API Calls per hour threshold', APIException)) .execute end |
#update_msp_sso_role(msp_id, ssorole_id, body: nil) ⇒ ApiResponse
Update SSO Role here description here
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 |
# File 'lib/mist_api/controllers/ms_ps_sso_roles.rb', line 137 def update_msp_sso_role(msp_id, ssorole_id, body: nil) @api_call .request(new_request_builder(HttpMethodEnum::PUT, '/api/v1/msps/{msp_id}/ssoroles/{ssorole_id}', Server::API_HOST) .template_param(new_parameter(msp_id, key: 'msp_id') .should_encode(true)) .template_param(new_parameter(ssorole_id, key: 'ssorole_id') .should_encode(true)) .header_param(new_parameter('application/json', key: 'Content-Type')) .body_param(new_parameter(body)) .body_serializer(proc do |param| param.to_json unless param.nil? end) .auth(Or.new('apiToken', 'basicAuth', And.new('basicAuth', 'csrfToken')))) .response(new_response_handler .is_nullify404(true) .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(SsoRoleMsp.method(:from_hash)) .is_api_response(true) .local_error('400', 'Bad Syntax', APIException) .local_error('401', 'Unauthorized', APIException) .local_error('403', 'Permission Denied', APIException) .local_error('404', 'Not found. The API endpoint doesn’t exist or resource doesn’ t'\ ' exist', APIException) .local_error('429', 'Too Many Request. The API Token used for the request reached'\ ' the 5000 API Calls per hour threshold', APIException)) .execute end |