ListWorkspaceCode

Updated at:

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

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

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

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: yyyy-MM-ddTHH:mm:ssZ.

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.