ace-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r827410 - in /websites/staging/ace/trunk/content: ./ user-doc/restapi.html
Date Mon, 30 Jul 2012 13:15:52 GMT
Author: buildbot
Date: Mon Jul 30 13:15:52 2012
New Revision: 827410

Log:
Staging update by buildbot for ace

Added:
    websites/staging/ace/trunk/content/user-doc/restapi.html
Modified:
    websites/staging/ace/trunk/content/   (props changed)

Propchange: websites/staging/ace/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Mon Jul 30 13:15:52 2012
@@ -1 +1 @@
-1358940
+1367077

Added: websites/staging/ace/trunk/content/user-doc/restapi.html
==============================================================================
--- websites/staging/ace/trunk/content/user-doc/restapi.html (added)
+++ websites/staging/ace/trunk/content/user-doc/restapi.html Mon Jul 30 13:15:52 2012
@@ -0,0 +1,295 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="en">
+  <head>
+    <title>Client REST API</title>
+
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+    <meta property="og:image" content="http://www.apache.org/images/asf_logo.gif" />
+
+    <link rel="stylesheet/less" type="text/css" href="/lib/bootstrap.less">
+    <link href="/css/prettify.css" rel="stylesheet">
+	<link href="/css/code.css" rel="stylesheet" media="screen">
+    <script src="/js/less-1.2.1.min.js" type="text/javascript"></script>
+    <script src="http://code.jquery.com/jquery-1.7.min.js"></script>
+    <script src="/js/prettify.js"></script>
+    
+    <script src="/js/bootstrap-alert.js"></script>
+    <script src="/js/bootstrap-dropdown.js"></script>
+    <script src="/js/bootstrap-tooltip.js"></script>
+    <script src="/js/bootstrap-alerts.js"></script>
+    <script src="/js/bootstrap-modal.js"></script>
+    <script src="/js/bootstrap-transition.js"></script>
+    <script src="/js/bootstrap-button.js"></script>
+    <script src="/js/bootstrap-popover.js"></script>
+    <script src="/js/bootstrap-twipsy.js"></script>
+    <script src="/js/bootstrap-buttons.js"></script>
+    <script src="/js/bootstrap-scrollspy.js"></script>
+    <script src="/js/bootstrap-typeahead.js"></script>
+    <script src="/js/bootstrap-carousel.js"></script>
+    <script src="/js/bootstrap-tab.js"></script>
+    <script src="/js/bootstrap-collapse.js"></script>
+    <script src="/js/bootstrap-tabs.js"></script>
+    
+    
+    <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
license agreements.  See the NOTICE file distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file to you under the Apache License,
Version 2.0 (the &quot;License&quot;); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at . http://www.apache.org/licenses/LICENSE-2.0
. Unless required by applicable law or agreed to in writing, software distributed under the
License is distributed on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS
OF ANY KIND, either express or implied.  See the License for the specific language governing
permissions and limitations under the License. -->
+    <script>
+    $(function () { prettyPrint() })
+    $().dropdown()
+    </script>
+  </head>
+
+  <body style="padding-top: 50px;">
+    <div class="navbar navbar-fixed-top">
+      <div class="navbar-inner">
+        <div class="container">
+          <a class="brand" href="/index.html">Apache ACE&trade;</a>
+          <ul class="nav">
+  <li class="dropdown">
+    <a href="#" class="dropdown-toggle" data-toggle="dropdown">News <b class="caret"></b></a>
+    <ul class="dropdown-menu">
+      <li>
+        <a href="/news.html">News</a>
+      </li>
+      <li>
+        <a href="/on-the-web.html">On the web</a>
+      </li>
+    </ul>
+  </li>
+  <li>
+    <a href="/downloads.html">Downloads</a>
+  </li>
+  <li class="dropdown">
+    <a href="#" class="dropdown-toggle" data-toggle="dropdown">User Documentation <b
class="caret"></b></a>
+    <ul class="dropdown-menu">
+      <li>
+        <a href="/user-doc/introduction.html">Introduction</a>
+      </li>
+      <li>
+        <a href="/user-doc/getting-started.html">Getting Started</a>
+      </li>
+      <li>
+        <a href="/user-doc/features.html">Features</a>
+      </li>
+      <li>
+        <a href="/user-doc/faq.html">FAQ</a>
+      </li>
+      <li>
+        <a href="/user-doc/support.html">Support</a>
+      </li>
+    </ul>
+  </li>
+  <li class="dropdown">
+    <a href="#" class="dropdown-toggle" data-toggle="dropdown">Developer Documentation
<b class="caret"></b></a>
+    <ul class="dropdown-menu">
+      <li>
+        <a href="/dev-doc/requirements/">Requirements</a>
+      </li>
+      <li>
+        <a href="/dev-doc/architecture.html">Architecture</a>
+      </li>
+      <li>
+        <a href="/dev-doc/analysis/">Analysis</a>
+      </li>
+      <li>
+        <a href="/dev-doc/design/">Design</a>
+      </li>
+      <li>
+        <a href="/dev-doc/coding-standards.html">Coding Standards</a>
+      </li>
+    </ul>
+  </li>
+  <li class="dropdown">
+    <a href="#" class="dropdown-toggle" data-toggle="dropdown">Get Involved <b class="caret"></b></a>
+    <ul class="dropdown-menu">
+      <li>
+        <a href="/get-involved/mailing-lists.html">Mailing Lists</a>
+      </li>
+      <li>
+        <a href="/get-involved/issue-tracking.html">Issue Tracking</a>
+      </li>
+      <li>
+        <a href="/get-involved/source-code.html">Source Code</a>
+      </li>
+      <li>
+        <a href="/get-involved/project-team.html">Project Team</a>
+      </li>
+    </ul>
+  </li>
+  <li class="dropdown">
+    <a href="#" class="dropdown-toggle" data-toggle="dropdown">Wiki <b class="caret"></b></a>
+    <ul class="dropdown-menu">
+      <li>
+        <a href="https://cwiki.apache.org/confluence/display/ACE/Board+Reports">Board
Reports <i class="icon-share-alt"></i></a>
+      </li>
+      <li>
+        <a href="https://cwiki.apache.org/confluence/display/ACE/Index">Homepage <i
class="icon-share-alt"></i></a>
+      </li>
+    </ul>
+  </li>
+  <li class="dropdown">
+    <a href="#" class="dropdown-toggle" data-toggle="dropdown">Apache <b class="caret"></b></a>
+    <ul class="dropdown-menu">
+      <li>
+        <a href="http://www.apache.org/">Apache Homepage <i class="icon-share-alt"></i></a>
+      </li>
+      <li>
+        <a href="http://www.apache.org/licenses/">Licenses <i class="icon-share-alt"></i></a>
+      </li>
+      <li>
+        <a href="http://www.apache.org/security/">Security <i class="icon-share-alt"></i></a>
+      </li>
+      <li>
+        <a href="http://www.apache.org/foundation/sponsorship.html">Sponsorship <i
class="icon-share-alt"></i></a>
+      </li>
+      <li>
+        <a href="http://www.apache.org/foundation/thanks.html">Thanks <i class="icon-share-alt"></i></a>
+      </li>
+    </ul>
+  </li>
+</ul>
+
+        </div>
+      </div>
+    </div>
+    <div class="container">
+      <p><a href="/"><i class='icon-home'></i> Home</a>&nbsp;&raquo&nbsp;<a
href="/user-doc/">User-doc</a></p>
+      <h1>Client REST API</h1>
+      <div class="clear"></div>
+      <div id="content"><h1 id="introduction">Introduction</h1>
+<p>To automate the interaction with ACE, you can use its REST client API. Typical use
cases include the tight integration of ACE into your development or automated build process,
or the creation of a custom user interface or integration.</p>
+<p>This is still a work in progress which you can track in ACE-151.</p>
+<h1 id="overview">Overview</h1>
+<p>Before we dive into the various REST endpoints, let's start with an overview of
how all of this works. Everything in ACE is an entity. For example, an artifact or a feature
is an entity, but also the association between an artifact and a feature is. Entities have
properties and tags. Properties are the "fixed" attributes that make up a specific type of
entity. For example a feature has a name and a description. If you know the type of entity,
its properties are also known. Tags on the other hand are attributes that a user can freely
add and refer to.</p>
+<p>The following diagram shows the different entities that ACE knows:
+<img alt="alt text" src="https://cwiki.apache.org/confluence/download/attachments/27822075/entities.png?version=1&amp;modificationDate=1311923466000"
/></p>
+<p>For each entity we will now list and explain the properties:</p>
+<h1 id="artifact">Artifact</h1>
+<p>Artifacts contain the metadata for the different types of artifacts that can be
provisioned to targets. Artifacts can be bundles, configuration data or any other type you've
defined yourself.</p>
+<ul>
+<li>artifactName</li>
+<li>artifactDescription</li>
+<li>url</li>
+<li>mimetype</li>
+<li>processorPid</li>
+</ul>
+<p>Since there are different types of artifacts, some properties depend on the actual
type.</p>
+<p>For bundles:</p>
+<ul>
+<li>Bundle-Name</li>
+<li>Bundle-SymbolicName</li>
+<li>Bundle-Version</li>
+</ul>
+<p>For configuration:</p>
+<ul>
+<li>filename</li>
+</ul>
+<p>For other types, please consult the documentation about these types (specifically
the classes that implement the interfaces in the org.apache.ace.client.repository.helper package).</p>
+<h1 id="artifact2feature">Artifact2Feature</h1>
+<p>Associates artifacts to features. Associations have a left and right hand side.
Both can be expressed as filter conditions, and both have a cardinality.</p>
+<ul>
+<li>leftEndpoint</li>
+<li>rightEndpoint</li>
+<li>leftCardinality — defaults to 1</li>
+<li>rightCardinality — defaults to 1</li>
+</ul>
+<h1 id="feature">Feature</h1>
+<p>A feature is a grouping mechanism for artifacts. It is commonly used to group together
a set of artifacts that together represent some kind of feature to the application.</p>
+<ul>
+<li>name</li>
+<li>description</li>
+</ul>
+<h1 id="feature2distribution">Feature2Distribution</h1>
+<p>Associates features to distributions. Associations have a left and right hand side.
Both can be expressed as filter conditions, and both have a cardinality.</p>
+<ul>
+<li>leftEndpoint</li>
+<li>rightEndpoint</li>
+<li>leftCardinality — defaults to 1</li>
+<li>rightCardinality — defaults to 1</li>
+</ul>
+<h1 id="distribution">Distribution</h1>
+<p>A feature is a grouping mechanism for features. It is commonly used to group together
a set of features that together represent some kind of distribution. Distributions are the
things you can associate with targets, so you can look at them as the licensable configurations
of your software.</p>
+<ul>
+<li>name</li>
+<li>description</li>
+</ul>
+<h1 id="distribution2target">Distribution2Target</h1>
+<p>Associates distributions to targets. Associations have a left and right hand side.
Both can be expressed as filter conditions, and both have a cardinality.</p>
+<ul>
+<li>leftEndpoint</li>
+<li>rightEndpoint</li>
+<li>leftCardinality — defaults to 1</li>
+<li>rightCardinality — defaults to 1</li>
+</ul>
+<h1 id="target">Target</h1>
+<p>A target receives the artifacts you provision to it. Most of the time, a target
is an OSGi container and provisioning means you'll actually install the artifacts in the container,
but there can be other types of targets (non-OSGi containers, or something completely different).</p>
+<ul>
+<li>id</li>
+<li>autoapprove</li>
+</ul>
+<p>A target also has specific state (see below for how that is returned):</p>
+<ul>
+<li>registrationState — Unregistered, Registered</li>
+<li>provisioningState — Idle, InProgress, OK, Failed</li>
+<li>storeState — New, Unapproved, Approved</li>
+<li>currentVersion</li>
+<li>isRegistered</li>
+<li>needsApproval</li>
+<li>autoApprove</li>
+<li>artifactsFromShop</li>
+<li>artifactsFromDeployment</li>
+<li>lastInstallSuccess</li>
+</ul>
+<h1 id="checkout-and-commit">Checkout and commit</h1>
+<p>Similar to the web based UI, this API also works with the concept of checking out
a copy to a local working area, altering it in that working area and then committing it back
to the server.</p>
+<h2 id="post-work">POST /work</h2>
+<p>Creates a working copy for you, with its own ID, and redirects you to it. (For the
contents of this working copy, see below.)</p>
+<p>Response:</p>
+<ul>
+<li>302 /work/ID</li>
+</ul>
+<h2 id="delete-workid">DELETE /work/ID</h2>
+<p>Deletes the working copy. Signals you're done with it, without transferring the
data back to the server.</p>
+<h2 id="post-workid">POST /work/ID</h2>
+<p>Sets the working copy to be the current version. We keep track of whether you have
based your copy on, and will reject the update if it is no longer the latest.</p>
+<p>Response:</p>
+<ul>
+<li>200</li>
+<li>409</li>
+</ul>
+<h1 id="repositories-and-objects">Repositories and objects</h1>
+<p>Now you have a working copy, you can start working with it.</p>
+<h2 id="get-workid">GET /work/ID</h2>
+<p>Gets you a list of all repositories you can use. Should return: ["artifact", "feature",
"distribution", "target", "artifact2feature", "feature2distribution", "distribution2target"]</p>
+<h2 id="get-workidfeature">GET /work/ID/feature</h2>
+<p>Lists all feature IDs in the feature repository.</p>
+<h2 id="post-workidfeature">POST /work/ID/feature</h2>
+<p>Creates a new feature. In the post body, you can specify attributes and tags, for
example: {attributes: {key: "value"}, tags: {key: "value"}}.</p>
+<p>Response:</p>
+<ul>
+<li>302 /work/ID/feature/FID</li>
+<li>400</li>
+</ul>
+<h2 id="get-workidfeaturefid">GET /work/ID/feature/FID</h2>
+<p>Returns a representation of the object, for example: {attributes: {key: "value"},
tags: {key: "value"}}. If you ask for a target, you will also get its state, so the result
will be in the form: {attributes: {key: "value"}, tags: {key: "value"}, state: {key: "value"}}.</p>
+<h2 id="put-workidfeaturefid">PUT /work/ID/feature/FID</h2>
+<p>Updates the object with the JSON data you supply.</p>
+<p>Response:</p>
+<ul>
+<li>200</li>
+<li>400</li>
+<li>404</li>
+</ul>
+<h2 id="delete-workidfeaturefid">DELETE /work/ID/feature/FID</h2>
+<p>Deletes the object.</p>
+<p>Response:</p>
+<ul>
+<li>200</li>
+<li>404</li>
+</ul></div>
+      <hr>
+      <footer>
+        <p>Copyright &#169; 2012 <a href="http://www.apache.org/">The Apache
Software Foundation</a>, Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache
License, Version 2.0</a>.<br/>Apache ACE, the Apache ACE logo, Apache and the
Apache feather logo are trademarks of The Apache Software Foundation. All other marks mentioned
may be trademarks or registered trademarks of their respective owners.</p>
+      </footer>
+    </div>
+  </body>
+</html>



Mime
View raw message