0

I am using JuPyter hub on K8s. I went through the documentation and had a look at the APIs. Now, I want to use one to start a pod. However, I am unable to start one using this post.

What would be the curl request for this POST request?

I have tried with the given command and it does not work:

curl -XPOST http://some_ip.ap-south-1.elb.amazonaws.com/users/adwait/server

405 : Method Not Allowed
Benjamin Breton
  • 1,388
  • 1
  • 13
  • 42
Aviral Srivastava
  • 4,058
  • 8
  • 29
  • 81
  • First, you missing out on the content-type header and the JSON payload mentioned in the API docs. Next, I guess you have to provide the API-Key as mentioned in the Security section. This, however, is not a REST but just an ordinary Web-RPC service – Roman Vottner May 27 '19 at 13:15
  • I didn't get the API part. Can you post the answer? – Aviral Srivastava May 27 '19 at 13:22
  • I meant, I did not get the API-key part @RomanVottner – Aviral Srivastava May 27 '19 at 13:28
  • In the top of the documentation, underneath the summary, you have a section called Security which hints about including an apiKey as token. Not sure if this is required for the call, though if this follows so many so called "REST" APIs out there, it probably does. From skimming over the API docs, it seems that `GET /` is the only endpoint not requireing any form of authentication. `POST /authorizations/token` can be used to "convert" username and password to a token that can be used on further requests. – Roman Vottner May 27 '19 at 13:40

0 Answers0