GithubHelp home page GithubHelp logo

isabella232 / webhooks-app Goto Github PK

View Code? Open in Web Editor NEW

This project forked from workfront/webhooks-app

0.0 0.0 0.0 83 KB

Reference Implementation for the Webhook API Workfront infrustructure

License: Apache License 2.0

Java 100.00%

webhooks-app's Introduction

webhooks-app

A Reference implementation for Workfront's webhooks plugin framework. All APIs are based on Workfront's webhooks document API spec. In order to mimic a real document management system, we implements a simple file exchange system to achieve the goal. A maven tomcat7 plugin is embedded in the project to serve the application.

Usage

The steps to run the application are as follows:

1) mvn clean package -Pwebhooks-app

This will create webhooks-app-1.0-SNAPSHOT-war-exec.jar, war-exec.manifest and war-exec.properties files under target directory.

####2) java -jar <webhooks-app-1.0-SNAPSHOT--war-exec>.jar [options]

options:

Option Description
-ajpPort <ajpPort> ajp port to use
-clientAuth enable client authentication for https
-D key=value
-extractDirectory <extractDirectory> path to extract war content, default value: .extract
-h,--help help
-httpPort <httpPort> http port to use
-httpProtocol <httpProtocol> http protocol to use: HTTP/1.1 or org.apache.coyote.http11.Http11Nio Protocol
-httpsPort <httpsPort> https port to use
-keyAlias <keyAlias> alias from keystore for ssl
-loggerName <loggerName> logger to use: slf4j to use slf4j bridge on top of jul
-obfuscate <password> obfuscate the password and exit
-resetExtract clean previous extract directory
-serverXmlPath <serverXmlPath> server.xml to use, optional
-X,--debug debug

##Test To verify the app works, AtTask or Postman can be used to test the build.

####Some examples for using Postman

#####register a user

method: post
url: http://localhost:9966/webhooks-app/rest/accounts
message body: {"Id":"1", "name":"[email protected]", "password":"test"}

This should give back the json response

{
    "name": "[email protected]",
    "links": [
     {
     "rel": "self",
     "href": "http://localhost:9966/webhooks-app/rest/accounts/1"
     }
     ]
}

#####get a list of folders/documents under those published directories

method: get
url: http://localhost:9966/webhooks-app/rest/api/files
header:
Content-Type application/json
Accept application/json
username [email protected]
apiKey 123456

This will return a list of metadata for files/folders.

Configuration File

The webhooks-config.xml configuration file under WEB-INF directory can be used to configure the ApiKeys and published directories for document access. The apply-authentication tag can be used to turn on/off the authentication which is based on a registered user and ApiKey. More info is under Workfront web site.

License

Copyright (c) 2015 Workfront

Licensed under the Apache License, Version 2.0. See the top-level file LICENSE and (http://www.apache.org/licenses/LICENSE-2.0).

webhooks-app's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.