[Bps-public-commit] rt-extension-rest2 branch, master, updated. 1.03-4-g6d0a635

Craig Kaiser craig at bestpractical.com
Wed Mar 21 14:58:38 EDT 2018


The branch, master has been updated
       via  6d0a63516d42cff34826a38998dee84e6bb13c96 (commit)
      from  14f4fe32a38d5af4c7dc33b6aab4fc2bddd58c2b (commit)

Summary of changes:
 lib/RT/Extension/REST2.pm | 10 ++++++++++
 1 file changed, 10 insertions(+)

- Log -----------------------------------------------------------------
commit 6d0a63516d42cff34826a38998dee84e6bb13c96
Author: craig Kaiser <craig at bestpractical.com>
Date:   Wed Mar 21 14:57:09 2018 -0400

    Add Asset examples

diff --git a/lib/RT/Extension/REST2.pm b/lib/RT/Extension/REST2.pm
index e720a66..edee4fc 100644
--- a/lib/RT/Extension/REST2.pm
+++ b/lib/RT/Extension/REST2.pm
@@ -316,6 +316,16 @@ Below are some examples using the endpoints above.
         -d 'Testing a comment'
         'https://myrt.com/REST/2.0/ticket/6/comment'
 
+    # Create an Asset
+    curl -X POST -H "Content-Type: application/json" -u 'root:password'
+        -d '{"Name" : "Asset From Rest", "Catalog" : "General assets", "Content" : "Some content"}'
+        'https://myrt.com/REST/2.0/asset'
+
+    # Search Assets
+    curl -X POST -H "Content-Type: application/json" -u 'root:password'
+    -d '[{ "field" : "id", "operator" : ">=", "value" : 0 }]'
+    'https://myrt.com/REST/2.0/asset'
+
 =head3 Transactions
 
     GET /transactions?query=<JSON>

-----------------------------------------------------------------------


More information about the Bps-public-commit mailing list