ripleyathome What is the setting of "Authentication Type" in Configuration->General->Base->HTTP Server Settings? The Curl syntax you are using will not work with the default setting of "Digest" authentication, only "Plain (insecure)" or "Plain and Digest".
If you want to keep the default setting of "Digest" the curl command needs to be:
curl -u user:password --digest http://localhost:9981/api/dvr/entry/grid_upcoming
If this works for you I'll take a look at the HTTP API documentation, as it seems this detail is missing.
[edit] Actually it is mentioned in the "Examples" page, but could be more prominent.