Docs for Creating Export Users job is buggy

Hi,
In this documentation page: Auth0 Management API v2

the sample JSON shown is:

{
      "connection_id": "con_0000000000000001",
      "format": "csv",
      "limit": 5,
      "fields": [
        [
          {
            "name": "user_id"
          },
          {
            "name": "name"
          },
          {
            "name": "email"
          },
          {
            "name": "identities[0].connection",
            "export_as": "provider"
          },
          {
            "name": "user_metadata.some_field"
          }
        ]
      ]
    }

However, when trying to use a variation of this with my own auth token, I get back:

    {
        "statusCode": 400,
        "error": "Bad Request",
        "message": "Payload validation error: 'Expected type object but found type array' on property fields[0].",
        "errorCode": "invalid_body"
      }

Looks like the fields array in the sample contains another array but it should contain objects only.

1 Like

Hi @madhu,

Welcome to the Community! Thanks for the report. You’re 100% right. I’ve opened an issue to have it corrected:

https://github.com/auth0/docs/issues/8733

Cheers,
Mark

Thank you for validating! That drove me quite nuts!!

Thanks Mark I will ping the docs team on that front!