Customfunc

Use this resource to request the details of a mapplet or to request a list of all mapplets in the organization. You can also use this resource to upload a PowerCenter mapplet, and to delete a mapplet.

GET Request

To request a list of all mapplets in the organization, use the following URI:

/api/v2/customFunc

To request the details of a single mapplet, you can use the mapplet ID or mapplet name in the request. Use one of the following URIs:

/api/v2/customFunc/<id>
/api/v2/customFunc/name/<name>

If you use the mapplet name and the mapplet name includes a space, replace the space with %20. For example:

/api/v2/customFunc/name/my%20mapplet

GET Response

If the request for a list of mapplets is successful, returns the customFunc object for every mapplet in the organization without the input, output, and connection details
If the request for the details of a single mapplet is successful, returns the customFunc object.
Returns the error object if errors occur.
The customFunc object includes the following attributes:

Field

Type

Description

id

String

Mapplet ID.

orgId

String

Organization ID.

name

String

Mapplet name.

description

String

Mapplet description.

createTime

Date/time

Time the mapplet was created.

updateTime

Date/time

Time the mapplet was last updated.

createdBy

String

User who created the mapplet.

updatedBy

String

User who last updated the mapplet.

mappletName

String

Name of the Mapplet transformation used in the mapplet.

active

Boolean

Whether the mapplet is active. Returns true or false.

mappletXmlFile

String

The mapplet XML file.

inputs

String

Input fields for the mapplet. Includes the following information for each field in the field object:
id
name
type
label
parentObject
precision
pcType
scale
columnIndex
isKey
isExternalId
isNullable
isUnique
isCreateable
isCalculated
isUpdateable
isFilterable
linkedFields
relatedInfos. Includes the following information in the fieldRelatedInfo object:
id
referenceObject
relationshipName
javaType
showLabel
naturalOrder
customProperties

outputs

String

Output fields for the mapplet. Includes the following information for each field in the field object:
id
name
type
label
parentObject
precision
pcType
scale
columnIndex
isKey
isExternalId
isNullable
isUnique
isCreateable
isCalculated
isUpdateable
isFilterable
linkedFields
relatedInfos. Includes the following information in the fieldRelatedInfo object:
id
referenceObject
relationshipName
javaType
showLabel
naturalOrder
customProperties

connections

Connection information for the mapplet. Includes a pcsConnection object for each connection.

id

Long

Included in the pcsConnection object.

name

String

Included in the pcsConnection object.
Connection nam

type

String

Included in the pcsConnection object.
Connection type

subtype

String

Included in the pcsConnection object.
Connection subtype.

description

String

Included in the pcsConnection object.
Description of the connection.

connectionId

String

Included in the pcsConnection object.
Connection ID.

POST Request

To update an existing mapplet, use the mapplet ID in the following URI. To upload a new PowerCenter mapplet, omit the optional ID parameter:

/api/v2/customFunc/<id>

Note....
Encode the request body as multipart/form-data.
With this URI, you can use the following attributes in the request body:

Field

Field

Required

Description

file

String

Yes

The Mapplet XML file exported from Informatica PowerCenter. File content should be in binary format, UTF-8 encoding.

name

String

Yes

The Mapplet name.

description

String

The Mapplet description.

In addition to the POST attributes, pass the following information in the request body:
Boundary value. Used to define different parts of the request body.
File name. Name of the mapplet XML file.
icSessionId. Informatica Intelligent Cloud Services session ID returned by the login resource. You can pass this information in the request body for clients that do not allow custom headers. If you can pass icSessionId as part of the request header, you can omit this information in the request body.
Use the following template for the customFunc POST request:

URL: <serverUrl>/api/v2/customFunc/ 
HTTP method: POST

Content-Type:multipart/form-data;boundary=<boundary value>
--<boundary value>
Content-Disposition:form-data; name="file";filename="<filename.XML>";Content-Type:text/<xml|json>

<content of the mapplet XML file encoded as UTF-8>

--<boundary value>
Content-Disposition: form-data; name="name" 

<mapplet name>
--<boundary value>
Content-Disposition: form-data; name="desc" 

<description of the mapplet>
--<boundary value>
Content-Disposition: form-data; name="icSessionId"

<icSessionID returned from login resource>
--<boundary value>--

POST Response

If successful, returns the customFunc response object for the mapplet that was created or updated.
Returns the error object if errors occur.

DELETE Request

To delete a mapplet, use the mapplet ID in the following URI:

/api/v2/customFunc/<id>

DELETE Response

