Class JobDefinitionApi

java.lang.Object
org.camunda.community.rest.client.api.JobDefinitionApi

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2024-06-04T13:43:01.451833574Z[Etc/UTC]") public class JobDefinitionApi extends Object
  • Constructor Details

    • JobDefinitionApi

      public JobDefinitionApi()
    • JobDefinitionApi

      public JobDefinitionApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • getJobDefinition

      public JobDefinitionDto getJobDefinition(String id) throws ApiException
      Get Job Definition Retrieves a job definition by id, according to the `JobDefinition` interface in the engine.
      Parameters:
      id - The id of the job definition to be retrieved. (required)
      Returns:
      JobDefinitionDto
      Throws:
      ApiException - if fails to make API call
    • getJobDefinition

      public JobDefinitionDto getJobDefinition(String id, Map<String,String> additionalHeaders) throws ApiException
      Get Job Definition Retrieves a job definition by id, according to the `JobDefinition` interface in the engine.
      Parameters:
      id - The id of the job definition to be retrieved. (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      JobDefinitionDto
      Throws:
      ApiException - if fails to make API call
    • getJobDefinitions

      public List<JobDefinitionDto> getJobDefinitions(String jobDefinitionId, String activityIdIn, String processDefinitionId, String processDefinitionKey, String jobType, String jobConfiguration, Boolean active, Boolean suspended, Boolean withOverridingJobPriority, String tenantIdIn, Boolean withoutTenantId, Boolean includeJobDefinitionsWithoutTenantId, String sortBy, String sortOrder, Integer firstResult, Integer maxResults) throws ApiException
      Get Job Definitions Queries for job definitions that fulfill given parameters. The size of the result set can be retrieved by using the [Get Job Definition Count](https://docs.camunda.org/manual/7.21/reference/rest/job-definition/get-query-count/) method.
      Parameters:
      jobDefinitionId - Filter by job definition id. (optional)
      activityIdIn - Only include job definitions which belong to one of the passed and comma-separated activity ids. (optional)
      processDefinitionId - Only include job definitions which exist for the given process definition id. (optional)
      processDefinitionKey - Only include job definitions which exist for the given process definition key. (optional)
      jobType - Only include job definitions which exist for the given job type. See the [User Guide](https://docs.camunda.org/manual/7.21/user-guide/process-engine/the-job-executor/#job-creation) for more information about job types. (optional)
      jobConfiguration - Only include job definitions which exist for the given job configuration. For example: for timer jobs it is the timer configuration. (optional)
      active - Only include active job definitions. Value may only be `true`, as `false` is the default behavior. (optional)
      suspended - Only include suspended job definitions. Value may only be `true`, as `false` is the default behavior. (optional)
      withOverridingJobPriority - Only include job definitions that have an overriding job priority defined. The only effective value is `true`. If set to `false`, this filter is not applied. (optional)
      tenantIdIn - Only include job definitions which belong to one of the passed and comma-separated tenant ids. (optional)
      withoutTenantId - Only include job definitions which belong to no tenant. Value may only be `true`, as `false` is the default behavior. (optional)
      includeJobDefinitionsWithoutTenantId - Include job definitions which belong to no tenant. Can be used in combination with `tenantIdIn`. Value may only be `true`, as `false` is the default behavior. (optional)
      sortBy - Sort the results lexicographically by a given criterion. Must be used in conjunction with the sortOrder parameter. (optional)
      sortOrder - Sort the results in a given order. Values may be asc for ascending order or desc for descending order. Must be used in conjunction with the sortBy parameter. (optional)
      firstResult - Pagination of results. Specifies the index of the first result to return. (optional)
      maxResults - Pagination of results. Specifies the maximum number of results to return. Will return less results if there are no more results left. (optional)
      Returns:
      List<JobDefinitionDto>
      Throws:
      ApiException - if fails to make API call
    • getJobDefinitions

      public List<JobDefinitionDto> getJobDefinitions(String jobDefinitionId, String activityIdIn, String processDefinitionId, String processDefinitionKey, String jobType, String jobConfiguration, Boolean active, Boolean suspended, Boolean withOverridingJobPriority, String tenantIdIn, Boolean withoutTenantId, Boolean includeJobDefinitionsWithoutTenantId, String sortBy, String sortOrder, Integer firstResult, Integer maxResults, Map<String,String> additionalHeaders) throws ApiException
      Get Job Definitions Queries for job definitions that fulfill given parameters. The size of the result set can be retrieved by using the [Get Job Definition Count](https://docs.camunda.org/manual/7.21/reference/rest/job-definition/get-query-count/) method.
      Parameters:
      jobDefinitionId - Filter by job definition id. (optional)
      activityIdIn - Only include job definitions which belong to one of the passed and comma-separated activity ids. (optional)
      processDefinitionId - Only include job definitions which exist for the given process definition id. (optional)
      processDefinitionKey - Only include job definitions which exist for the given process definition key. (optional)
      jobType - Only include job definitions which exist for the given job type. See the [User Guide](https://docs.camunda.org/manual/7.21/user-guide/process-engine/the-job-executor/#job-creation) for more information about job types. (optional)
      jobConfiguration - Only include job definitions which exist for the given job configuration. For example: for timer jobs it is the timer configuration. (optional)
      active - Only include active job definitions. Value may only be `true`, as `false` is the default behavior. (optional)
      suspended - Only include suspended job definitions. Value may only be `true`, as `false` is the default behavior. (optional)
      withOverridingJobPriority - Only include job definitions that have an overriding job priority defined. The only effective value is `true`. If set to `false`, this filter is not applied. (optional)
      tenantIdIn - Only include job definitions which belong to one of the passed and comma-separated tenant ids. (optional)
      withoutTenantId - Only include job definitions which belong to no tenant. Value may only be `true`, as `false` is the default behavior. (optional)
      includeJobDefinitionsWithoutTenantId - Include job definitions which belong to no tenant. Can be used in combination with `tenantIdIn`. Value may only be `true`, as `false` is the default behavior. (optional)
      sortBy - Sort the results lexicographically by a given criterion. Must be used in conjunction with the sortOrder parameter. (optional)
      sortOrder - Sort the results in a given order. Values may be asc for ascending order or desc for descending order. Must be used in conjunction with the sortBy parameter. (optional)
      firstResult - Pagination of results. Specifies the index of the first result to return. (optional)
      maxResults - Pagination of results. Specifies the maximum number of results to return. Will return less results if there are no more results left. (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      List<JobDefinitionDto>
      Throws:
      ApiException - if fails to make API call
    • getJobDefinitionsCount

      public CountResultDto getJobDefinitionsCount(String jobDefinitionId, String activityIdIn, String processDefinitionId, String processDefinitionKey, String jobType, String jobConfiguration, Boolean active, Boolean suspended, Boolean withOverridingJobPriority, String tenantIdIn, Boolean withoutTenantId, Boolean includeJobDefinitionsWithoutTenantId) throws ApiException
      Get Job Definition Count Queries for the number of job definitions that fulfill given parameters. Takes the same parameters as the [Get Job Definitions](https://docs.camunda.org/manual/7.21/reference/rest/job-definition/get-query/) method.
      Parameters:
      jobDefinitionId - Filter by job definition id. (optional)
      activityIdIn - Only include job definitions which belong to one of the passed and comma-separated activity ids. (optional)
      processDefinitionId - Only include job definitions which exist for the given process definition id. (optional)
      processDefinitionKey - Only include job definitions which exist for the given process definition key. (optional)
      jobType - Only include job definitions which exist for the given job type. See the [User Guide](https://docs.camunda.org/manual/7.21/user-guide/process-engine/the-job-executor/#job-creation) for more information about job types. (optional)
      jobConfiguration - Only include job definitions which exist for the given job configuration. For example: for timer jobs it is the timer configuration. (optional)
      active - Only include active job definitions. Value may only be `true`, as `false` is the default behavior. (optional)
      suspended - Only include suspended job definitions. Value may only be `true`, as `false` is the default behavior. (optional)
      withOverridingJobPriority - Only include job definitions that have an overriding job priority defined. The only effective value is `true`. If set to `false`, this filter is not applied. (optional)
      tenantIdIn - Only include job definitions which belong to one of the passed and comma-separated tenant ids. (optional)
      withoutTenantId - Only include job definitions which belong to no tenant. Value may only be `true`, as `false` is the default behavior. (optional)
      includeJobDefinitionsWithoutTenantId - Include job definitions which belong to no tenant. Can be used in combination with `tenantIdIn`. Value may only be `true`, as `false` is the default behavior. (optional)
      Returns:
      CountResultDto
      Throws:
      ApiException - if fails to make API call
    • getJobDefinitionsCount

      public CountResultDto getJobDefinitionsCount(String jobDefinitionId, String activityIdIn, String processDefinitionId, String processDefinitionKey, String jobType, String jobConfiguration, Boolean active, Boolean suspended, Boolean withOverridingJobPriority, String tenantIdIn, Boolean withoutTenantId, Boolean includeJobDefinitionsWithoutTenantId, Map<String,String> additionalHeaders) throws ApiException
      Get Job Definition Count Queries for the number of job definitions that fulfill given parameters. Takes the same parameters as the [Get Job Definitions](https://docs.camunda.org/manual/7.21/reference/rest/job-definition/get-query/) method.
      Parameters:
      jobDefinitionId - Filter by job definition id. (optional)
      activityIdIn - Only include job definitions which belong to one of the passed and comma-separated activity ids. (optional)
      processDefinitionId - Only include job definitions which exist for the given process definition id. (optional)
      processDefinitionKey - Only include job definitions which exist for the given process definition key. (optional)
      jobType - Only include job definitions which exist for the given job type. See the [User Guide](https://docs.camunda.org/manual/7.21/user-guide/process-engine/the-job-executor/#job-creation) for more information about job types. (optional)
      jobConfiguration - Only include job definitions which exist for the given job configuration. For example: for timer jobs it is the timer configuration. (optional)
      active - Only include active job definitions. Value may only be `true`, as `false` is the default behavior. (optional)
      suspended - Only include suspended job definitions. Value may only be `true`, as `false` is the default behavior. (optional)
      withOverridingJobPriority - Only include job definitions that have an overriding job priority defined. The only effective value is `true`. If set to `false`, this filter is not applied. (optional)
      tenantIdIn - Only include job definitions which belong to one of the passed and comma-separated tenant ids. (optional)
      withoutTenantId - Only include job definitions which belong to no tenant. Value may only be `true`, as `false` is the default behavior. (optional)
      includeJobDefinitionsWithoutTenantId - Include job definitions which belong to no tenant. Can be used in combination with `tenantIdIn`. Value may only be `true`, as `false` is the default behavior. (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      CountResultDto
      Throws:
      ApiException - if fails to make API call
    • queryJobDefinitions

      public List<JobDefinitionDto> queryJobDefinitions(Integer firstResult, Integer maxResults, JobDefinitionQueryDto jobDefinitionQueryDto) throws ApiException
      Get Job Definitions (POST) Queries for job definitions that fulfill given parameters. This method is slightly more powerful than the [Get Job Definitions](https://docs.camunda.org/manual/7.21/reference/rest/job-definition/get-query/) method because it allows filtering by multiple job definitions of types `String`, `Number` or `Boolean`.
      Parameters:
      firstResult - Pagination of results. Specifies the index of the first result to return. (optional)
      maxResults - Pagination of results. Specifies the maximum number of results to return. Will return less results if there are no more results left. (optional)
      jobDefinitionQueryDto - (optional)
      Returns:
      List<JobDefinitionDto>
      Throws:
      ApiException - if fails to make API call
    • queryJobDefinitions

      public List<JobDefinitionDto> queryJobDefinitions(Integer firstResult, Integer maxResults, JobDefinitionQueryDto jobDefinitionQueryDto, Map<String,String> additionalHeaders) throws ApiException
      Get Job Definitions (POST) Queries for job definitions that fulfill given parameters. This method is slightly more powerful than the [Get Job Definitions](https://docs.camunda.org/manual/7.21/reference/rest/job-definition/get-query/) method because it allows filtering by multiple job definitions of types `String`, `Number` or `Boolean`.
      Parameters:
      firstResult - Pagination of results. Specifies the index of the first result to return. (optional)
      maxResults - Pagination of results. Specifies the maximum number of results to return. Will return less results if there are no more results left. (optional)
      jobDefinitionQueryDto - (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      List<JobDefinitionDto>
      Throws:
      ApiException - if fails to make API call
    • queryJobDefinitionsCount

      public CountResultDto queryJobDefinitionsCount(JobDefinitionQueryDto jobDefinitionQueryDto) throws ApiException
      Get Job Definition Count (POST) Queries for the number of job definitions that fulfill given parameters. This method takes the same message body as the [Get Job Definitions (POST)](https://docs.camunda.org/manual/7.21/reference/rest/job-definition/post-query/) method and therefore it is slightly more powerful than the [Get Job Definition Count](https://docs.camunda.org/manual/7.21/reference/rest/job-definition/get-query-count/) method.
      Parameters:
      jobDefinitionQueryDto - (optional)
      Returns:
      CountResultDto
      Throws:
      ApiException - if fails to make API call
    • queryJobDefinitionsCount

      public CountResultDto queryJobDefinitionsCount(JobDefinitionQueryDto jobDefinitionQueryDto, Map<String,String> additionalHeaders) throws ApiException
      Get Job Definition Count (POST) Queries for the number of job definitions that fulfill given parameters. This method takes the same message body as the [Get Job Definitions (POST)](https://docs.camunda.org/manual/7.21/reference/rest/job-definition/post-query/) method and therefore it is slightly more powerful than the [Get Job Definition Count](https://docs.camunda.org/manual/7.21/reference/rest/job-definition/get-query-count/) method.
      Parameters:
      jobDefinitionQueryDto - (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      CountResultDto
      Throws:
      ApiException - if fails to make API call
    • setJobPriorityJobDefinition

      public void setJobPriorityJobDefinition(String id, JobDefinitionPriorityDto jobDefinitionPriorityDto) throws ApiException
      Set Job Definition Priority by Id Sets an overriding execution priority for jobs with the given definition id. Optionally, the priorities of all the definitions' existing jobs are updated accordingly. The priority can be reset by setting it to `null`, meaning that a new job's priority will not be determined based on its definition's priority any longer. See the [user guide on job prioritization](https://docs.camunda.org/manual/7.21/user-guide/process-engine/the-job-executor/#set-job-definition-priorities-via-managementservice-api) for details.
      Parameters:
      id - The id of the job definition to be updated. (required)
      jobDefinitionPriorityDto - (optional)
      Throws:
      ApiException - if fails to make API call
    • setJobPriorityJobDefinition

      public void setJobPriorityJobDefinition(String id, JobDefinitionPriorityDto jobDefinitionPriorityDto, Map<String,String> additionalHeaders) throws ApiException
      Set Job Definition Priority by Id Sets an overriding execution priority for jobs with the given definition id. Optionally, the priorities of all the definitions' existing jobs are updated accordingly. The priority can be reset by setting it to `null`, meaning that a new job's priority will not be determined based on its definition's priority any longer. See the [user guide on job prioritization](https://docs.camunda.org/manual/7.21/user-guide/process-engine/the-job-executor/#set-job-definition-priorities-via-managementservice-api) for details.
      Parameters:
      id - The id of the job definition to be updated. (required)
      jobDefinitionPriorityDto - (optional)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • setJobRetriesJobDefinition

      public void setJobRetriesJobDefinition(String id, RetriesDto retriesDto) throws ApiException
      Set Job Retries By Job Definition Id Sets the number of retries of all **failed** jobs associated with the given job definition id.
      Parameters:
      id - The id of the job definition to be updated. (required)
      retriesDto - (optional)
      Throws:
      ApiException - if fails to make API call
    • setJobRetriesJobDefinition

      public void setJobRetriesJobDefinition(String id, RetriesDto retriesDto, Map<String,String> additionalHeaders) throws ApiException
      Set Job Retries By Job Definition Id Sets the number of retries of all **failed** jobs associated with the given job definition id.
      Parameters:
      id - The id of the job definition to be updated. (required)
      retriesDto - (optional)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • updateSuspensionStateJobDefinition

      public void updateSuspensionStateJobDefinition(String id, JobDefinitionSuspensionStateDto jobDefinitionSuspensionStateDto) throws ApiException
      Activate/Suspend Job Definition By Id Activates or suspends a given job definition by id.
      Parameters:
      id - The id of the job definition to activate or suspend. (required)
      jobDefinitionSuspensionStateDto - (optional)
      Throws:
      ApiException - if fails to make API call
    • updateSuspensionStateJobDefinition

      public void updateSuspensionStateJobDefinition(String id, JobDefinitionSuspensionStateDto jobDefinitionSuspensionStateDto, Map<String,String> additionalHeaders) throws ApiException
      Activate/Suspend Job Definition By Id Activates or suspends a given job definition by id.
      Parameters:
      id - The id of the job definition to activate or suspend. (required)
      jobDefinitionSuspensionStateDto - (optional)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • updateSuspensionStateJobDefinitions

      public void updateSuspensionStateJobDefinitions(JobDefinitionsSuspensionStateDto jobDefinitionsSuspensionStateDto) throws ApiException
      Activate/Suspend Job Definitions Activates or suspends job definitions with the given process definition id or process definition key.
      Parameters:
      jobDefinitionsSuspensionStateDto - (optional)
      Throws:
      ApiException - if fails to make API call
    • updateSuspensionStateJobDefinitions

      public void updateSuspensionStateJobDefinitions(JobDefinitionsSuspensionStateDto jobDefinitionsSuspensionStateDto, Map<String,String> additionalHeaders) throws ApiException
      Activate/Suspend Job Definitions Activates or suspends job definitions with the given process definition id or process definition key.
      Parameters:
      jobDefinitionsSuspensionStateDto - (optional)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call