Open hrfuller opened 1 year ago
Thanks for the issue. We will try to document this in the following week. Is there anything in particular you are looking for now?
Im trying to update an application without installing the CLI, I think I've figured out how to do it by guessing the relationships. Looks like curl -XPATCH --data $app_spec https://cloud.synpse.net/api/projects/$project/namespaces/$namespace/applications/$app
works.
Can you use yaml as well as json at these endpoints?
Currently, only JSON is supported. It should not be hard to add support for yaml payload, but it was not on our radar.
Until we document this, a good source for this could be our go client repository: https://github.com/synpse-hq/synpse-go/blob/main/application.go#L77 and application struct itself https://github.com/synpse-hq/synpse-go/blob/main/application.go#L152
Most of the operations can be done using simple crud on the pattern you already found getURL(api.BaseURL, projectsURL, api.ProjectID, namespacesURL, namespace, applicationsURL, p.Name)
I will dedicate some time this weekend to document the most common APIs for this, but until this let me know if any other API you need.
Let us know if this works for you: https://docs.synpse.net/resources/api-documentation https://cloud.synpse.net/swagger.html
It still needs to be populated with few other API's metadata like Jobs, actions, log streaming. But this should be good start.
This is an awesome start. I also don't see the projects/*/devices/*
endpoints in there yet, but I'm sure you'll add those.
One piece of feedback: the "update" routes shows a POST, but I believe you have to use the PATCH method to update an existing model. At least in my testing that has been true.
Ah, you right. Will adjust. This is based on annotations so I think I added it wrong on the api layer.
There are allusions to a REST API that can be used, e.g sample GET commands with curl when generating a service account. However I can't find any description of available api endpoints and the methods they support.