This is an automated email from the ASF dual-hosted git repository.

bbende pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nifi-registry.git


The following commit(s) were added to refs/heads/master by this push:
     new 5fe6069  NIFIREG-268 Update user guide with upload/download bundle info
5fe6069 is described below

commit 5fe6069b9f6b1e34fa8e1d95d63753c82c048a3d
Author: Bryan Bende <[email protected]>
AuthorDate: Tue May 7 14:53:52 2019 -0400

    NIFIREG-268 Update user guide with upload/download bundle info
    
    This closes #184.
---
 .../src/main/asciidoc/user-guide.adoc              | 61 +++++++++++++++++++++-
 1 file changed, 59 insertions(+), 2 deletions(-)

diff --git 
a/nifi-registry-core/nifi-registry-docs/src/main/asciidoc/user-guide.adoc 
b/nifi-registry-core/nifi-registry-docs/src/main/asciidoc/user-guide.adoc
index e746e12..3ef551a 100644
--- a/nifi-registry-core/nifi-registry-docs/src/main/asciidoc/user-guide.adoc
+++ b/nifi-registry-core/nifi-registry-docs/src/main/asciidoc/user-guide.adoc
@@ -55,9 +55,11 @@ NOTE: The minimum recommended screen size is 1080px X 445px.
 
 *Flow*: A process group level NiFi dataflow that has been placed under version 
control and saved to the Registry.
 
-*Bucket*: A container that stores and organizes flows.
+*Bundle*: A binary artifact containing one or more extensions that can be run 
in NiFi or MiNiFi.
 
-*Policy*: Defines a user or group's ability to import, view, commit changes 
and/or delete flows.
+*Bucket*: A container that stores and organizes versioned items, such as flows 
and bundles.
+
+*Policy*: Defines a user or group's ability to perform a given action.
 
 
 [[User_Interface]]
@@ -363,3 +365,58 @@ image::remove_user_from_group.png["Remove User From Group"]
 === Other Group Level Actions
 
 Editing group names, deleting groups, adding policies to/deleting policies 
from groups and granting special privileges to groups follow similar procedures 
described earlier for corresponding user level actions.
+
+== Manage Bundles
+
+Bundles can be managed through the REST API.
+
+=== Upload Bundle
+
+A bundle can be uploaded to a bucket by making a `POST` request to the 
following REST end-point:
+
+  /nifi-registry-api/buckets/<bucketId>/bundles/<bundleType>
+
+Replace `bucketId` with the id of the bucket where the bundle is being 
uploaded to and `bundleType` with the type of bundle being uploaded. Currently, 
the only supported bundle type is a 
link:https://nifi.apache.org/docs/nifi-docs/html/developer-guide.html#nars[NiFi 
Archive (NAR)] which can be specified as `nifi-nar`.
+
+The `Content-Type` of the request is expected to be `multipart/form-data`. An 
example of using `curl` to upload `my-processors-1.0.0.nar` would be the 
following:
+
+  curl -v -F file=@/path/to/my-processors-1.0.0.nar 
http://localhost:18080/nifi-registry-api/buckets/de8e08c9-592d-4e10-affe-b3752698f1d9/bundles/nifi-nar
+
+NOTE: In order to upload a NAR to NiFi Registry, it must contain the file 
_META-INF/docs/extension-manifest.xml_ which is produced by the NAR Maven 
plugin, starting with version 1.3.0.
+
+=== Download Bundle
+
+There are two ways to download a bundle.
+
+==== Bundle Coordinates
+
+A bundle can be downloaded by using the combination of the bucket name and 
bundle coordinates, where bundle coordinates are the group, artifact, and 
version of the bundle.
+
+To download a bundle by its coordinates, a `GET` request can be made to the 
following end-point:
+
+  
/nifi-registry-api/extension-repository/{bucketName}/{groupId}/{artifactId}/{version}/content
+
+The `Content-Type` of the response is `application/octet-stream`.
+
+An example of using `curl` to download `my-processors-1.0.0.nar` from the 
`Test` bucket would be the following:
+
+  curl 
http://localhost:18080/nifi-registry-api/extension-repository/Test/com.test/my-processors/1.0.0/content
 > my-processors-1.0.0.nar
+
+
+==== Bundle Id
+
+A bundle can be downloaded by using the combination of its unique id and 
version. The unique id is an id assigned to the bundle when the first version 
of the bundle is uploaded to NiFi Registry. This id is returned in the response 
of a successful upload.
+
+To download a bundle by its id and version, a `GET` request can be made to the 
following end-point:
+
+  /nifi-registry-api/bundles/{bundleId}/versions/{version}/content
+
+The `Content-Type` of the response is `application/octet-stream`.
+
+An example of using `curl` to download `my-processors-1.0.0.nar` by id and 
version would be the following:
+
+  curl 
http://localhost:18080/nifi-registry-api/bundles/3db78035-e3ba-4cbf-820e-022f292bd68c/versions/1.0.0/content
 > my-processors-1.0.0.nar
+
+=== Additional Actions
+
+For additional actions that can be performed related to bundles, please 
consult the link:rest-api.html[REST API documentation].
\ No newline at end of file

Reply via email to