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

Rest API #3

Open
chadgallagher opened this issue Mar 2, 2016 · 13 comments
Open

Rest API #3

chadgallagher opened this issue Mar 2, 2016 · 13 comments

Comments

@chadgallagher
Copy link

Is the API currently available in the current release? I am looking to schedule checks, that call on the API, so people can be notified if a ETL fails or is running for a long period of time.

@niphlod
Copy link
Owner

niphlod commented Mar 2, 2016

pretty much everything is ready, in fact the frontend is heavily decoupled and calls already a REST-like endpoint.
The missing part would be to connect the authentication part and the calls to the backend methods, if the setup you choose is going to be "protected" rather than "public".

@niphlod
Copy link
Owner

niphlod commented Mar 2, 2016

BTW: people can already use the RSS feed to get notified about executions.

@chadgallagher
Copy link
Author

For some reason, I have been able to get the RSS feed working. Keeps giving me a error. Do you have any documentation on the API?

@niphlod
Copy link
Owner

niphlod commented Mar 2, 2016

"I have been able" clashes with "keeps giving me an error" .... if there is one, what's the error ?

Methods of the API are pretty much self-documented (see controllers/rest_data.py).
They take "parameters" that are specified on the path in the same form of the frontend (i.e. /app/rest_data/par1/par2/par3/etc) .

The most useful for details about executions is package_list. Parameters are "folder", "project", "status", "package" which you can pass as

/app/rest_data/folder/<folder_name>/project/<project_name>/status/<status_name>/package/<package_name>

Feel free to ask for details, as ATM there are no specific docs on it nor there are methods that are not called from the frontend part. I'm open to discussion about implementing some useful patterns if they're not already available ^_^

@chadgallagher
Copy link
Author

It just gives me a internal error and that it created a ticket. The URL it is pointing to is http://10.1.15.86:8000/init/console/overview/{Name}. I do not see a link to the xml

@niphlod
Copy link
Owner

niphlod commented Mar 2, 2016

strange, it should create a link like /init/subscriptions/feed/parameters/etc etc etc. Are you using "public" or "protected" mode ?

@chadgallagher
Copy link
Author

I am using public mode. Now I do not have a email address in there as of yet as well

@niphlod
Copy link
Owner

niphlod commented Mar 2, 2016

when you click on the rss icon you should be redirected to something like

/init/subscriptions/feed/parameters....?user=default&signature=a_long_string

if you want you can send me the generated ticket so I can see what is happening, it doesn't contain sensitive data. Just zip the "errors" folder and send it to niphlod at gmail dot com

@chadgallagher
Copy link
Author

If I look at the file in the error folder I see this at the top. I do not get directed to a link like you posted above

S"<type 'exceptions.IOError'> [Errno 2] No such file or directory: 'c:\web2py\applications\init\private\temp_feeds\295a1900af3dfe402689db3be85e5bb1.rss.__lock'"

@chadgallagher
Copy link
Author

A great option would be to email out to a group/list is there is a error flag from one of the ETL's. Helps stop surprises in the morning

@niphlod
Copy link
Owner

niphlod commented Mar 2, 2016

huh. that's pretty helpful, you found a bug...
to solve it quickly, go ahead and create the temp_feeds folder inside /init/private.
I'll push a new release fixing the bug ASAP.

@chadgallagher
Copy link
Author

Perfect, adding that folder worked

@niphlod
Copy link
Owner

niphlod commented Mar 2, 2016

latest 0.0.34 pushed seconds ago fixes the issue if the folder does not exist. thanks for spotting!

as for the mail feature: the rationale behind feeds over mails is that if people is interested, feeds get generated accordingly.
If nobody is interested, app is "at rest" and SSISDB doesn't get queried.
In my enterprise I have nearly a hundred SSISDB instances with a total sum of 30k executions per day.
Developers and controllers come and go: maintaining a list of "interested" recipients would be a nightmare.
With RSS feeds, I'm able to "compute" exactly what is needed and when is needed, without the maintenance burden and lots of "spam" with eventual bounces to inspect.
Anyway, it won't be that hard to provide such a feature hooking up with the packages_list API: if the feature gets traction I'll be glad to include it or to accept a PR.

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

No branches or pull requests

2 participants