Ana içeriğe atla

General Information

Connection Type

ftp

UI Documentation

📖 For detailed information: [UI Documentation Link - Link will be added here]

Endpoints

List Connections

GET /apiops/projects/{projectName}/connections/?type=ftp

Get Connection

GET /apiops/projects/{projectName}/connections/{connectionName}/

Create Connection

POST /apiops/projects/{projectName}/connections/{connectionName}/

Update Connection

PUT /apiops/projects/{projectName}/connections/{connectionName}/

Delete Connection

DELETE /apiops/projects/{projectName}/connections/{connectionName}/

List Connections

Endpoint

GET /apiops/projects/{projectName}/connections/?type=ftp

Request

Headers

HeaderValue
AuthorizationBearer

Path Parameters

ParameterTypeRequiredDescription
projectNamestringYesProject name
Note: The type query parameter is required to filter connections by type.

cURL Example

curl -X GET \
  "https://demo.apinizer.com/apiops/projects/MyProject/connections/" \
  -H "Authorization: Bearer YOUR_TOKEN"

Get Connection

Endpoint

GET /apiops/projects/{projectName}/connections/{connectionName}/

Request

Headers

HeaderValue
AuthorizationBearer

Path Parameters

ParameterTypeRequiredDescription
projectNamestringYesProject name
connectionNamestringYesConnection name

Response

Success Response (200 OK)

{
  "success": true,
  "resultList": [
    {
      "type": "ftp",
      "name": "my-ftp-connection",
      "description": "FTP connection for file transfer",
      "deployToWorker": true,
      "enabled": true,
      "host": "ftp.example.com",
      "port": 21,
      "username": "ftpuser",
      "password": null,
      "workingDir": "/uploads",
      "protocol": "FTP",
      "timeout": 30000,
      "retryCount": 3,
      "useImplicit": false,
      "useExplicit": false,
      "sslProtocol": null
    }
  ],
  "resultCount": 1
}
Note: Password is masked in get operations.

cURL Example

curl -X GET \
  "https://demo.apinizer.com/apiops/projects/MyProject/connections/my-ftp-connection/" \
  -H "Authorization: Bearer YOUR_TOKEN"

Create Connection

Endpoint

POST /apiops/projects/{projectName}/connections/{connectionName}/

Request

Headers

HeaderValue
AuthorizationBearer
Content-Typeapplication/json

Path Parameters

ParameterTypeRequiredDescription
projectNamestringYesProject name
connectionNamestringYesConnection name

Request Body

Full JSON Body Example - FTP
{
  "type": "ftp",
  "name": "my-ftp-connection",
  "description": "FTP connection for file transfer",
  "deployToWorker": true,
  "enabled": true,
  "host": "ftp.example.com",
  "port": 21,
  "username": "ftpuser",
  "password": "ftppassword",
  "workingDir": "/uploads",
  "protocol": "FTP",
  "timeout": 30000,
  "retryCount": 3,
  "useImplicit": false,
  "useExplicit": false,
  "sslProtocol": null
}
Full JSON Body Example - SFTP
{
  "type": "ftp",
  "name": "my-sftp-connection",
  "description": "SFTP connection for secure file transfer",
  "deployToWorker": true,
  "enabled": true,
  "host": "sftp.example.com",
  "port": 22,
  "username": "sftpuser",
  "password": "sftppassword",
  "workingDir": "/uploads",
  "protocol": "SFTP",
  "timeout": 30000,
  "retryCount": 3,
  "useImplicit": false,
  "useExplicit": false,
  "sslProtocol": null
}
Full JSON Body Example - FTPS (Implicit)
{
  "type": "ftp",
  "name": "my-ftps-implicit-connection",
  "description": "FTPS connection with implicit SSL",
  "deployToWorker": true,
  "enabled": true,
  "host": "ftps.example.com",
  "port": 990,
  "username": "ftpsuser",
  "password": "ftpspassword",
  "workingDir": "/uploads",
  "protocol": "FTPS",
  "timeout": 30000,
  "retryCount": 3,
  "useImplicit": true,
  "useExplicit": false,
  "sslProtocol": "TLS"
}
Full JSON Body Example - FTPS (Explicit)
{
  "type": "ftp",
  "name": "my-ftps-explicit-connection",
  "description": "FTPS connection with explicit SSL",
  "deployToWorker": true,
  "enabled": true,
  "host": "ftps.example.com",
  "port": 21,
  "username": "ftpsuser",
  "password": "ftpspassword",
  "workingDir": "/uploads",
  "protocol": "FTPS",
  "timeout": 30000,
  "retryCount": 3,
  "useImplicit": false,
  "useExplicit": true,
  "sslProtocol": "TLS"
}
Request Body Fields
Common Fields
FieldTypeRequiredDefaultDescription
typestringYes-Connection type discriminator field. Identifies the connection type in API requests/responses.
namestringYes-Connection name (must match path parameter)
descriptionstringNo-Connection description
deployToWorkerbooleanNotrueWhether to deploy to worker
enabledbooleanNotrueWhether connection is enabled
FTP-Specific Fields
FieldTypeRequiredDefaultDescription
hoststringYes-FTP server hostname or IP address
portintegerNo21FTP server port (21 for FTP/FTPS, 22 for SFTP, 990 for FTPS implicit)
usernamestringYes-FTP username
passwordstringYes-FTP password (secret field)
workingDirstringNo/Working directory path
protocolstringYes-FTP protocol type. See EnumFtpProtocol
timeoutintegerNo30000Connection timeout in milliseconds
retryCountintegerNo3Number of retry attempts on failure
useImplicitbooleanNofalseUse implicit SSL/TLS (for FTPS only)
useExplicitbooleanNofalseUse explicit SSL/TLS (for FTPS only)
sslProtocolstringNonullSSL protocol version (e.g., “TLS”, “SSL”, “TLSv1.2”)

