Rename one or more mainframe files or directories in the specified pipeline.
HTML
PUT https://hostname/v1/integration/mainframe/projects/{projectId}/pipelines/{pipelineId}/files/renameProcess overview
- Request Validation—Validates file/directory identifiers.
- Conflict Detection—Checks for naming conflicts with existing files or directories.
- Resolution Strategy—Applies specified conflict resolution (
REPLACE_ALL,IGNORE_ALL,PARTIAL). - Rename Execution—Performs the rename operations.
- Response Generation—Returns results with success/failure details per file or directory
Key features
- Batch rename support for multiple files and directories.
- Comprehensive error reporting with failure reasons.
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. |
Query parameters
| Key | Required | Type | Description |
|---|---|---|---|
| conflictResolution | No | string |
Conflict resolution strategy to use when name conflicts occur:
|
Request body properties
| Ancestors | Property | Required | Type | Description |
|---|---|---|---|---|
| files | Yes | array[object] | List of files to be processed. | |
| files | currentFilePath | Yes | string | The current path/name of the file or folder. |
| files | newFilePath | Yes | string | The new path/name for the file or folder. |
| files | isDirectory | Yes | boolean | Indicates if the current path is a directory. |
| replaceFiles | Yes | array[string] | List of files to be replaced during the operation. only applicable for PARTIAL conflict resolution. |
Request body example
{
"files": [
{
"currentFilePath": "/old/path/oldName1.txt",
"newFilePath": "/new/path/newName1.txt",
"isDirectory": false
},
{
"currentFilePath": "/old/path/oldName2.txt",
"newFilePath": "/new/path/newName2.txt",
"isDirectory": false
}
],
"replaceFiles": [
"/new/path/newName1.txt"
]
}
Response
Response body properties
| Property | Required | Type | Description |
|---|---|---|---|
| filesCreated | No | array[string] | List of files that were created during the operation. Example:
"file1.txt,file2.txt" |
| filesRenamed | No | array[string] | List of files that were renamed during the operation. Example:
"oldName.txt->newName.txt" |
| filesConflicted | No | array[string] | List of files that were conflicted during the operation. Example:
"conflictedFile1.txt,conflictedFile2.txt" |
| filesUpdated | No | array[string] | List of files that were updated during the operation. Example:
"fileA.txt,fileB.txt" |
| filesDeleted | No | array[string] | List of files that were deleted during the operation. Example:
"fileX.txt,fileY.txt" |
| filesIgnored | No | array[string] | List of files that were ignored during the operation. |
| errors | No | array[string] | List of error messages encountered during the operation. Example:
"Error message 1,Error message 2" |
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.
{
"filesRenamed": [
"oldName1.txt -> newName1.txt",
"oldName2.txt -> newName2.txt"
],
"filesConflicted": [
"conflictedFile1.txt",
"conflictedFile2.txt"
],
"errors": [
"Error renaming file3.txt: reason"
]
}
{
"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/projects/{projectId}/pipelines/{pipelineId}/files/rename",
"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/projects/{projectId}/pipelines/{pipelineId}/files/rename",
"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/rename",
"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/rename",
"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/rename",
"properties": {
"errorCode": "DI-ADAPTER-MFF-0005"
}
}