IBM Business Process Manager, Version 8.5.5

REST interface for BPD-related resources - Assets Copy Resource - POST Method

Use this method to copy assets from a snapshot to a track tip using the process documentation tools.

Sample method invocation

POST /rest/bpm/wle/v1/assets/copy?srcSnapshotId={string}&destBranchId={string}

Parameters

Required parameters
NameValue TypeDescription
srcSnapshotId string
The ID of the snapshot associated with the copy source.
destBranchId string
The ID of the branch associated with the destination track tip.

Request content

IDs of the assets that will be coped.

The default content type is application/json.

MIME type: application/json


+ View schema
{
    "ids":[
         {"type": "string", "description": "The id of the persistence object that will be copied."}
     ]
}
+ View example content
{
    "ids":[
         "25.1c7fd167-71ad-4bf9-8c47-cea0e7de644f",
         "1.890e4958-9afd-4679-9e9b-eaf9e5947082"
     ]
}

MIME type: application/xml


+ View schema
<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="http://rest.bpm.ibm.com/v1/data/assets"
	elementFormDefault="unqualified"
	xmlns="http://www.w3.org/2001/XMLSchema"
	xmlns:tns="http://rest.bpm.ibm.com/v1/data/assets"
	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="Asset">
		<complexContent>
		    <extension base="pref:NamedElement">        
		        <sequence>
					<element name="description" type="string" />
					<element name="richDescription" type="string" />
					<element name="poId" type="string" />
					<element name="poVersionId" type="string" />
					<element name="last_modified_by_userId" type="long" />
					<element name="last_modified_by_userName" type="string" />
					<element name="last_modified" type="long" />
					<element name="tags" type="string" maxOccurs="unbounded" />
					<element name="fullDepIds" type="string" maxOccurs="unbounded" />
					<element name="dependencies" type="tns:tDependency" maxOccurs="unbounded" />
					<element name="status" type="tns:tPOVersionStatus" />
					<element name="poType" type="string" />
					<element name="existsInTarget" type="boolean" />
					<element name="sameVersionId" type="boolean" />
					<element name="hasBrokenDep" type="boolean" />
					<element name="isNewerVersion" type="boolean" >
						<annotation>
							<documentation>Only applies when the status is "Updated"</documentation>
						</annotation></element>
					<element name="shared" type="boolean" >
                        <annotation>
                            <documentation>Only applies when the poType is "VariableType"</documentation>
                        </annotation></element>
                    <element name="eventType" type="tns:tEventType" >
                        <annotation>
                            <documentation>Only applies when the poType is "UCA"</documentation>
                        </annotation></element>
						
				</sequence>
		    </extension>
		</complexContent>		
	</complexType>
	
	<complexType name="tDependency">
        <sequence>
			<element name="poId" type="string" />
			<element name="name" type="string" />
			<element name="poType" type="string" />
			<element name="status" type="tns:tPOVersionStatus" />
			<element name="isNewerVersion" type="boolean" >
				<annotation>
					<documentation>Only applies when the status is "Updated"</documentation>
				</annotation></element>
			<element name="isBrokenDep" type="boolean" />
			<element name="isExternal" type="boolean" />
		</sequence>
	</complexType>	
	
	<simpleType name="tPOVersionStatus">
        <restriction base="string">
			<enumeration value="NoChange"/>
			<enumeration value="Conflict"/>
			<enumeration value="Updated"/>
			<enumeration value="New"/>
		</restriction>
	</simpleType>

	<complexType name="tAssetIDList">
        <sequence>
			<element name="ids" type="string" maxOccurs="unbounded" minOccurs="1"/>
		</sequence>
	</complexType>
	
	<simpleType name="tEventType">
        <restriction base="string">
			<enumeration value="Message" />
			<enumeration value="Content" />
			<enumeration value="Timer" />
		</restriction>
	</simpleType>	
		            
</schema>

Response content

The new snapshot id created as part of copy action.

The default content type is application/json.

MIME type: application/json


+ View schema
{
    "status":"200",
    "data":{
    			"newSnapshotId": {"type": "string", "description": "The id of the new snapshot created in the destination after copy."}
    }
}
+ View example content
{
    "status":"200",
    "data":{
        "newSnapshotId":"2064.0adf8d41-430f-4695-8ce3-f059c998786b"
    }
}

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.
415 Unsupported Media TypeThe content type or content encoding of the request is not supported.
500 Internal Server ErrorA severe problem has occurred, programmer's details are provided.

Available since

8.0.0

Parent Topic: Assets Copy Resource