IBM Business Process Manager, Version 8.5.5

REST interface for BPD-related resources - Project Branches List Resource - GET Method

Use this method to list the branches in a project.

Sample method invocation

GET /rest/bpm/wle/v1/project/{projectId}/branches

Parameters

None

Request content

None

Response content

The list of branches in the project.

The default content type is application/json.

MIME type: application/json


+ View schema
{
    "status":"200",
    "data":
    {
    	"branches":
    	[
    	   {
    	       "branchId":{"type": "string", "description": "The ID of the branch."},
               "name":{"type": "string", "description": "The name of the branch."},
          }
       ]
   }
}
+ View example content
{
	"status":"200",
	"data":{
			"branches":[
				{
					"branchId":"2063.6203723f-cc8e-4351-953b-9cbb3cd8432b",
					"name":"Main"
				},
				{
					"branchId":"2063.9d9fa202-8cce-4a77-937a-ae26c4fbb46e",
					"name":"Track alt1"
				},
				{
					"branchId":"2063.1d269f2a-dcc5-4bec-ad70-2a469384e126",
					"name":"Track alt2"
				}
			]
		}
}

MIME type: application/xml


+ View schema
<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="http://rest.bpm.ibm.com/v1/data/snapshot"
	elementFormDefault="unqualified"
	xmlns="http://www.w3.org/2001/XMLSchema"
	xmlns:tns="http://rest.bpm.ibm.com/v1/data/snapshot"
	xmlns:pref="http://rest.bpm.ibm.com/v1/data/root"
	xmlns:cmn="http://rest.bpm.ibm.com/v1/data/common">

    <import schemaLocation="Common.xsd" namespace="http://rest.bpm.ibm.com/v1/data/common"/>
    <import schemaLocation="BPMRestData.xsd" namespace="http://rest.bpm.ibm.com/v1/data/root"/>

    <complexType name="SnapshotType">
		<complexContent>
		    <extension base="pref:Data">
				<sequence>
				    <element name="snapshotId" type="string"/>
				    <element name="seq_num" type="decimal"/>
				    <element name="name" type="string"/>
				    <element name="desc" type="string"/>
				    <element name="richDesc" type="string"/>
				    <element name="createdBy_userId" type="long"/>
				    <element name="createdBy_userName" type="string"/>
				    <element name="created_on" type="long"/>
				</sequence>
		    </extension>
		</complexContent>
    </complexType>
    
    <complexType name="tBranchSnapshots">
		<complexContent>
		    <extension base="pref:Data">
				<sequence>
				    <element name="branchId" type="string"/>
				    <element name="name" type="string"/>
				    <element name="snapshots" type="tns:SnapshotType" maxOccurs="unbounded"/>
				</sequence>
		    </extension>
		</complexContent>
    </complexType>
    
    <complexType name="tProjectSnapshots">
		<complexContent>
		    <extension base="pref:Data">
				<sequence>
				    <element name="branches" type="tns:tBranchSnapshots"  maxOccurs="unbounded"/>
				</sequence>
		    </extension>
		</complexContent>
    </complexType>
    
    <complexType name="tBranch">
		<complexContent>
		    <extension base="pref:Data">
				<sequence>
				    <element name="branchId" type="string"/>
				    <element name="name" type="string"/>
				</sequence>
		    </extension>
		</complexContent>
    </complexType>
          
    
    <complexType name="tProjectBranches">
		<complexContent>
		    <extension base="pref:Data">
				<sequence>
				    <element name="branches" type="tns:tBranch"  maxOccurs="unbounded"/>
				</sequence>
		    </extension>
		</complexContent>
    </complexType>
            
	<complexType name="POHistory">
        <annotation>
        	<documentation>poName attribute will be set to the latest one in all changes. </documentation>
        </annotation>
		<complexContent>
		    <extension base="pref:NamedElement">        
		        <sequence>
					<element name="poId" type="string" />
					<element name="poSubType" type="string" />
					<element name="changes" type="tns:ChangeItem"
						maxOccurs="unbounded" />
				</sequence>
		    </extension>
		</complexContent>		
	</complexType>

	<complexType name="ChangeItem">
        <annotation>
        	<documentation>branchId will be only set when compare two branches. poName will be set if it is not same as the latest one.</documentation>
        </annotation>
		<complexContent>
		    <extension base="pref:NamedElement">        
		        <sequence>
				    <element name="modified_on" type="long"/>
				    <element name="userName" type="string"/>
				    <element name="actionType" type="string"/>		
				</sequence>
				<attribute name="branchId" type="string" use="optional" />
				<attribute name="branchName" type="string" use="optional" />
				<attribute name="branchAcronym" type="string" use="optional" />
		    </extension>
		</complexContent>		
    </complexType>     
    
    <complexType name="tSnapshotDelta">
		<complexContent>
		    <extension base="pref:Data">
				<sequence>
				    <element name="snapshotIds" type="string" maxOccurs="2" minOccurs="1"/>
				    <element name="baseSnapshotId" type="string"/>
				    <element name="histories" type="cmn:Map"/>				    
				</sequence>
		    </extension>
		</complexContent>
    </complexType>           
                
</schema>
+ View example content
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<bpm:ResponseData xmlns:bpm="http://rest.bpm.ibm.com/v1/data"
	xmlns:ex="http://rest.bpm.ibm.com/v1/data/exception">
	<status>200</status>
	<data xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
		xmlns:snap="http://rest.bpm.ibm.com/v1/data/snapshot" xsi:type="snap:tProjectBranches">
		<branches>
			<branchId>2063.6203723f-cc8e-4351-953b-9cbb3cd8432b</branchId>
			<name>Main</name>
		</branches>
		<branches>
			<branchId>2063.9d9fa202-8cce-4a77-937a-ae26c4fbb46e</branchId>
			<name>Track alt1</name>
		</branches>
		<branches>
			<branchId>2063.1d269f2a-dcc5-4bec-ad70-2a469384e126</branchId>
			<name>Track alt2</name>
		</branches>
	</data>
</bpm:ResponseData>

Error Response content

Detailed error information.

The default content type is application/json.

MIME type: application/json


+ View schema
{  "description": "WLE Error Response", 
   "type": "object",
   "properties":
   {  "status": {"type": "string",
         "description": "The status of the previous API call."
      },
      "exceptionType": {"type": "string",
         "description": "The classname associated with the exception."
      },
      "errorNumber": {"type": "string",
         "description": "Message ID of the exception."
      },
      "errorMessage": {"type": "string",
         "description": "Message text of the exception."
      },
      "errorMessageParameters": {"type": ["string"], "optional": true,
         "description":"Message text parameters of the exception."
      },
      "programmersDetails": {"type": "object", "optional": true,
         "description":"Additional exception details, for example, a stack trace."
      }
   }
} 

Status codes

The method returns one of the following status codes:
CodeDescription
200 OKSuccess completion.
400 Bad RequestThe parameters are not valid or they are missing.
401 UnauthorizedThe caller is not authorized for this request.
406 Not AcceptableThe requested content type or content encoding is not supported.
500 Internal Server ErrorA severe problem has occurred, programmer's details are provided.

Available since

8.0.0

Parent Topic: Project Branches List Resource