9 years, 11 months ago.

Authentication https address.

Hello dear all, I thank you for me to join your API-Team.

I have one question. I think normally API basic http authentication require this api-method. Usually, cURL HTTP Basic Authentication command send to following.

curl --user name:password http://www.foo-bar.com

But, I don't know http address. please let me know http address.

Best regards, Kazu,

Question relating to:

Users of the mbed REST API

1 Answer

9 years, 11 months ago.

Is https://mbed.org/api/v2/tasks/compiler/start/ not working?

Accepted Answer

ummmm this is HTTPS.... require by Basic Authentication...

My result is following.

$ curl --user Accountname:Passwd https://mbed.org/api/v2/tasks/compiler/start/

Piston/0.2.3rc1 (Django 1.6.3) crash report:

Method signature does not match.

Signature should be: task_id

Exception was: read() takes exactly 3 arguments (2 given)
kazu@kazu-deverop:~$

Can you connect and work on API this address? If you are no problem, please let me know example for API Authentication.

regards, kazu

posted by Kazu Zamasu 11 May 2014

It works!!

include the mbed library with this snippet

$ curl --user ytsuboi:passoword https://mbed.org/api/v2/tasks/compiler/start/ -d 'platform=LPC114FN28' -d 'program=1114LEDBlink'
{
    "code": 200, 
    "errors": null, 
    "warnings": null, 
    "meta": null, 
    "result": {
        "display_notices": null, 
        "data": {
            "task_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
        }, 
        "display_warnings": null, 
        "display_errors": null, 
        "result_meta": null
    }, 
    "notices": null
}
posted by Yoshihiro TSUBOI 11 May 2014

Thank you so much for your co-operation!!!

I had misunderstood the POST option. Bad command is following.

curl --user kazu_zamasu:passwd --request 'POST' 'https://mbed.org/api/v2/tasks/compiler/start/' --header 'platform="mbed-LPC1768", program="main"'

I change cURL option -d use. I resolve problem!

thank you TSUBOI-san, ARIGATOU(Japanese in the same sense as the English Thank you.)

regards, kazu

posted by Kazu Zamasu 11 May 2014

Assigned to Kazu Zamasu 9 years, 11 months ago.

This means that the question has been accepted and is being worked on.