Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Endpoint creation via the API is broken #1827

Closed
dhenneke opened this issue Apr 21, 2018 · 3 comments
Closed

Endpoint creation via the API is broken #1827

dhenneke opened this issue Apr 21, 2018 · 3 comments

Comments

@dhenneke
Copy link

Since merging #1817, a POST to /api/endpoints no longer expects the payload to be application/json but to be formatted as form. When I call the API as defined in the swagger file, I receive:

{
  "err": "Invalid request data format"
}

It works when I format it as multipart/form-data. Was this change intended?

@deviantony
Copy link
Member

@dhenneke Indeed, I need to update the API documentation. We'll use this issue to track the swagger fie update.

The /api/endpoints now expects a multipart/form-data payload using the following structure:

Name string
URL string
PublicURL string
TLS boolean
TLSSkipVerify boolean
TLSSkipClientVerify boolean
TLSCACertFile file
TLSCertFile file
TLSKeyFile file

As you can see now you can embed the TLS files inside the endpoint creation request payload, this should make it easier to create TLS endpoints (instead of executing multiple requests to the /api/upload endpoint post endpoint creation).

It is also a requirement since we now send a ping request to the underlying Docker environment at endpoint creation time to ensure that we can connect to it.

Feel free to ask any questions, I'll update the docs as a part of the next release.

Note: #1817 has been tagged as breaking changes.

@deviantony deviantony added this to the 1.16.x milestone Apr 22, 2018
@dhenneke
Copy link
Author

Thanks for the clarifications. Looks like I was too impatient. I was using the endpoint for a workaround to #1828, but this seems to be finally solved by you. Thanks for the awesome work!

@deviantony
Copy link
Member

Great, feel free to give us some feedback in #1828

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants