Skip to main content

PUT /api/v1/internal/projects/:projectUuid/apps/:appUuid/sftp-users/:sftpUserUuid

Modifies an existing sftp users resource.

This endpoint documentation is generated from the current Fastify route implementation and should be treated as the implementation-level contract for this version of the API.

Source route file: src/api/routes/internal/private/bearer/projects/apps/sftp-users/put.ts

Request Method​

PUT

Base URL​

https://api.userdocks.local:5000

Endpoint​

/api/v1/internal/projects/:projectUuid/apps/:appUuid/sftp-users/:sftpUserUuid

Path Variables​

VariableTypeRequiredDescription
projectUuidstringtruePath variable from route pattern.
appUuidstringtruePath variable from route pattern.
sftpUserUuidstringtruePath variable from route pattern.

Query Parameters​

No query parameters.

HTTP Headers​

VariableTypeRequiredDescription
AuthorizationstringtrueBearer token in the form Bearer <jwt>.
Content-TypestringtrueUse application/json for JSON request bodies.

Request Body​

Schema reference: updateAppSFTPUserSchema

{
"host": "new-sftp.example.com",
"port": "2222",
"username": "sftp-user-2",
"password": "SftpSecret456!"
}

Successful Response​

Success status code(s): 200.

{
"kind": "SFTPUsers",
"totalItems": 1,
"itemsLength": 1,
"items": [
{
"uuid": "00000000-0000-0000-0000-000000000000"
}
]
}

Error Responses​

HTTP StatusExample Error
401{"errors":[{"validation":"error","code":"[E4010]","message":"Unauthorized Token"}]}
403{"errors":[{"validation":"error","code":"[E4030]","message":"App Is Disabled"}]}
400{"errors":[{"validation":"error","code":"[E4000]","message":"Bad Request / validation error"}]}
500{"errors":[{"validation":"error","code":"[E0000]","message":"Internal Server Error"}]}

Example​

const url = `https://api.userdocks.local:5000/api/v1/internal/projects/projectUuid-value/apps/appUuid-value/sftp-users/sftpUserUuid-value`;

const response = await fetch(url, {
method: 'PUT',
headers: {
Authorization: 'Bearer <jwt>',
'Content-Type': 'application/json',
},
body: '{"host":"new-sftp.example.com","port":"2222","username":"sftp-user-2","password":"SftpSecret456!"}',
});
const data = await response.json();
console.log(response.status, data);