Table of Contents

Search

  1. Preface
  2. RulePoint Interfaces
  3. RulePoint Services
  4. Custom Service API
  5. Java Adapter for REST API
  6. RulePoint REST API
  7. Sample XML and JSON Requests and Responses
  8. RulePoint Pluggable Authentication Module
  9. HTTP Request and Response Attributes

Developer Guide

Developer Guide

Create Projects

Create Projects

Use the POST method to create a project in RulePoint.

POST Request in JSON Format

Generate a POST request. For example, the following POST request creates a project:
POST http://localhost:8080/rulepoint/api/projects Accept: application/json Content-Type: application/json Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in JSON Format

{ "name": "TestProject1", "description": "Test Project" }

POST Response in JSON Format

Returns the project object and response code 201 created. Returns the error object if an error occurs.
{ "id": "2", "name": "TestProject1", "valid": false, "self": { "rel": "self", "href": "api/projects/2" }, "actions": [ { "rel": "update", "href": "/api/projects/2", "type": "PUT" }, { "rel": "delete", "href": "/api/projects/2", "type": "DELETE" }, { "rel": "deploy", "href": "/api/projects/2/deploy", "type": "POST" }, { "rel": "undeploy", "href": "/api/projects/2/undeploy", "type": "POST" } ], "acl": { "rel": "acl", "href": "api/projects/2/acl", "title": "acl" }, "description": "Test Project" }
Response Code : 201 Created

POST Request in XML Format

Generate a POST request. For example, the following POST request creates a project:
POST http://localhost:8080/rulepoint/api/projects Accept: application/xml Content-Type: application/xml Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in XML Format

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <project> <name>TestProject1</name> <description>Test Project</description> </project>

POST Response in XML Format

Returns the project object and response code 200 OK. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <project> <acl> <href>api/projects/144/acl</href> <rel>acl</rel> <title>acl</title> </acl> <actions> <action> <href>/api/projects/144</href> <rel>update</rel> <type>PUT</type> </action> <action> <href>/api/projects/144</href> <rel>delete</rel> <type>DELETE</type> </action> <action> <href>/api/projects/144/deploy</href> <rel>deploy</rel> <type>POST</type> </action> <action> <href>/api/projects/144/undeploy</href> <rel>undeploy</rel> <type>POST</type> </action> </actions> <id>144</id> <name>TestProject1</name> <self> <href>api/projects/144</href> <rel>self</rel> </self> <description>Test Project</description> </project>
Response Code : 201 Created

0 COMMENTS

We’d like to hear from you!