Search Results for

    Show / Hide Table of Contents

    Interface IJobClient

    Namespace: Noxum.Nova.Cms.Client
    Assembly: Noxum.Nova.Cms.Client.dll
    Syntax
    public interface IJobClient

    Methods

    CreateJobAsync(CreateJobRequest, string, CancellationToken)

    Create a job.

    Declaration
    Task<CmsJob> CreateJobAsync(CreateJobRequest model, string username = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    CreateJobRequest model
    string username

    The username this transaction is committed for. This must be set for internal access, otherwise, the transaction will be committed as the user who is currently logged in.

    CancellationToken cancellationToken

    A cancellation token that can be used by other objects or threads to receive notice of cancellation.

    Returns
    Type Description
    Task<CmsJob>

    The job was created successfully

    Exceptions
    Type Condition
    CmsApiException

    A server side error occurred.

    DeleteJobAsync(int, string, CancellationToken)

    Deletes a job.

    Declaration
    Task DeleteJobAsync(int jobId, string username = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    int jobId

    The job id.

    string username

    The username this transaction is committed for. This must be set for internal access, otherwise, the transaction will be committed as the user who is currently logged in.

    CancellationToken cancellationToken

    A cancellation token that can be used by other objects or threads to receive notice of cancellation.

    Returns
    Type Description
    Task

    The job was deleted successfully

    Exceptions
    Type Condition
    CmsApiException

    A server side error occurred.

    GetJobArtifactAsync(int, string, CancellationToken)

    Get a single artifact file.

    Declaration
    Task<FileResponse> GetJobArtifactAsync(int jobId, string path, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    int jobId

    The job ID.

    string path

    The relative path of the file.

    CancellationToken cancellationToken

    A cancellation token that can be used by other objects or threads to receive notice of cancellation.

    Returns
    Type Description
    Task<FileResponse>

    The requested artifact file was found and returned successfully

    Exceptions
    Type Condition
    CmsApiException

    A server side error occurred.

    GetJobArtifactsAsync(int, CancellationToken)

    Provides a listing of job artifacts.

    Declaration
    Task<JobArtifactList> GetJobArtifactsAsync(int jobId, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    int jobId

    The job ID.

    CancellationToken cancellationToken

    A cancellation token that can be used by other objects or threads to receive notice of cancellation.

    Returns
    Type Description
    Task<JobArtifactList>

    A listing of the job's artifact files was returned successfully

    Exceptions
    Type Condition
    CmsApiException

    A server side error occurred.

    GetJobArtifactsZipAsync(int, CancellationToken)

    Get job artifacts by Job Id as a ZIP file

    Declaration
    Task<FileResponse> GetJobArtifactsZipAsync(int jobId, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    int jobId

    The job ID.

    CancellationToken cancellationToken

    A cancellation token that can be used by other objects or threads to receive notice of cancellation.

    Returns
    Type Description
    Task<FileResponse>

    The job artifacts were found and returned as a ZIP archive

    Exceptions
    Type Condition
    CmsApiException

    A server side error occurred.

    GetJobAsync(int, CancellationToken)

    Get a single job by ID

    Declaration
    Task<CmsJob> GetJobAsync(int jobId, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    int jobId

    The job ID.

    CancellationToken cancellationToken

    A cancellation token that can be used by other objects or threads to receive notice of cancellation.

    Returns
    Type Description
    Task<CmsJob>

    The requested job was found and returned successfully

    Exceptions
    Type Condition
    CmsApiException

    A server side error occurred.

    GetJobLogsAsync(int, CancellationToken)

    Get job logs by Job Id

    Declaration
    Task<FileResponse> GetJobLogsAsync(int jobId, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    int jobId

    The job ID.

    CancellationToken cancellationToken

    A cancellation token that can be used by other objects or threads to receive notice of cancellation.

    Returns
    Type Description
    Task<FileResponse>

    The job log file was found and returned as a plain text stream

    Exceptions
    Type Condition
    CmsApiException

    A server side error occurred.

    GetJobMetricsAsync(int, int?, CancellationToken)

    Get job metrics by Job Id

    Declaration
    Task<IList<JobMetrics>> GetJobMetricsAsync(int jobId, int? maxItems = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    int jobId

    The job ID.

    int? maxItems

    Optional parameter to limit the number of metric points returned.

    CancellationToken cancellationToken

    A cancellation token that can be used by other objects or threads to receive notice of cancellation.

    Returns
    Type Description
    Task<IList<JobMetrics>>

    The job metrics were found and returned successfully

    Exceptions
    Type Condition
    CmsApiException

    A server side error occurred.

    GetJobObjectIdsAsync(int, CancellationToken)

    Gets the ids of the job's context objects.

    Declaration
    Task<IList<int>> GetJobObjectIdsAsync(int jobId, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    int jobId

    The job id.

    CancellationToken cancellationToken

    A cancellation token that can be used by other objects or threads to receive notice of cancellation.

    Returns
    Type Description
    Task<IList<int>>

    The job's context object IDs were returned successfully

    Exceptions
    Type Condition
    CmsApiException

    A server side error occurred.

    GetJobProgressAsync(int, CancellationToken)

    Get job progress information by Job Id

    Declaration
    Task<JobProgress> GetJobProgressAsync(int jobId, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    int jobId

    The job ID.

    CancellationToken cancellationToken

    A cancellation token that can be used by other objects or threads to receive notice of cancellation.

    Returns
    Type Description
    Task<JobProgress>

    The job progress information was found and returned successfully

    Exceptions
    Type Condition
    CmsApiException

    A server side error occurred.

    GetJobsAsync(int?, int?, JobStatus?, int?, string, bool?, string, int?, CancellationToken)

    Get Jobs

    Declaration
    Task<CmsJobList> GetJobsAsync(int? branchId = null, int? definitionRef = null, JobStatus? state = null, int? triggerRef = null, string createdBy = null, bool? isDeleted = null, string @continue = null, int? take = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    int? branchId

    The id of the branch.

    int? definitionRef

    The id of the job definition.

    JobStatus? state

    Job state. if null, all states will be included. (0=New, 1=Running, 2=Succeeded, 3=Error, 4=KillRequest, 5=RestartRequest)

    int? triggerRef

    If not null, only jobs triggered by the specified Id will be included.

    string createdBy

    Job Created by. If not null, only jobs created by the specified user will be included.

    bool? isDeleted

    If true, include only deleted, if false include only not-deleted, if null include all jobs.

    string continue

    An opaque token that encapsulates information how to continue the list request

    int? take

    The number of jobs to take.

    CancellationToken cancellationToken

    A cancellation token that can be used by other objects or threads to receive notice of cancellation.

    Returns
    Type Description
    Task<CmsJobList>

    The matching jobs were found and returned successfully

    Exceptions
    Type Condition
    CmsApiException

    A server side error occurred.

    JobInputCancelAsync(string, CancellationToken)

    Cancel uploading a file to be used as job input.

    Declaration
    Task JobInputCancelAsync(string token, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string token

    The key of the temporary data

    CancellationToken cancellationToken

    A cancellation token that can be used by other objects or threads to receive notice of cancellation.

    Returns
    Type Description
    Task

    The temporary file was deleted and the upload was cancelled

    Exceptions
    Type Condition
    CmsApiException

    A server side error occurred.

    JobInputContinueAsync(string, FileParameter, CancellationToken)

    Continue uploading a file to be used as job input.

    Declaration
    Task<JobInputUploadResult> JobInputContinueAsync(string token, FileParameter file = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string token

    The key of the temporary data

    FileParameter file
    CancellationToken cancellationToken

    A cancellation token that can be used by other objects or threads to receive notice of cancellation.

    Returns
    Type Description
    Task<JobInputUploadResult>

    The file chunk was accepted and appended to the existing upload

    Exceptions
    Type Condition
    CmsApiException

    A server side error occurred.

    JobInputUploadAsync(FileParameter, CancellationToken)

    Start uploading a file to be used as job input.

    Declaration
    Task<JobInputUploadResult> JobInputUploadAsync(FileParameter file = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    FileParameter file
    CancellationToken cancellationToken

    A cancellation token that can be used by other objects or threads to receive notice of cancellation.

    Returns
    Type Description
    Task<JobInputUploadResult>

    The file chunk was accepted and a token for further uploads is returned

    Exceptions
    Type Condition
    CmsApiException

    A server side error occurred.

    UpdateJobAsync(int, UpdateJobRequest, string, CancellationToken)

    Updates a job.

    Declaration
    Task UpdateJobAsync(int jobId, UpdateJobRequest model, string username = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    int jobId

    The job id.

    UpdateJobRequest model

    The update model

    string username

    The username this transaction is committed for. This must be set for internal access, otherwise, the transaction will be committed as the user who is currently logged in.

    CancellationToken cancellationToken

    A cancellation token that can be used by other objects or threads to receive notice of cancellation.

    Returns
    Type Description
    Task

    The job was updated successfully

    Exceptions
    Type Condition
    CmsApiException

    A server side error occurred.

    In this article
    Back to top Version 6.3.0.17