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

MMS API Examples don't work

    XMLWordPrintableJSON

Details

    Description

      Within the MMS API Documentation we have a number of examples.

      These examples all consistently use -data @{ some: "Json"}. The @ symbol in this case is incorrect as it states that what follows will be a filename.

      Example command from API:

      curl -u "username:apiKey" -H "Content-Type: application/json" "https://mms.mongodb.com/api/public/v1.0/groups/<groupid>/hosts" -X POST --digest --data @-
      {
        "hostname": "localhost",
        "port": 27017
      }

      Correct Example

      curl -u "username:apiKey" -H "Content-Type: application/json" "https://mms.mongodb.com/api/public/v1.0/groups/<groupid>/hosts" -X POST --digest --data '{ "hostname": "localhost", "port": 27017 }'

      Can we please update (and ideally test) all the examples to confirm that they are correct?

      Attachments

        Activity

          People

            allison.moore@mongodb.com Allison Reinheimer Moore
            david.hows David Hows
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              9 years, 1 week, 6 days ago