Returns the 200 response code if the request is successful.
Returns the error object if errors occur.

POST Example

To update a mapplet with an ID of 3 with an icSessionId of IV4wOrJmd6YUtmKa8t, you might use the following request. The updated mapplet is named Lookup Mapplet and uses the lookup_mapplet.xml file. XML data should be encoded in UTF-8.

URL: https://example.informatica.com/saas/api/v2/customFunc/3 
HTTP method: POST

Content-Type:multipart/form-data;boundary=243553118520053
--243553118520053
Content-Disposition:form-data; name="file";filename="<lookup_mapplet.xml>";Content-Type:text/xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE POWERMART SYSTEM "powrmart.dtd">
<POWERMART CREATION_DATE="05/14/2012 12:17:26" REPOSITORY_VERSION="181.90">
<REPOSITORY NAME="pc91hf1" VERSION="181" CODEPAGE="UTF-8" DATABASETYPE="Oracle">
<FOLDER NAME="test" GROUP="" OWNER="Administrator" SHARED="SHARED" DESCRIPTION="" PERMISSIONS="rwx---r--" UUID="96f9d03b-c2c5-4034-8e3a-838026bbf6e8">
  <SOURCE BUSINESSNAME ="" DATABASETYPE ="Oracle" DBDNAME ="ddicst" DESCRIPTION ="" NAME ="CUSTOMERMASTER" OBJECTVERSION ="1" OWNERNAME ="C01" VERSIONNUMBER ="1">
    <SOURCEFIELD BUSINESSNAME ="" DATATYPE ="nvarchar2" DESCRIPTION ="" FIELDNUMBER ="1" FIELDPROPERTY ="0" FIELDTYPE ="ELEMITEM" HIDDEN ="NO" KEYTYPE ="PRIMARY KEY" LENGTH ="0" LEVEL ="0" NAME ="CUSTOMERID" NULLABLE ="NOTNULL" OCCURS ="0" OFFSET ="0" PHYSICALLENGTH ="30" PHYSICALOFFSET ="0" PICTURETEXT ="" PRECISION ="30" SCALE ="0" USAGE_FLAGS =""/>
.
.
.
 <ATTRIBUTE NAME ="Parameter Filename" VALUE =""/>
        <ATTRIBUTE NAME ="Write Backward Compatible Workflow Log File" VALUE ="NO"/>
        <ATTRIBUTE NAME ="Workflow Log File Name" VALUE ="wf_plugin_lookup.log"/>
        <ATTRIBUTE NAME ="Workflow Log File Directory" VALUE ="$PMWorkflowLogDir&#x5c;"/>
        <ATTRIBUTE NAME ="Save Workflow log by" VALUE ="By runs"/>
        <ATTRIBUTE NAME ="Save workflow log for these runs" VALUE ="0"/>
        <ATTRIBUTE NAME ="Service Name" VALUE =""/>
        <ATTRIBUTE NAME ="Service Timeout" VALUE ="0"/>
        <ATTRIBUTE NAME ="Is Service Visible" VALUE ="NO"/>
        <ATTRIBUTE NAME ="Is Service Protected" VALUE ="NO"/>
        <ATTRIBUTE NAME ="Fail task after wait time" VALUE ="0"/>
        <ATTRIBUTE NAME ="Enable HA recovery" VALUE ="NO"/>
        <ATTRIBUTE NAME ="Automatically recover terminated tasks" VALUE ="NO"/>
        <ATTRIBUTE NAME ="Service Level Name" VALUE ="Default"/>
        <ATTRIBUTE NAME ="Allow concurrent run with unique run instance name" VALUE ="NO"/>
        <ATTRIBUTE NAME ="Allow concurrent run with same run instance name" VALUE ="NO"/>
        <ATTRIBUTE NAME ="Maximum number of concurrent runs" VALUE ="0"/>
        <ATTRIBUTE NAME ="Assigned Web Services Hubs" VALUE =""/>
        <ATTRIBUTE NAME ="Maximum number of concurrent runs per Hub" VALUE ="1000"/>
        <ATTRIBUTE NAME ="Expected Service Time" VALUE ="1"/>
    </WORKFLOW>
</FOLDER>
</REPOSITORY>
</POWERMART>

--243553118520053
Content-Disposition: form-data; name="name" 

Lookup Mapplet
--243553118520053
Content-Disposition: form-data; name="icSessionId"

IV4wOrJmd6YUtmKa8t
--243553118520053--

A successful request returns the customFunc response object for the mapplet that you updated,