Method: Falcon::InstallationTokensApi#tokens_delete_with_http_info

Defined in:
lib/crimson-falcon/api/installation_tokens_api.rb

#tokens_delete_with_http_info(ids, opts = {}) ⇒ Array<(MsaspecResponseFields, Integer, Hash)>

Deletes a token immediately. To revoke a token, use PATCH /installation-tokens/entities/tokens/v1 instead.

Parameters:

  • ids (Array<String>)

    The token ids to delete.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(MsaspecResponseFields, Integer, Hash)>)

    MsaspecResponseFields data, response status code and response headers



298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
# File 'lib/crimson-falcon/api/installation_tokens_api.rb', line 298

def tokens_delete_with_http_info(ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InstallationTokensApi.tokens_delete ...'
  end
  # verify the required parameter 'ids' is set
  if @api_client.config.client_side_validation && ids.nil?
    fail ArgumentError, "Missing the required parameter 'ids' when calling InstallationTokensApi.tokens_delete"
  end
  # resource path
  local_var_path = '/installation-tokens/entities/tokens/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'ids'] = @api_client.build_collection_param(ids, :csv)

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'MsaspecResponseFields'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"InstallationTokensApi.tokens_delete",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InstallationTokensApi#tokens_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end