Create a new mainframe file or directory - Precisely Data Integrity Suite

Data Integrity Suite APIs

Product
Data_Integrity
Spatial_Analytics
Data_Enrichment
geo_addressing_1
Services
Spatial Analytics
Data Enrichment
Geo Addressing
ft:title
Data Integrity Suite APIs
ft:locale
en-US
PublicationType
pt_developer
copyrightfirst
2023
copyrightlast
2026

Creates a new mainframe file or directory in the specified pipeline with the provided content and application type.

HTML

POST https://hostname/v1/integration/mainframe/projects/{projectId}/pipelines/{pipelineId}/files

Process overview

  1. Request Validation—Validates directory path, file/folder name, content, and application type
  2. File or Directory Creation—Creates the file with specified content, or creates a directory if directory=true

Directory creation

  • Request directory creation by setting directory=true in the request body. When creating a directory, fileContent must be null.
  • Provide the directory structure in the path field (for example, /path/to) and the folder name in the name field.
  • Use "/" for root directory path.

File creation

  • Provide the directory path in the path field and the filename (with extension) in the name field.
  • Upload the file content via the multipart fileContent field.

Required permissions

replication-pipeline::manage

Request

Path parameters

Key Required Type Description
projectId Yes string

Unique identifier of the project.

pipelineId Yes string

Unique identifier of the pipeline.

Request body properties

Property Required Type Description
path Yes string Directory path where the file or folder will be created (for example, /path/to). Use "/" for root.
name Yes string Name of the file or folder to create (for example, file.txt or folder).
fileContent Yes string File content as multipart binary. This property can be null when directory is true.
fileApplicationType No string

Type of application for which the file is used.

File application types:

  • ENGINE_SCRIPT—Script files for execution engine
  • CONFIGURATION—Configuration files
directory No boolean Set this property to true to create a directory instead of a regular file. The default value is false.

When true, fileContent may be null.

Request body example

{
  "path": "/scripts",
  "name": "example_script.sh",
  "fileContent": "<binary file content>",
  "fileApplicationType": "ENGINE_SCRIPT",
  "directory": false
}

Response

Header keys

Key Required Type Description
Location No string

URI of the newly created file or directory.

Example: /v1/integration/mainframe/projects/project-123/pipelines/pipeline-456/files/file-789

Response body examples

Example status code responses for this method are shown here. To view the response schemas, you can download the Data Integration API specification (Precisely Integration Adapter Service) from the Precisely Developer Portal.

Examples
{
  "type": "https://datatracker.ietf.org/doc/html/rfc9110#section-15.5.1",
  "title": "Bad Request",
  "status": 400,
  "detail": "Validation error occurred",
  "instance": "/v1/integration/mainframe/pipelines",
  "properties": {
    "errorCode": "DI-ADAPTER-VAL-0000"
  }
}
{
  "type": "https://datatracker.ietf.org/doc/html/rfc9110#section-15.5.2",
  "title": "Unauthorized",
  "status": 401,
  "detail": "Authorization failed - missing or invalid credentials",
  "instance": "/v1/integration/mainframe/pipelines",
  "properties": {
    "errorCode": "DI-ADAPTER-AUT-0001"
  }
}
{
  "type": "https://datatracker.ietf.org/doc/html/rfc9110#section-15.5.4",
  "title": "Forbidden",
  "status": 403,
  "detail": "Authorization failed - insufficient permissions",
  "instance": "/v1/integration/mainframe/projects/{projectId}/pipelines/{pipelineId}/files",
  "properties": {
    "errorCode": "DI-ADAPTER-AUT-0002"
  }
}
{
  "type": "https://datatracker.ietf.org/doc/html/rfc9110#section-15.5.5",
  "title": "Not Found",
  "status": 404,
  "detail": "Not Found - Resource does not exist",
  "instance": "/v1/integration/mainframe/projects/{projectId}/pipelines/{pipelineId}/files",
  "properties": {
    "errorCode": "DI-ADAPTER-DFL-0007"
  }
}
{
  "type": "https://datatracker.ietf.org/doc/html/rfc9110#section-15.6",
  "title": "Internal Server Error",
  "status": 500,
  "detail": "An unexpected error occurred",
  "instance": "/v1/integration/mainframe/projects/{projectId}/pipelines/{pipelineId}/files",
  "properties": {
    "errorCode": "DI-ADAPTER-MFF-0001"
  }
}