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.

The description below assumes that the submission of the observation batch is via use of the command-line tool cURL.

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

curl 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 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.