Skip to content

Commit

Permalink
documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
rsoika committed Dec 19, 2017
1 parent e4ceb0a commit 3c71d6a
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 1 deletion.
56 changes: 56 additions & 0 deletions src/site/markdown/restapi/adminp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# The AdminP Service
The resource _/adminp_ provides methods to create administrative jobs. Jobs can be monitored with the [Imixs-Admin Client](../administration.html).


## GET Jobs
The GET method is used to read all running ore completed jobs:


| URI | Method | Description |
|-------------------------|--------|------------------------------------------------------------|
| /jobs | GET | returns all jobs from the AdminP interface. |




## POST/PUT a new job
The methods PUT or POST allow to create a new job:


| URI | Method | Description |
|--------------|-------------|------------|
| / | POST, PUT | posts a new job to be processed by the AdminPServcie. The post data is expected in xml format |


The following curl example shows how to create a new job to update the Lucene fulltextindex.

curl --user admin:adminpassword -H "Content-Type: text/xml" -d \
'<document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/ XMLSchema"> \
<item name="type"><value xsi:type="xs:string">adminp</value></item> \
<item name="job"><value xsi:type="xs:string">REBUILD_LUCENE_INDEX</value></item> \
<item name="numblocksize"><value xsi:type="xs:int">1000</value></item> \
<item name="numindex"><value xsi:type="xs:int">0</value></item> \
<item name="numinterval"><value xsi:type="xs:int">1</value></item> \
</document>' \
http://localhost:8080/workflow/rest-service/adminp/jobs



In case the job is not createable the attribute '$error_code' will be returned in the response.


## DELETE a Document
The methods DELETE allow to remove a running or completed job:


| URI | Method | Description |
|--------------|-------------|------------|
| /{uniqueid} | DELETE | updates ore deletes a document |








2 changes: 1 addition & 1 deletion src/site/markdown/restapi/documentservice.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The methods PUT, POST and DELETE allow to create, modify and delete a document:
| URI | Method | Description |
|--------------|-------------|------------|
| / | POST, PUT | posts a document to be stored by the DocumentService. The post data can be x-www-form-urlencoded or in xml format |
| /{uniqueid} | POST, DELTE | updates ore deletes a document |
| /{uniqueid} | POST, DELETE | updates ore deletes a document |



Expand Down
2 changes: 2 additions & 0 deletions src/site/markdown/restapi/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ The different resources provided by Imixs-Workflow are divided in the following
| [/model/](./modelservice.html) | The Model resource provides resources and methods to get, create or modify a workflow model|
| [/report/](./reportservice.html) | The Report resource provides resources and methods to create or execute a report based on a report definition|
| [/documents/](./documentservice.html) | This resource provides methods to query documents managed by the DocumentService EJB |
| [/adminp/](./adminp.html) | This resource provides methods to create and monitor adminP jobs managed by the AdminPService EJB |


<strong>Note:</strong> The root context of the REST Service is defined by the web application (web.xml) containing the REST Service. The default root context is "/rest-service/".

Expand Down
1 change: 1 addition & 0 deletions src/site/site.xml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@
<item name="Document Service" href="./restapi/documentservice.html" />
<item name="JSON" href="./restapi/json.html" />
<item name="RestClient" href="./restapi/restclient.html" />
<item name="AdminP Service" href="./restapi/adminp.html" />
</item>


Expand Down

0 comments on commit 3c71d6a

Please sign in to comment.