I want to use an on prem bitbucket server using the bitbucket rest api from an application to create, update, and manage projects, repositories, teams etc while taking the parameters from my UI. And create we hooks from my java application. Can anyone point me in the right direction and a few examples to use the api for these from my spring boot project? What are the prerequisites
PS: I looked at the api docs and tried from postman and i want to call the rest end point from my java application.
Edit:
So I am trying to use the JAVA api given
<dependency>
<groupId>com.atlassian.bitbucket.server</groupId>
<artifactId>bitbucket-rest</artifactId>
<version>4.0.0-eap1</version>
<scope>provided</scope>
</dependency>
I'm unable can someone point me to the right direction to initialize or configure the BitBucketClient in my Java code. I don't know how to start calling my local bitbucket server
Related
I need a Spring Batch Admin-like application to embed in my own SB-powered Spring Boot application.
The Spring website says it's deprecated and been moved to the Spring Attic. They recommend making use of Spring Cloud Dataflow Console.
I investigated this, and it appears that there is a lot of additional functionality I don't need -- all I want to do is inspect and retry batch job executions.
Is there a means of getting only this functionality, short of carving out the Jobs controllers out of the REST API implementation, and building my own admin screens?
Yes, it is possible; however, you'd still have to use SCDF to gain access to the REST-APIs.
Once when you have SCDF running, you'd get access to the Task/Batch-job specific REST endpoints and that you can use in your custom dashboard tooling.
i am actually analyzing JIRA for my company regarding the functionalities and the different APIs. At the Atlassian Homepage i found two official provided APIs (JAVA API or JIRA REST API).
My further intentions are to program an interface between my stand-alone application and JIRA. The idea is for instance to control the user-management (add, delete, modify user, etc.), project-management (create project, delete, etc.) and other things from this application. Therefore i need a way to interact with JIRA.
Normally i would avoid the REST API and prefer the JAVA API, because other interfaces are even managed by the JAVA API, but i can't find any examples for connecting, adding or modifying workItems in JIRA. I have just found the java api documentation.
https://developer.atlassian.com/jiradev/jira-apis/java-api-policy-for-jira
Would you suggest only the JAVA REST API or are there any good examples for the JAVA API?
Thanks a lot!
It really depends on what you are trying to achieve. The Java API is mostly used to build Jira plugins, while the REST API is used when you want to integrate external applications.
In your case the normal choice would be the REST API.
I'm developing a message-driven module that does not offer any web services (although it might invoke some). The main loop is to listen for incoming messages.
The reason I'm thinking of re-using dropwizard is because, even though I'm not developing any web services, I'd like to reuse the rest of the functionality that comes packaged with dropwizard - database, migrations, configuration,.yml files, jersey client etc. Is that possible (without a hack)?
You should be able to use the components that interest you as Maven dependencies. Like this:
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-configuration</artifactId>
<version>0.9.1</version>
</dependency>
These individual modules don't depend on dropwizard-core so you won't be pulling in Jetty, etc.
Has anyone configured swagger with spring-data-rest. I know swagger has DocumentationConfig class which scans for all spring-mvc request mappings. But, how to use that for spring-data-rest as there are no explicit request mappings defined. Any help in this regard is greatly appreciated. Also, like to know, if there are any other documentation framework which supports Spring-Data-Rest.
In version greater than 2.6.0 of SpringFox, support for spring data rest was added (but it's still in incubation). In order to add support for Spring Data Rest, you need to include the dependency below:
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-data-rest</artifactId>
<version>2.6.1</version>
</dependency>
This has been lingering out there a while, but as others have mentioned, there are (still) no Swagger implementations that support Spring Data Rest. However, Spring Data Rest does follow the HAL specification, and the HAL Browser integrated really seamlessly with any SDR project. Coupled together with the newer versions of SDR that expose ALPS metadata, this should be very sufficient for your documentation goals.
Answer for your second question:
AsciiDoctor combined with Spring REST Docs/RestAssured can be neat way of documenting SDR endpoints. It does require a bit of manual effort though, as the only automated part will be the creation of snippets. These can then be loaded into your AsciiDoc files.
was wondering if I can use the Neo4j Java API for connecting to remote DBs or is REST the only way for me to access a remote DB ? Was looking to use something like
GraphDatabaseService graphDb = new GraphDatabaseFactory().newEmbeddedDatabase(NEO_4J_REMOTE_DB_ENDPOINT);
If I can use, what would my endpoint look like ? '/db/data ?
Or is it the case where I have to use REST ?
I have my server running in GAE and have a Neo4j instance in Heroku.
Thanks guys.
REST is the only communication protocol with the server version at the moment. There have been talks about a binary protocol but that does not exist atm.
However, there are several layers for different languages over this REST API. For Java, you can find it here :
https://github.com/neo4j/java-rest-binding
This allows you to use the same API as the embedded version, but in the background it is translated to REST. There are some limitations on the functionality, and it's not up to date with all the latest versions but never the less, it works pretty darn good and I always use it with Heroku.
EDIT: If you're using maven, add this repository http://m2.neo4j.org/index.html and then add these lines to your POM
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-rest-graphdb</artifactId>
<version>2.0.1</version>
</dependency>