           that.get("notify").error error.detail?.message
 
     openAPIScanModal: ->
+      @send "dynamicScan"
       @set "showAPIScanModal", true
 
     closeModal: ->

        for error in error.errors
          that.get("notify").error error.detail?.message

    runAPIScan: ->
      apiUrlFilters = @get "file.project.apiUrlFilters"
      for url in [apiUrlFilters]
        return @get("notify").error "Please enter any url filter" if !hasApiFilter url
      @set "isApiScanEnabled", true
      @send "apiScan"

    doNotRunAPIScan: ->
      @set "isApiScanEnabled", false
      @send "apiScan"
      @send "closeModal"

    showURLFilter: ->
      @set "showURLFilter", true
      @set "showAPIScan", false

    apiScan: ->
      isApiScanEnabled = @get "isApiScanEnabled"
      project_id = @get "file.project.id"
      apiScanOptions = [ENV.host,ENV.namespace, ENV.endpoints.apiScanOptions, project_id].join '/'

      that = @
      data =
        apiUrlFilters: apiUrlFilters
        isApiScanEnabled: isApiScanEnabled
      @get("ajax").post apiScanOptions, data: data
      .then (data)->
        that.get("notify").success "Successfully added the url filter & Starting the scan"
      .catch (error) ->
        for error in error.errors
          that.get("notify").error error.detail?.message
