swagger: "2.0"
schemes:
  - https
host: azure.local
info:
  description: Creates an Azure Data Lake Analytics job client.
  title: DataLakeAnalyticsJobManagementClient
  version: 2015-11-01-preview
  x-apisguru-categories:
    - cloud
  x-logo:
    url: https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png
  x-origin:
    - format: swagger
      url: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/datalake-analytics/data-plane/Microsoft.DataLakeAnalytics/preview/2015-11-01-preview/job.json
      version: "2.0"
  x-preferred: false
  x-providerName: azure.com
  x-serviceName: datalake-analytics-job
  x-tags:
    - Azure
    - Microsoft
consumes:
  - application/json
  - text/json
  - application/octet-stream
produces:
  - application/json
  - text/json
  - application/octet-stream
parameters:
  ApiVersionParameter:
    description: Client Api Version.
    in: query
    name: api-version
    required: true
    type: string
  adlaJobDnsSuffixInPath:
    default: azuredatalakeanalytics.net
    description: Gets the DNS suffix used as the base for all Azure Data Lake Analytics Job service requests.
    in: path
    name: adlaJobDnsSuffix
    required: true
    type: string
    x-ms-parameter-location: client
    x-ms-skip-url-encoding: true
paths:
  /BuildJob:
    post:
      description: Builds (compiles) the specified job in the specified Data Lake Analytics account for job correctness and validation.
      operationId: Job_Build
      parameters:
        - description: The parameters to build a job.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/JobInformation"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: ""
          schema:
            $ref: "#/definitions/JobInformation"
      tags:
        - Job
  /Jobs:
    get:
      description: Lists the jobs, if any, associated with the specified Data Lake Analytics account. The response includes a link to the next page of results, if any.
      operationId: Job_List
      parameters:
        - description: OData filter. Optional.
          in: query
          name: $filter
          required: false
          type: string
        - description: The number of items to return. Optional.
          format: int32
          in: query
          name: $top
          required: false
          type: integer
        - description: The number of items to skip over before returning elements. Optional.
          format: int32
          in: query
          name: $skip
          required: false
          type: integer
        - description: OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories/$expand=Products would expand Product data in line with each Category entry. Optional.
          in: query
          name: $expand
          required: false
          type: string
        - description: OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional.
          in: query
          name: $select
          required: false
          type: string
        - description: OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional.
          in: query
          name: $orderby
          required: false
          type: string
        - description: The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional.
          in: query
          name: $count
          required: false
          type: boolean
        - description: A free form search. A free-text search expression to match for whether a particular entry should be included in the feed, e.g. Categories?$search=blue OR green. Optional.
          in: query
          name: $search
          required: false
          type: string
        - description: The return format. Return the response in particular format without access to request headers for standard content-type negotiation (e.g Orders?$format=json). Optional.
          in: query
          name: $format
          required: false
          type: string
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: ""
          schema:
            $ref: "#/definitions/JobInfoListResult"
      tags:
        - Job
      x-ms-odata: "#/definitions/JobInformation"
      x-ms-pageable:
        nextLinkName: nextLink
  "/Jobs/{jobIdentity}":
    get:
      description: Gets the job information for the specified job ID.
      operationId: Job_Get
      parameters:
        - description: JobInfo ID.
          format: uuid
          in: path
          name: jobIdentity
          required: true
          type: string
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: ""
          schema:
            $ref: "#/definitions/JobInformation"
      tags:
        - Job
    put:
      description: Submits a job to the specified Data Lake Analytics account.
      operationId: Job_Create
      parameters:
        - description: The job ID (a GUID) for the job being submitted.
          format: uuid
          in: path
          name: jobIdentity
          required: true
          type: string
        - description: The parameters to submit a job.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/JobInformation"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: ""
          schema:
            $ref: "#/definitions/JobInformation"
      tags:
        - Job
  "/Jobs/{jobIdentity}/CancelJob":
    post:
      description: Cancels the running job specified by the job ID.
      operationId: Job_Cancel
      parameters:
        - description: JobInfo ID to cancel.
          format: uuid
          in: path
          name: jobIdentity
          required: true
          type: string
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: ""
      tags:
        - Job
  "/Jobs/{jobIdentity}/GetDebugDataPath":
    post:
      description: Gets the U-SQL job debug data information specified by the job ID.
      operationId: Job_GetDebugDataPath
      parameters:
        - description: JobInfo ID.
          format: uuid
          in: path
          name: jobIdentity
          required: true
          type: string
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: ""
          schema:
            $ref: "#/definitions/JobDataPath"
      tags:
        - Job
  "/Jobs/{jobIdentity}/GetStatistics":
    post:
      description: Gets statistics of the specified job.
      operationId: Job_GetStatistics
      parameters:
        - description: JobInfo ID.
          format: uuid
          in: path
          name: jobIdentity
          required: true
          type: string
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: ""
          schema:
            $ref: "#/definitions/JobStatistics"
      tags:
        - Job
definitions:
  HiveJobProperties:
    allOf:
      - $ref: "#/definitions/JobProperties"
    properties:
      executedStatementCount:
        description: Gets or sets the number of statements that have been run based on the script
        format: int32
        type: integer
      logsLocation:
        description: Gets or sets the Hive logs location
        type: string
      statementCount:
        description: Gets or sets the number of statements that will be run based on the script
        format: int32
        type: integer
      statementInfo:
        description: Gets or sets the statement information for each statement in the script
        items:
          $ref: "#/definitions/HiveJobStatementInfo"
        type: array
      warehouseLocation:
        description: Gets or sets the runtime version of the U-SQL engine to use
        type: string
    x-ms-discriminator-value: Hive
  HiveJobStatementInfo:
    properties:
      errorMessage:
        description: Gets or sets the error message for this statement.
        type: string
      logLocation:
        description: Gets or sets the log location for this statement.
        type: string
      resultLocation:
        description: Gets or sets the result location for this statement.
        type: string
      resultPreviewLocation:
        description: Gets or sets the result preview location for this statement.
        type: string
  JobDataPath:
    description: A Data Lake Analytics U-SQL job data path item.
    properties:
      command:
        description: Gets the command that this job data relates to.
        readOnly: true
        type: string
      jobId:
        description: Gets the id of the job this data is for.
        format: uuid
        readOnly: true
        type: string
      paths:
        description: Gets the list of paths to all of the job data.
        items:
          type: string
        readOnly: true
        type: array
  JobErrorDetails:
    description: The Data Lake Analytics job error details.
    properties:
      InnerError:
        $ref: "#/definitions/JobInnerError"
        description: Gets the inner error of this specific job error message, if any.
        readOnly: true
      description:
        description: Gets the error message description
        readOnly: true
        type: string
      details:
        description: Gets the details of the error message.
        readOnly: true
        type: string
      endOffset:
        description: Gets the end offset in the job where the error was found.
        format: int32
        readOnly: true
        type: integer
      errorId:
        description: Gets the specific identifier for the type of error encountered in the job.
        readOnly: true
        type: string
      filePath:
        description: Gets the path to any supplemental error files, if any.
        readOnly: true
        type: string
      helpLink:
        description: Gets the link to MSDN or Azure help for this type of error, if any.
        readOnly: true
        type: string
      internalDiagnostics:
        description: Gets the internal diagnostic stack trace if the user requesting the job error details has sufficient permissions it will be retrieved, otherwise it will be empty.
        readOnly: true
        type: string
      lineNumber:
        description: Gets the specific line number in the job where the error occurred.
        format: int32
        readOnly: true
        type: integer
      message:
        description: Gets the user friendly error message for the failure.
        readOnly: true
        type: string
      resolution:
        description: Gets the recommended resolution for the failure, if any.
        readOnly: true
        type: string
      severity:
        description: Gets the severity level of the failure.
        enum:
          - Warning
          - Error
        readOnly: true
        type: string
        x-ms-enum:
          modelAsString: false
          name: SeverityTypes
      source:
        description: Gets the ultimate source of the failure (usually either SYSTEM or USER).
        readOnly: true
        type: string
      startOffset:
        description: Gets the start offset in the job where the error was found
        format: int32
        readOnly: true
        type: integer
  JobInfoListResult:
    description: List of jobInfo items.
    properties:
      count:
        description: Gets the total count of results that are available, but might not be returned in the current page.
        format: int64
        readOnly: true
        type: integer
      nextLink:
        description: Gets the link (url) to the next page of results.
        readOnly: true
        type: string
      value:
        description: Gets the list of jobInfo items.
        items:
          $ref: "#/definitions/JobInformation"
        readOnly: true
        type: array
  JobInformation:
    description: The common Data Lake Analytics job information properties.
    properties:
      degreeOfParallelism:
        description: Gets or sets the degree of parallelism used for this job. This must be greater than 0.
        format: int32
        type: integer
      degreeOfParallelismPercent:
        description: the degree of parallelism in percentage used for this job.
        format: double
        type: number
      endTime:
        description: Gets the completion time of the job.
        format: date-time
        readOnly: true
        type: string
      errorMessage:
        description: Gets the error message details for the job, if the job failed.
        items:
          $ref: "#/definitions/JobErrorDetails"
        readOnly: true
        type: array
      hierarchyQueueNode:
        description: the name of hierarchy queue node this job is assigned to, null if job has not been assigned yet or the account doesn't have hierarchy queue.
        readOnly: true
        type: string
      jobId:
        description: Gets or sets the job's unique identifier (a GUID).
        format: uuid
        type: string
      name:
        description: Gets or sets the friendly name of the job.
        type: string
      priority:
        description: Gets or sets the priority value for the current job. Lower numbers have a higher priority. By default, a job has a priority of 1000. This must be greater than 0.
        format: int32
        type: integer
      properties:
        $ref: "#/definitions/JobProperties"
        description: Gets or sets the job specific properties.
      result:
        description: Gets the result of job execution or the current result of the running job.
        enum:
          - None
          - Succeeded
          - Cancelled
          - Failed
        readOnly: true
        type: string
        x-ms-enum:
          modelAsString: false
          name: JobResult
      startTime:
        description: Gets the start time of the job.
        format: date-time
        readOnly: true
        type: string
      state:
        description: Gets the job state. When the job is in the Ended state, refer to Result and ErrorMessage for details.
        enum:
          - Accepted
          - Compiling
          - Ended
          - New
          - Queued
          - Running
          - Scheduling
          - Starting
          - Paused
          - WaitingForCapacity
        readOnly: true
        type: string
        x-ms-enum:
          modelAsString: false
          name: JobState
      stateAuditRecords:
        description: Gets the job state audit records, indicating when various operations have been performed on this job.
        items:
          $ref: "#/definitions/JobStateAuditRecord"
        readOnly: true
        type: array
      submitTime:
        description: Gets the time the job was submitted to the service.
        format: date-time
        readOnly: true
        type: string
      submitter:
        description: Gets or sets the user or account that submitted the job.
        type: string
      type:
        description: Gets or sets the job type of the current job (Hive or USql).
        enum:
          - USql
          - Hive
        type: string
        x-ms-enum:
          modelAsString: false
          name: JobType
    required:
      - name
      - type
      - properties
  JobInnerError:
    description: The Data Lake Analytics job error details.
    properties:
      component:
        description: Gets the component that failed.
        readOnly: true
        type: string
      description:
        description: Gets the error message description
        readOnly: true
        type: string
      details:
        description: Gets the details of the error message.
        readOnly: true
        type: string
      diagnosticCode:
        description: Gets the diagnostic error code.
        format: int32
        readOnly: true
        type: integer
      errorId:
        description: Gets the specific identifier for the type of error encountered in the job.
        readOnly: true
        type: string
      helpLink:
        description: Gets the link to MSDN or Azure help for this type of error, if any.
        readOnly: true
        type: string
      internalDiagnostics:
        description: Gets the internal diagnostic stack trace if the user requesting the job error details has sufficient permissions it will be retrieved, otherwise it will be empty.
        readOnly: true
        type: string
      message:
        description: Gets the user friendly error message for the failure.
        readOnly: true
        type: string
      resolution:
        description: Gets the recommended resolution for the failure, if any.
        readOnly: true
        type: string
      severity:
        description: Gets the severity level of the failure.
        enum:
          - Warning
          - Error
        readOnly: true
        type: string
        x-ms-enum:
          modelAsString: false
          name: SeverityTypes
      source:
        description: Gets the ultimate source of the failure (usually either SYSTEM or USER).
        readOnly: true
        type: string
  JobProperties:
    description: The common Data Lake Analytics job properties.
    discriminator: type
    properties:
      runtimeVersion:
        description: Gets or sets the runtime version of the U-SQL engine to use
        type: string
      script:
        description: Gets or sets the U-SQL script to run
        type: string
      type:
        description: Gets or sets the job type of the current job (i.e. Hive or U-SQL).
        type: string
    required:
      - script
      - type
  JobResource:
    description: The Data Lake Analytics U-SQL job resources.
    properties:
      name:
        description: Gets or set the name of the resource.
        type: string
      resourcePath:
        description: Gets or sets the path to the resource.
        type: string
      type:
        description: Gets or sets the job resource type.
        enum:
          - VertexResource
          - StatisticsResource
        type: string
        x-ms-enum:
          modelAsString: false
          name: JobResourceType
  JobStateAuditRecord:
    description: The Data Lake Analytics U-SQL job state audit records for tracking the lifecycle of a job.
    properties:
      details:
        description: Gets  the details of the audit log.
        readOnly: true
        type: string
      newState:
        description: Gets the new state the job is in.
        readOnly: true
        type: string
      requestedByUser:
        description: Gets the user who requests the change.
        readOnly: true
        type: string
      timeStamp:
        description: Gets the time stamp that the state change took place.
        format: date-time
        readOnly: true
        type: string
  JobStatistics:
    description: The Data Lake Analytics U-SQL job execution statistics.
    properties:
      lastUpdateTimeUtc:
        description: Gets the last update time for the statistics.
        format: date-time
        readOnly: true
        type: string
      stages:
        description: Gets the list of stages for the job.
        items:
          $ref: "#/definitions/JobStatisticsVertexStage"
        readOnly: true
        type: array
  JobStatisticsVertexStage:
    description: The Data Lake Analytics U-SQL job statistics vertex stage information.
    properties:
      dataRead:
        description: Gets the amount of data read, in bytes.
        format: int64
        readOnly: true
        type: integer
      dataReadCrossPod:
        description: Gets the amount of data read across multiple pods, in bytes.
        format: int64
        readOnly: true
        type: integer
      dataReadIntraPod:
        description: Gets the amount of data read in one pod, in bytes.
        format: int64
        readOnly: true
        type: integer
      dataToRead:
        description: Gets the amount of data remaining to be read, in bytes.
        format: int64
        readOnly: true
        type: integer
      dataWritten:
        description: Gets the amount of data written, in bytes.
        format: int64
        readOnly: true
        type: integer
      duplicateDiscardCount:
        description: Gets the number of duplicates that were discarded.
        format: int32
        readOnly: true
        type: integer
      failedCount:
        description: Gets the number of failures that occurred in this stage.
        format: int32
        readOnly: true
        type: integer
      maxVertexDataRead:
        description: Gets the maximum amount of data read in a single vertex, in bytes.
        format: int64
        readOnly: true
        type: integer
      minVertexDataRead:
        description: Gets the minimum amount of data read in a single vertex, in bytes.
        format: int64
        readOnly: true
        type: integer
      readFailureCount:
        description: Gets the number of read failures in this stage.
        format: int32
        readOnly: true
        type: integer
      revocationCount:
        description: Gets the number of vertices that were revoked during this stage.
        format: int32
        readOnly: true
        type: integer
      runningCount:
        description: Gets the number of currently running vertices in this stage.
        format: int32
        readOnly: true
        type: integer
      scheduledCount:
        description: Gets the number of currently scheduled vertices in this stage
        format: int32
        readOnly: true
        type: integer
      stageName:
        description: Gets the name of this stage in job execution.
        readOnly: true
        type: string
      succeededCount:
        description: Gets the number of vertices that succeeded in this stage.
        format: int32
        readOnly: true
        type: integer
      tempDataWritten:
        description: Gets the amount of temporary data written, in bytes.
        format: int64
        readOnly: true
        type: integer
      totalCount:
        description: Gets the total vertex count for this stage.
        format: int32
        readOnly: true
        type: integer
      totalFailedTime:
        description: Gets the amount of time that failed vertices took up in this stage.
        format: non-iso-duration
        readOnly: true
        type: string
      totalProgress:
        description: Gets the current progress of this stage, as a percentage.
        format: int32
        readOnly: true
        type: integer
      totalSucceededTime:
        description: Gets the amount of time all successful vertices took in this stage.
        format: non-iso-duration
        readOnly: true
        type: string
  USqlJobProperties:
    allOf:
      - $ref: "#/definitions/JobProperties"
    properties:
      algebraFilePath:
        description: Gets the U-SQL algebra file path after the job has completed
        readOnly: true
        type: string
      compileMode:
        description: Gets or sets the compile mode for the job.
        enum:
          - Semantic
          - Full
          - SingleBox
        type: string
        x-ms-enum:
          modelAsString: false
          name: CompileMode
      debugData:
        $ref: "#/definitions/JobDataPath"
        description: Gets or sets the job specific debug data locations.
      resources:
        description: Gets or sets the list of resources that are required by the job
        items:
          $ref: "#/definitions/JobResource"
        type: array
      rootProcessNodeId:
        description: Gets the ID used to identify the job manager coordinating job execution. This value should not be set by the user and will be ignored if it is.
        readOnly: true
        type: string
      statistics:
        $ref: "#/definitions/JobStatistics"
        description: Gets or sets the job specific statistics.
      totalCompilationTime:
        description: Gets the total time this job spent compiling. This value should not be set by the user and will be ignored if it is.
        format: non-iso-duration
        readOnly: true
        type: string
      totalPauseTime:
        description: Gets the total time this job spent paused. This value should not be set by the user and will be ignored if it is.
        format: non-iso-duration
        readOnly: true
        type: string
      totalQueuedTime:
        description: Gets the total time this job spent queued. This value should not be set by the user and will be ignored if it is.
        format: non-iso-duration
        readOnly: true
        type: string
      totalRunningTime:
        description: Gets the total time this job spent executing. This value should not be set by the user and will be ignored if it is.
        format: non-iso-duration
        readOnly: true
        type: string
      yarnApplicationId:
        description: Gets the ID used to identify the yarn application executing the job. This value should not be set by the user and will be ignored if it is.
        readOnly: true
        type: string
      yarnApplicationTimeStamp:
        description: Gets the timestamp (in ticks) for the yarn application executing the job. This value should not be set by the user and will be ignored if it is.
        format: int64
        readOnly: true
        type: integer
    x-ms-discriminator-value: USql
x-ms-parameterized-host:
  hostTemplate: "{accountName}.{adlaJobDnsSuffix}"
  parameters:
    - description: The Azure Data Lake Analytics account to execute job operations on.
      in: path
      name: accountName
      required: true
      type: string
      x-ms-skip-url-encoding: true
    - $ref: "#/parameters/adlaJobDnsSuffixInPath"
