How can I automate looping through an index and running a pipeline against each document?

I have index with documents like:

[
      {
        "_index" : "converted-user",
        "_type" : "_doc",
        "_id" : "dTXSY0KNxU08jKDnZcc-nbkAAAAAAAAA",
        "_score" : 1.0,
        "_source" : {
          "username" : "A"
        }
      },
      {
        "_index" : "converted-user",
        "_type" : "_doc",
        "_id" : "dfSD8G1Jr5RDBni4Hsv9LWcAAAAAAAAA",
        "_score" : 1.0,
        "_source" : {
          "username" : "B"
        }
      }
    ]

I also have an enrich pipeline to enrich this document by username and stored them under a new index.

PUT /_ingest/pipeline/username_lookup
{
  "processors": [
    {
      "enrich": {
        "description": "Add speed and router info based on username",
        "policy_name": "username_policy",
        "field": "username",
        "target_field": "scan_data",
        "max_matches": "2"
      }
    }
  ]
}

I can manually enrich each documents by running:

PUT /convert_user_enriched/_doc/dfSD8G1Jr5RDBni4Hsv9LWcAAAAAAAAA?pipeline=username_lookup
{
  "username": "B"
}

BUT now the questions is how can I automate this enrich process by going the "converted-user" index automatically and implement the pipeline against each document.

Most likely you need to use the reindex API