• No results found

Use this resource to request the details of a plug-in or to request a list of all plug-ins in the organization. You can also use this resource to create or update a plug-in, and to delete a plug-in.

GET Request

To request the details of a single plug-in, use the plug-in ID in the following URI. To request a list of all plug-ins in the organization, omit the optional plug-in ID.

/api/v2/customFunc/<id>

GET Response

If the request for a list of plug-ins is successful, returns the customFunc object for every plug-in in the organization without the input, output, and connection details.

If the request for the details of a single plug-in is successful, returns the customFunc object. Returns the error object if errors occur.

The customFunc object includes the following attributes:

customFunc Object Response Attribute Description

id Plug-in ID.

orgId Organization ID.

name Plug-in name.

description Plug-in description. createTime Time the plug-in was created. updateTime Time the plug-in was last updated. createdBy User who created the plug-in. updatedBy User who last updated the plug-in.

customFunc Object Response Attribute Description

active Whether the plug-in is active: - true. The plug-in is active. - false. The plug-in is passive. mappletXmlFile The plug-in XML file.

inputs Input fields for the plug-in. Includes the following information in for each field in the fields object:

- id - name - type - uniqueName - label - parentObject - precision - scale - columnIndex - isKey - isExternalId - isNullable - isUnique - isCreateable - isUpdateable - isFilterable

- relatedInfos. Includes the following information in the fieldRelatedInfo object:

- referenceObject - relationshipName

customFunc Object Response Attribute Description

outputs Output fields for the plug-in. Includes the following information in for each field in the fields object:

- id - name - type - uniqueName - label - parentObject - precision - scale - columnIndex - isKey - isExternalId - isNullable - isUnique - isCreateable - isUpdateable - isFilterable

- relatedInfos. Includes the following information in the fieldRelatedInfo object:

- referenceObject - relationshipName

connections Connection information for the plug-in. Includes the following attributes in the pcsConnection object for each connection: - id - name - type - subtype - description - connectionId

POST Request

To update an existing plug-in, use the plug-in ID in the following URI. To create a new plug-in, 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:

customFunc Object Request Attribute

Required/ Optional

Description

file Required Plug-in XML file.

File content should be in binary format, UTF-8 encoding.

name Required Plug-in name.

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 plug-in XML file.

¨ icSessionId. Informatica Cloud 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 plug-in/mapplet XML file encoded as UTF-8>

--<boundary value>

Content-Disposition: form-data; name="name" <plug-in name>

--<boundary value>

Content-Disposition: form-data; name="desc" <description of the plug-in>

--<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 plug-in that was created or updated. Returns the error object if errors occur.

DELETE Request

To delete a plug-in, use the plug-in ID in the following URI:

/api/v2/customFunc/<id>

DELETE Response

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

POST Example

To update a plug-in with an ID of 3 with an icSessionId of IV4wOrJmd6YUtmKa8t, you might use the following request. The updated plug-in is named Lookup Plug-in and uses the lookup_plug-in.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_plug-in.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 Plug-in

--243553118520053

Content-Disposition: form-data; name="icSessionId" IV4wOrJmd6YUtmKa8t

--243553118520053--

A successful request returns the customFunc response object for the plug-in that you updated,