Skip to content

Instantly share code, notes, and snippets.

@goncalossilva
Created April 1, 2025 15:37
Show Gist options
  • Save goncalossilva/c05f44872cfc05fca983600731d7c54c to your computer and use it in GitHub Desktop.
Save goncalossilva/c05f44872cfc05fca983600731d7c54c to your computer and use it in GitHub Desktop.
ids = []
for each batch of 100 old_ids:
batchIds = current batch of old_ids
url = "/id_mappings/" + objectType + "/" + join(batchIds, ",")
headers = { "Authorization": "Bearer " + authToken }
response = get(url, headers)
add response.data to ids
return ids // array of {old_id, new_id} mappings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment