Jobs - List Output Files

List all directories and files inside the given directory of the Job's output directory (if the output directory is on Azure File Share or Azure Storage Container).

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces/{workspaceName}/experiments/{experimentName}/jobs/{jobName}/listOutputFiles?outputdirectoryid={outputdirectoryid}&api-version=2018-05-01
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces/{workspaceName}/experiments/{experimentName}/jobs/{jobName}/listOutputFiles?outputdirectoryid={outputdirectoryid}&directory={directory}&linkexpiryinminutes={linkexpiryinminutes}&maxresults={maxresults}&api-version=2018-05-01

URI Parameters

Name In Required Type Description
subscriptionId
path True
  • string

The subscriptionID for the Azure user.

resourceGroupName
path True
  • string

Name of the resource group to which the resource belongs.

Regex pattern: ^[-\w\._]+$

workspaceName
path True
  • string

The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.

Regex pattern: ^[-\w_]+$

experimentName
path True
  • string

The name of the experiment. Experiment names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.

Regex pattern: ^[-\w_]+$

jobName
path True
  • string

The name of the job within the specified resource group. Job names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.

Regex pattern: ^[-\w_]+$

outputdirectoryid
query True
  • string

Id of the job output directory. This is the OutputDirectory-->id parameter that is given by the user during Create Job.

directory
query
  • string

The path to the directory.

linkexpiryinminutes
query
  • integer
int32

The number of minutes after which the download link will expire.

maxresults
query
  • integer
int32

The maximum number of items to return in the response. A maximum of 1000 files can be returned.

api-version
query True
  • string

Specifies the version of API used for this request.

Responses

Name Type Description
200 OK

The operation was successful. The response contains the list of files.

Other Status Codes

Error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

List a job's files

Sample Request

POST https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/demo_resource_group/providers/Microsoft.BatchAI/workspaces/demo_workspace/experiments/demo_experiment/jobs/demo_job/listOutputFiles?outputdirectoryid=stdouterr&api-version=2018-05-01

Sample Response

{
  "value": [
    {
      "name": "stderr-job_prep.txt",
      "fileType": "file",
      "downloadUrl": "https://storage_account_name.file.core.windows.net/share/00000000-0000-0000-0000-000000000000/test_mgmt_batchai_jobs_test_job_preparation_hoste0e613b6/jobs/job/host_prep_stderr.txt?sv=2016-05-31&sr=f&sig=CNPJmjDQT9Anld9%2FdnQ52ZBpfOff2el8r4el6J%2BnpJE%3D&se=2017-09-28T01%3A22%3A35Z&sp=rl",
      "properties": {
        "lastModified": "2017-09-28T00:22:19Z",
        "contentLength": 0
      }
    },
    {
      "name": "stdout-job_prep.txt",
      "fileType": "file",
      "downloadUrl": "https://storage_account_name.file.core.windows.net/share/00000000-0000-0000-0000-000000000000/test_mgmt_batchai_jobs_test_job_preparation_hoste0e613b6/jobs/job/host_prep_stdout.txt?sv=2016-05-31&sr=f&sig=yK%2F5acWSTdcmBZGGL9%2F3IqeZ7N%2B1sRXfwB%2FaCkoRS%2Bc%3D&se=2017-09-28T01%3A22%3A35Z&sp=rl",
      "properties": {
        "lastModified": "2017-09-28T00:22:19Z",
        "contentLength": 720
      }
    },
    {
      "name": "stderr.txt",
      "fileType": "file",
      "downloadUrl": "https://storage_account_name.file.core.windows.net/share/00000000-0000-0000-0000-000000000000/test_mgmt_batchai_jobs_test_job_preparation_hoste0e613b6/jobs/job/stderr.txt?sv=2016-05-31&sr=f&sig=TdvHhdQjvWWA0Z7aPb0oZpPgGbBPOyDarNXWHFnRS3c%3D&se=2017-09-28T01%3A22%3A35Z&sp=rl",
      "properties": {
        "lastModified": "2017-09-28T00:22:19Z",
        "contentLength": 0
      }
    },
    {
      "name": "stdout.txt",
      "fileType": "file",
      "downloadUrl": "https://storage_account_name.file.core.windows.net/share/00000000-0000-0000-0000-000000000000/test_mgmt_batchai_jobs_test_job_preparation_hoste0e613b6/jobs/job/stdout.txt?sv=2016-05-31&sr=f&sig=nyydEjNnYpQfovknJc%2B5G%2F05g0IV4acWKlfkM35lh00%3D&se=2017-09-28T01%3A22%3A35Z&sp=rl",
      "properties": {
        "lastModified": "2017-09-28T00:22:19Z",
        "contentLength": 32
      }
    },
    {
      "name": "counters",
      "fileType": "directory"
    }
  ]
}

Definitions

CloudError

An error response from the Batch AI service.

CloudErrorBody

An error response from the Batch AI service.

File

Properties of the file or directory.

FileListResult

Values returned by the List operation.

FileType

File type.

CloudError

An error response from the Batch AI service.

Name Type Description
error

An error response from the Batch AI service.

CloudErrorBody

An error response from the Batch AI service.

Name Type Description
code
  • string

An identifier for the error. Codes are invariant and are intended to be consumed programmatically.

details

A list of additional details about the error.

message
  • string

A message describing the error, intended to be suitable for display in a user interface.

target
  • string

The target of the particular error. For example, the name of the property in error.

File

Properties of the file or directory.

Name Type Description
downloadUrl
  • string

Download URL.
URL to download the corresponding file. The downloadUrl is not returned for directories.

fileType

File type.
Type of the file. Possible values are file and directory.

name
  • string

Name.
Name of the file.

properties.contentLength
  • integer

Content length.
The file of the size.

properties.lastModified
  • string

Last modified time.
The time at which the file was last modified.

FileListResult

Values returned by the List operation.

Name Type Description
nextLink
  • string

The continuation token.

value

The collection of returned job directories and files.

FileType

File type.

Name Type Description
directory
  • string
file
  • string