• MPC Preparation (Info)

  • Information on How to Submit Observations From the Command Line

    The Minor Planet Center can now accept observations submitted direct to a script running on our script-server machine. The advantages of using this method for submitting observations are that the submitter gets an instant notification that the batch has been received and there is no transmission via e-mail, meaning that long lines will not be broken.

    Starting on 2017 Oct. 30, we now require connections to be made via https, rather than http. The examples below reflect this requirement.

    The description below assumes that the submission of the observation batch is via use of the command-line tool cURL. If your script does not work after changing http: to https: (or adding https://), then check whether your cURL versions supports SSL: curl -V should show "https" under "Protocols" and "SSL" under "Features". You should also ensure that you are running a fairly recent version of cURL (it is known that V7.19.7 [released in 2009] works, but V7.12.1 [released in 2004] does not).

    To submit observations from the command line (or via a script), simply issue the following command:

    curl https://minorplanetcenter.net/submit_obs -F "source=<myobs.txt"

    where myobs.txt is replaced with the local file name of the observation batch you wish to submit. Be sure to include the "<"--that is very important!

    The submitted batch must contain correctly formatted observations, along with a valid observational header, just as with an e-mail submission. Note that curl submission requires an AC2 line to indicate where to send ACKs and designations.

    Within a couple of seconds (depending on network latency and size of batch), you will get back an informational message indicating that the batch has been transmitted. This message displays a CurlID that you should report when querying the status of a batch of observations. You will then receive via e-mail the normal messages associated with the submission of observations.

    Any problems should be reported to the MPC.

    Using Tools Other Than cURL

    If you wish to call the script via tools other than cURL, you are not to use the script listed above for testing purposes.

    If you wish to test your script, use minorplanetcenter.net/submit_obs_test instead of minorplanetcenter.net/submit_obs. The format of the call to the test script is exactly the same as that of the functional script. The test script runs the same basic checks as the functional script. To test your script, simply issue the following command:

    curl https://minorplanetcenter.net/submit_obs_test -F "source=<myobs.txt"

    where myobs.txt is replaced with the local file name of the observation batch you wish to submit. Be sure to include the "<"--that is very important! You will get back a CurlID confirming that the batch was received. The submitted batch is NOT passed to the processing routines for processing.