Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-13933

[Atlas] roles data type is referred to as a "string array", where it should actually be an "array of documents"

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Atlas

      Description

      On the Atlas API documentation page for creating a user: https://docs.atlas.mongodb.com/reference/api/database-users-create-a-user/

      I believe the roles data type is mischaracterized as a "string array" whereas it should be an "array of documents".
      Additionally it would be helpful if there was a sample payload, because my structure keeps getting errors:

      payload:

        {    "databaseName": "sample_mflix",    "deleteAfterDate": "2020-10-25T10:49:40Z",    "username": "foo",    "password": "bar",    "roles": [        {            "databaseName": "admin",            "roleName": "atlasAdmin",            "collectionName": "users"        }    ]  }
      

      response:

      {    "detail": "Invalid attribute roleName specified.",    "error": 400,    "errorCode": "INVALID_ATTRIBUTE",    "parameters": [        "roleName"    ],    "reason": "Bad Request"}

      Scope of changes

      Impact to Other Docs

      MVP (Work and Date)

      Resources (Scope or Design Docs, Invision, etc.)

            Assignee:
            steve.renaker@mongodb.com Steve Renaker (Inactive)
            Reporter:
            ethan.steininger@mongodb.com Ethan Steininger (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              3 years, 37 weeks, 6 days ago