MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.25k stars 21.42k forks source link

Curl command example #5114

Closed stephlocke closed 6 years ago

stephlocke commented 6 years ago

It would be helpful to have a curl command example here for the image url endpoint


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ghost commented 6 years ago

@stephlocke - Thank you for the suggestion/feedback. The folks listed in the article as the content owners don't work here now, so I am going to have to track down the current product owner.

stephlocke commented 6 years ago

Here is one I wrote yesterday

curl -H 'Prediction-Key: 634e5ccc37c04515a5' -H "C
ontent-type: application/json" -d '{"Url": "https://github.com/stephlocke/lazyCDN/blob/ma
ster/leia-inquisitive.jpg?raw=true"}' https://southcentralus.api.cognitive.microsoft.com/
customvision/v1.1/Prediction/7f571dd8-a1d7-4be9-8fd8-e1d03/url?iterationId=79e1fe1
5-6c7e-4132-a7f1-3c97506

* keys and guids truncated

JennieHubbard commented 6 years ago

@stephlocke Thank you for that!! @Blackmist Larry is there someone who can take a look at this one?

Blackmist commented 6 years ago

@JennieHubbard @stephlocke Tracking down the current owner of this document now.

Blackmist commented 6 years ago

Apologies for the delay on this @stephlocke .

@MicrosoftDocs/azure-cxp-triage can you please assign to @anrothMSFT ? The author fields in the document have already been updated.

anrothMSFT commented 6 years ago

Thank you. So we have example curl commands and other snippets on the API reference page. But I see that this is not clearly linked to from this documentation. I am going to update this page to clear link to the reference page in the intro.

ksaye commented 6 years ago

If you want to upload the file in the curl command, this sample command should help: curl -H "Prediction-Key: 9564REMOVED699" -H "Content-type: application/octet-stream" -X POST --data-binary @image.jpg 'https://southcentralus.api.cognitive.microsoft.com/customvision/v1.1/Prediction/1d865b07-6836-4642-8fbd-ad493b4c3064/image'

tchristiani commented 6 years ago

please-close

Mike-Ubezzi-MSFT commented 6 years ago

@stephlocke We will now proceed to close this thread. If there are further questions regarding this matter, please reopen it and we will gladly continue the discussion.