EnumFtpProtocol

  • FTP - Standard FTP protocol (port 21)
  • SFTP - SSH File Transfer Protocol (port 22)
  • FTPS - FTP over SSL/TLS (port 21 for explicit, 990 for implicit)

Note

  • host, username, and password are required.
  • protocol is required.
  • For FTPS, either useImplicit: true or useExplicit: true must be set.
  • useImplicit and useExplicit are mutually exclusive.
  • Default ports: 21 (FTP/FTPS explicit), 22 (SFTP), 990 (FTPS implicit).

Response

Success Response (200 OK)

{
  "success": true,
  "deploymentResult": {
    "success": true,
    "deploymentResults": [
      {
        "environmentName": "production",
        "success": true,
        "message": "Deployment successful"
      }
    ]
  }
}

cURL Example

curl -X POST \
  "https://demo.apinizer.com/apiops/projects/MyProject/connections/my-ftp-connection/" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "ftp",
    "name": "my-ftp-connection",
    "description": "FTP connection for file transfer",
    "deployToWorker": true,
    "enabled": true,
    "host": "ftp.example.com",
    "port": 21,
    "username": "ftpuser",
    "password": "ftppassword",
    "workingDir": "/uploads",
    "protocol": "FTP",
    "timeout": 30000,
    "retryCount": 3
  }'

Update Connection

Endpoint

PUT /apiops/projects/{projectName}/connections/{connectionName}/

Request

Headers

HeaderValue
AuthorizationBearer
Content-Typeapplication/json

Path Parameters

ParameterTypeRequiredDescription
projectNamestringYesProject name
connectionNamestringYesConnection name (must match name in body)

Request Body

Full JSON Body Example
{
  "type": "ftp",
  "name": "my-ftp-connection",
  "description": "Updated FTP connection for file transfer",
  "deployToWorker": true,
  "enabled": true,
  "host": "ftp.newserver.com",
  "port": 21,
  "username": "newftp",
  "password": "newpassword123",
  "workingDir": "/new-uploads",
  "protocol": "FTPS",
  "timeout": 60000,
  "retryCount": 5,
  "useImplicit": false,
  "useExplicit": true,
  "sslProtocol": "TLSv1.2"
}
Note: Request body structure is the same as Create Connection. All fields should be provided for update.

Response

Success Response (200 OK)

{
  "success": true,
  "deploymentResult": {
    "success": true,
    "deploymentResults": [...]
  }
}

Delete Connection

Endpoint

DELETE /apiops/projects/{projectName}/connections/{connectionName}/

Request

Headers

HeaderValue
AuthorizationBearer

Path Parameters

ParameterTypeRequiredDescription
projectNamestringYesProject name
connectionNamestringYesConnection name

Response

Success Response (200 OK)

{
  "success": true,
  "deploymentResult": {
    "success": true,
    "deploymentResults": [...]
  }
}

Notes and Warnings

  • FTP Protocols:
    • FTP - Standard FTP (not encrypted, not recommended for production)
    • SFTP - SSH File Transfer Protocol (encrypted, recommended)
    • FTPS - FTP over SSL/TLS (encrypted, recommended)
  • Ports:
    • FTP: 21 (default)
    • SFTP: 22 (default)
    • FTPS explicit: 21 (default)
    • FTPS implicit: 990 (default)
  • SSL/TLS:
    • useImplicit: true - SSL/TLS connection from start (port 990)
    • useExplicit: true - SSL/TLS connection after AUTH command (port 21)
    • useImplicit and useExplicit are mutually exclusive
    • sslProtocol specifies protocol version (TLS, SSL, TLSv1.2, etc.)
  • Working Directory:
    • workingDir specifies the default directory for file operations
    • Defaults to ”/” (root directory)
    • Can be absolute or relative path
  • Timeout and Retry:
    • timeout - Connection timeout in milliseconds
    • retryCount - Number of retry attempts on failure
    • Recommended timeout: 30000ms (30 seconds)
  • Security:
    • Use SFTP or FTPS in production (not plain FTP)
    • Use strong passwords
    • Consider using key-based authentication for SFTP
  • Performance:
    • Timeout settings affect connection behavior
    • Retry count helps with transient failures
  • Deployment: Connection changes require deployment to take effect. Set deployToWorker: true or deploy manually.