💻How to change name of a collection field

How to change the name of a collection field

Changing the name of a collection field requires us to make use of the /project/copy_collection endpoint and in particular the rename_fields argument.

This can be seen as:

let request = await fetch("https://vectorai-development-api.azurewebsites.net/project/copy_collection", {
      "method": "POST",
      "headers": {
            "Content-Type": "application/json"
      },
      "body": JSON.stringify({
        "username": "string",
        "api_key": "string",
        "collection_name": "string",
        "original_collection_name": "string",
        "rename_fields": { "old_field_name": "new_field_name" },
      })
})

let json = await request.json()

Last updated