IBM Business Process Manager, Version 8.5.5

REST interface for BPD-related resources - Branch Snapshot List Resource - GET Method

Use this method to list the snapshots in a branch.

Sample method invocation

GET /rest/bpm/wle/v1/branch/{branchId}/snapshots[?namedSnapshot={boolean}][&numberOfSnapshots={integer}]

Parameters

Optional parameters
NameValue TypeDescription
namedSnapshot boolean
Specifies whether to list only the named snapshots. The default value is "false".
numberOfSnapshots integer
The number of snapshots that will be returned in the response. The default value is 200.

Request content

None

Response content

The list of snapshots in a branch.

The default content type is application/json.

MIME type: application/json


+ View schema
{
    "status":"200",
    "data":[
        {
            "snapshotId":{"type": "string", "description": "The ID of the snapshot."},
            "name":{"type": "string", "description": "The name of the snapshot."},
            "desc":{"type": "string", "description": "The description of the snapshot."},
            "createdBy_userId":{"type": "long", "description": "The ID of the user who created the snapshot."},
            "createdBy_userName":{"type": "long", "description": "The name of the user who created the snapshot."},
            "created_on":{"type": "long", "description": "The snapshot creation date, which is a long value that the client needs to format based on the time zone."},
        }
    ]
}
+ View example content
{
    "status":"200",
    "data":[{
            "snapshotId":"2064.d580b28b-b701-4f1b-b28f-86050efa2a4e",
            "createdBy_userId":1,
            "createdBy_userName":"Internal TW Admin user",
            "created_on":1316530524083
        },
        {
            "snapshotId":"2064.8c126c7c-e4f0-485c-bac5-0902b03a3d3e",
            "createdBy_userId":1,
            "createdBy_userName":"Internal TW Admin user",
            "created_on":1316529840907
        },
        {
            "snapshotId":"2064.5168137e-9885-496b-8664-6e7bdf74ed5c",
            "createdBy_userId":1,
            "createdBy_userName":"Internal TW Admin user",
            "created_on":1316529782297
        },
        {
            "snapshotId":"2064.1ee298d5-21d7-4459-b3b5-b7ea8784bfce",
            "name":"v1",
            "desc":"",
            "createdBy_userId":1,
            "createdBy_userName":"Internal TW Admin user",
            "created_on":1316528921323
        },
        {
            "snapshotId":"2064.fd5aa495-8912-4933-85f8-3e0c749783da",
            "createdBy_userId":1,
            "createdBy_userName":"Internal TW Admin user",
            "created_on":1316528920932
        },
        {
            "snapshotId":"2064.4301c744-80c8-49ba-a3e8-ab5a30027eec",
            "createdBy_userId":1,
            "createdBy_userName":"Internal TW Admin user",
            "created_on":1316528434023
        },
        {
            "snapshotId":"2064.9ef0861b-0eed-4321-afac-6f112bbf2306",
            "createdBy_userId":1,
            "createdBy_userName":"Internal TW Admin user",
            "created_on":1316528371007
        },
        {
            "snapshotId":"2064.4a5c328a-82d1-40ad-878c-0df05b239278",
            "createdBy_userId":1,
            "createdBy_userName":"Internal TW Admin user",
            "created_on":1316528357054
        },
        {
            "snapshotId":"2064.30c63e29-aacd-4b3b-803f-a09ce65486d2",
            "name":"Hiring Sample 3",
            "desc":"Hiring Sample for IBM BPM Standard",
            "createdBy_userId":1,
            "createdBy_userName":"Internal TW Admin user",
            "created_on":1316468384722
        }
    ]
}

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>

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

7.5.1

Parent Topic: Branch Snapshot List Resource