Extracting svn information from Jira - php

Is it possible to extract svn information (commits etc.) from Jira via its api (Soap, Rest). I have Jira Subversion plugin enabled and it shows information about commits, but I don't know how to extract this information calling the api methods.

This is a very interesting question. I do not know for any API call and the SubversionPlugin Documentation doesn't suggest one. But you could always get direct access to a read-only copy of your JIRA instance's DB or query it using the API.
Your best options is to try posting a question on the Atlassian answers site or better yet creating a support request.
The thing is that if there is no API currently, they could be developing one right now and Atlassian may connect you with the developers so that they can give you further information.
They may even provide you with some early-access solution. I know this because we've used this option at the company I currently work at, but with the Tempo plugin. Hope this helped.

Related

Editing a Github repository by external users via API

We would like to create some kind of wiki and store all articles in a github repository.
As usual in a wiki, the articles should be able to be created or supplemented by anyone*.
Now it would be nice if this would not be possible via the Github page, but from our wiki itself.
For this Github has a fairly extensive API as an interface.
*Authentication via a Github account necessary.
After some research, I found two possibilities:
via the browser OctoKit
via the server KnpLabs/php-github-api
I would prefer the browser side way, because it does not require a backend.
But the way via PHP seems to be easier for me.
Therefore, first my question, whether the following is possible via Octokit:
Authentication of a user with his Github account
Change / add files in my repo under his name
edit
After the first comment, i decided not to go the "browser-way". But the way via PHP does not work either, because i just have a webspace with limited access rights (to /.ssh) so i have to lokk for a very different way...
In order to authenticate a GitHub user with their GitHub Account, you need to register a GitHub app or an OAuth app, which you can do in your user account settings or a GitHub organization settings.
For your case, I recommend a GitHub app. It must be installed on a repository in order to grant access, while OAuth Apps are for access tokens with global access.
I don't know PHP, but creating one with JavaScript is fairly straight forward, I just created a new one recently on Glitch:
https://glitch.com/edit/#!/twitter-together
When registering the GitHub App, you need to provide a redirect URL which needs to point to your website. The user will be redirected with a ?code=... query parameter which you will need to exchange for an user access token.
See GitHub's documentation at https://docs.github.com/en/developers/apps/building-oauth-apps/authorizing-oauth-apps#web-application-flow

How to use R1Soft server backup manager API?

I've done research on R1Soft Server Backup Manager API through this link:
http://wiki.r1soft.com/display/ServerBackupManager/Use+the+Server+Backup+API
My questions are:
1. How can i do the available actions in the UI with the SBM API? How can i add a protected machine to SBM, for example, through the API?
2. How to use the php scripts mentioned in /apisamples?
3. How to use the classes mentioned in the url /apidoc?
I'll be really grateful if someone could help with these issues.

Accessing Google App Engine's Search API from PHP

Is there anyway to do this? I've looked in the google-api-php-client library but it's not there yet. Is there any other way or am I out of luck?
The search API is only enabled for Python Java and Go, as Mario pointed out.
I would look into the modules documentation and try to separate your logic. Your search API can be the only module that isn't in PHP. There is no other solution for your problem unfortunately.
The team promised that a REST API would be made available at Google I/O 2011. I haven't been able to find any follow ups since.
https://www.youtube.com/watch?v=7B7FyU9wW8Y#t=2088
You CAN now access the Search API natively from PHP.
The library is in alpha but should make its way to release fairly soon.
It uses the Google Protocol Buffers so it's the same level of abstraction as the Python/Java/Go SDKs
https://github.com/tomwalder/php-appengine-search
Feedback appreciated!
I ran into this problem previously, so wrote a sample PHP+Python module pair to allow access to search via URL fetch to a Python module.
https://github.com/tomwalder/phpne14-text-search
I have a similar scenario as you. This might not be the best solution, but I've solved it as follows:
I've created a Python module using Google Endpoints API to expose a set of methods capable of sending and receiving JSON formatted data via HTTP GET or POST. These methods allow me create Documents and Indexes or do queries.
My PHP client, simply calls these urls and passes appropriate data.
So effectively I have a wrapper around the search API and the python stuff is hidden inside.

Get data from SAP CRM to PHP

I'm trying to automate getting(posting) data from SAP CRM using my server (cURL/PHP+MSSQL), but have some problems with it.
There is no access allowed except this web interface.
I tried to use cURL, using POST fields from FireBug, but it returned only logon error.
Questions:
Is there any solution or API?
Has anybody tried it?
Thanks.
Yes, there are APIs, though you'll have to be more specific about exactly what data you want in order to say if a particular API to serve your needs exists. SOAP web services are an option that may provide the information you need and there are PHP SOAP libraries. You'll need to talk to your SAP team to get access to the system, and you will probably want to be much more specific about the exact data you need access to.
If your company has Gateway, you can also define OData APIs. And it is, of course, possible to define your own RESTful (or other) HTTP APIs using SAP's HTTP stack. Again, you'll need to talk to your SAP team about this.

Making your PHP website into SAML Identity Provider

Story is that I need to make my website act as Identity Provider (read: IDP). Website itself is on Zend platform. Idea is making a IDP controller by which Service Providers (read: SP) contacts IDP. As it must be part of the website, I would need to include some extension, which could be easily used for responding SAML requests from SP.
I have found list of PHP extensions from:
https://wiki.surfnetlabs.nl/display/OSP/RFC+-+OpenSAMLphp,+a+new+PHP+library+for+SAML+2.0+support
All of these extensions have little documentation or are too complex. For example I haven't found a way to use SimpleSamlPHP in my application and also extracting useful code out of it looks very time consuming (which I really don't have anymore). Also I find all of them hard to implement into website.
I have been googling and checking github for days now, trying to find easy way to use some library (right now I'm trying to implement Lasso, which seems reasonable, but unfortunately lacks good examples / information how to use it as IDP).
Any kind of criticism, ideas, help or tutorial/code examples would be useful.
I wrote a guide about how deploy on an open source software (Tiki-wiki) an IdP using simplesamlphp, and how to connect the IdP to google or salesforce. Take a look:
https://github.com/pitbulk/tiki-saml/blob/master/doc/tiki_wiki_as_idp.rst
SimpleSAMLphp seems intimidating at first but it can handle all the SAML responses for you.
Have you looked at creating custom authentication module - http://simplesamlphp.org/docs/stable/simplesamlphp-customauth
You can tie this module to your existing login mechanism pretty easily.
Check out PingFederate and the PHP Integration Kit from Ping Identity. Alternatively there is the Agentless Integration Kit (instead of PHP) which allows you to integrate using a RESTful API call to the PingFed server instead of embedding any PHP libraries.
HTH,
Ian

Categories