Create Resource REST API

Create Resource REST API

Use the Create Resource REST API to create an Informatica Managed File Transfer resource. This API uses the POST method.
Use the following URL for the REST API call:
POST http://<hostName>:<portNumber>/informaticamft/api/v1/resources
  • <hostName>
    is the host name or IP address of the Managed File Transfer server.
  • <portNumber>
    is the port number of the Managed File Transfer server. The default port for HTTP is 8000 and the default port for HTTPS is 8002, for example,
    http://myserver:8000
    or
    https://myserver:8002
    .
You can provide a request body in JSON to the REST API call. The following table describes the request body objects:
Object
Arguments
id
Specify the resource identification number.
type
Select the type of resource to create. The following options apply:
  • ftp
  • ftps
  • ssh
  • as2
  • http
  • https
  • smtp
  • mq
  • mailbox
name
Name of the resource.
description
Description of the resource.
resourceObject
Container element to encapsulate the resource properties.
resourceName
Name of the resource.
resourceDescription
Description of the resource.
primaryContactName
The name of the primary contact for the resource.
secondaryContactName
The name of the secondary contact for the resource.
primaryContactPhone
The phone number of the primary contact for the resource.
secondaryContactPhone
The phone number of the secondary contact for the resource.
primaryContactEmail
The email address of the primary contact for the resource.
secondaryContactEmail
The email address of the secondary contact for the resource.
host
The host name or IP address of the server.
port
The port number to use to connect to the server. If left blank, the default port number is 21.
user
The user name to use to connect to the server.
password
The password to use to connect to the server.
passwordIsEncrypted
Indicates whether or not the password is encrypted.
timeout
The number of seconds to wait when attempting to connect to the server. A timeout will occur if the connection cannot be established in the specified amount of time.
connectionRetryAttempts
The number of times to retry the connection if it cannot be established. This setting is used for both the initial connection and any reconnect attempts due to lost connections. If
connectionRetryInterval
The number of seconds to wait between each connection retry attempt.
initialRemoteDirectory
The initial directory to start in after connecting to the server.
controlEncoding
If left blank, Managed File Transfer uses the ISO standard ISO-8859-1. If supported by the server, other encodings like UTF-8 can be specified to support more international characters.
throttleBandwidth
Limit the inbound and outbound bandwidth used for file transfers.
proxyType
Managed File Transfer supports SOCKS (version 4 and 5), HTTP tunneling through an HTTP proxy and Managed File Transfer Gateway. HTTP tunneling requires that the HTTP proxy supports the CONNECT HTTP method. Not all HTTP proxy servers may support the CONNECT method and some might only allow HTTPS traffic. When using an HTTP proxy that requires authentication, Basic and Digest authentication schemes are supported. Check with the network administrator for the correct proxy type.
proxyHost
The host name or IP address of the proxy server.
alternateProxyHost
The host name or IP address of an alternate proxy server. The alternate proxy server is used when the primary proxy server is unavailable.
proxyPort
The port number to use for connecting to the proxy server.
proxyUser
The user name to use to connect to the proxy server.
proxyPassword
The password to use for connecting to the proxy server.
proxyPasswordIsEncrypted
Indicates whether or not the password is encrypted.
passive
Indicates whether or not the connection will use Passive or Active mode. Specify Yes to use Passive mode. Specify No to use Active mode.
listParser
The list parser to use for the server connection. If the field is left blank, Managed File Transfer will attempt to use the MLSD parser. If the MLSD parser is not supported by the server, the UNIX parser will be used.
dateFormat
This field is used if the date returned by the server is different than the selected list parser's default. If your location requires a different date format (for example, d MMM yyyy), specify the date format in this field. Not all list parsers support the date format setting. List parsers that do not support the Date Format setting will ignore any User specified values.
recentDateFormat
Specify the date format to use when parsing the recent last modified date for each file. The recent date format is primarily used on UNIX-based systems and appears on entries less than a year old. If your location requires a different recent date format (for example, d MMM HH:mm), specify that pattern in this field. Not all list parsers support the recent date format setting. List parsers that do not support the recent date format setting will ignore any User specified values.
dataConnectionStartPort
The starting port number to use for the data connection. This should be used when Active (non-Passive) mode is specified and there is a limited range of open ports on your firewall allowed for data connections.
dataConnectionEndPort
The ending port number to use for the data connection. This should be used when Active (non-Passive) mode is specified and there is a limited range of open ports on your firewall allowed for data connections.
type
Select the type of resource to create. The following options apply:
  • ftp
  • ftps
  • ssh
  • as2
  • http
  • https
  • smtp
  • mq
  • mailbox
resourceType
Select the type of resource to create. The following options apply:
  • ftp
  • ftps
  • ssh
  • as2
  • http
  • https
  • smtp
  • mq
  • mailbox

Request Body Example

The following code shows the request body syntax:
{ "id":-1, "type":"ftp", "name":"", "description":"", "resourceObject":{ "resourceName":"test", "resourceDescription":"Description", "primaryContactName":null, "secondaryContactName":null, "primaryContactPhone":null, "secondaryContactPhone":null, "primaryContactEmail":null, "secondaryContactEmail":null, "host":"localhost", "port":"21", "user":"Admin", "password":"Admij", "passwordIsEncrypted":null, "timeout":"20", "connectionRetryAttempts":"4", "connectionRetryInterval":"6", "initialRemoteDirectory":"C:/FTP", "controlEncoding":null, "throttleBandwidth":"true", "proxyType":"http", "proxyHost":"localhost", "alternateProxyHost":"altHost", "proxyPort":"15021", "proxyUser":"Admin", "proxyPassword":"Admin", "proxyPasswordIsEncrypted":null, "passive":"true", "listParser":"unix", "dateFormat":null, "recentDateFormat":null, "dataConnectionStartPort":"10000", "dataConnectionEndPort":"20000", "type":"ftp", "resourceType":"ftp" }, "createdBy":null, "createdOn":null, "modifiedBy":null, "modifiedOn":null }

Response Body Example

The following code shows a response:
{ "id":1348, "type":"ftp", "name":"test", "description":"Description", "resourceObject":{ "resourceName":"test2", "resourceDescription":"Description", "host":"localhost", "port":"21", "user":"Admin", "password":"lfyYJvYxNmQ=", "passwordIsEncrypted":"true", "timeout":"20", "connectionRetryAttempts":"4", "connectionRetryInterval":"6", "initialRemoteDirectory":"C:/FTP", "throttleBandwidth":"true", "proxyType":"http", "proxyHost":"localhost", "alternateProxyHost":"altHost", "proxyPort":"15021", "proxyUser":"Admin", "proxyPassword":"KwCSbW/Go+Y=", "proxyPasswordIsEncrypted":"true", "passive":"true", "listParser":"unix", "dataConnectionStartPort":"10000", "dataConnectionEndPort":"20000", "type":"ftp", "resourceType":"ftp" }, "createdBy":"sys", "javascriptEscapedName":"test" }

0 COMMENTS

We’d like to hear from you!