ListWorkspaceCode
Lists code files and directories at a specified path in a workspace.
Operation description
This operation lists the code files and directories at a specified path in a workspace.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| WorkspaceId |
string |
Yes |
The ID of the workspace. |
56kv1pvl9uvt9**********bb |
| Path |
string |
Yes |
The path of the file or directory. |
/Workspace/code/default/test.ipynb |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response object. |
||
| Data |
object |
The data returned in the response. |
|
| List |
array<object> |
An array of objects representing the files and directories. |
|
|
object |
An object that represents a file or directory. |
||
| Name |
string |
The name of the file or directory. |
default |
| Symlink |
string |
The target of the symlink. |
../abc.py |
| IsDir |
boolean |
Indicates whether the object is a directory. |
true |
| Size |
integer |
The file size in bytes. |
59 |
| Mtime |
string |
The modification time of the file. The time is in the ISO 8601 format: This parameter is returned only for files. |
2026-01-01T10:11:12Z |
| Message |
string |
The error message returned if the request fails. |
This record is being collected, please wait for a moment. |
| RequestId |
string |
The request ID. |
67E910F2-4B62-5B0C-ACA3-7547695C**** |
| ErrorCode |
string |
The error code. |
InvalidTid |
| HttpStatusCode |
integer |
The HTTP status code. |
200 |
| Success |
boolean |
Indicates whether the request was successful. |
true |
Examples
Success response
JSON format
{
"Data": {
"List": [
{
"Name": "default",
"Symlink": "../abc.py",
"IsDir": true,
"Size": 59,
"Mtime": "2026-01-01T10:11:12Z"
}
]
},
"Message": "This record is being collected, please wait for a moment.",
"RequestId": "67E910F2-4B62-5B0C-ACA3-7547695C****",
"ErrorCode": "InvalidTid",
"HttpStatusCode": 200,
"Success": true
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.