UNPKG

chatkitty

Version:
129 lines (87 loc) 4.01 kB
# JobsApi All URIs are relative to *https://api.chatkitty.com* |Method | HTTP request | Description| |------------- | ------------- | -------------| |[**listJobs**](#listjobs) | **GET** /jobs | List jobs| |[**retrieveJob**](#retrievejob) | **GET** /jobs/{id} | Retrieve a job| # **listJobs** > PagedModelApplicationJobResource listJobs() Returns a page of jobs created for this application ### Example ```typescript import { JobsApi, Configuration } from 'chatkitty'; const configuration = new Configuration(); const apiInstance = new JobsApi(configuration); let page: number; //Zero-based page index (0..N) (optional) (default to 0) let size: number; //The size of the page to be returned (optional) (default to 25) let sort: Array<string>; //Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional) (default to undefined) let running: boolean; //Filters for jobs currently running (optional) (default to undefined) const { status, data } = await apiInstance.listJobs( page, size, sort, running ); ``` ### Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **page** | [**number**] | Zero-based page index (0..N) | (optional) defaults to 0| | **size** | [**number**] | The size of the page to be returned | (optional) defaults to 25| | **sort** | **Array&lt;string&gt;** | Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. | (optional) defaults to undefined| | **running** | [**boolean**] | Filters for jobs currently running | (optional) defaults to undefined| ### Return type **PagedModelApplicationJobResource** ### Authorization [application_authorization](../README.md#application_authorization) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json, application/vnd.chatkitty+json, application/vnd.chatkitty.v1+json, application/vnd.hal+json, application/hal+json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| |**404** | Resource not found | - | |**403** | Access is denied | - | |**400** | Client error | - | |**401** | Unauthorized: Full authentication is required to access this resource | - | |**200** | OK | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **retrieveJob** > ApplicationJobResource retrieveJob() Returns a job by ID ### Example ```typescript import { JobsApi, Configuration } from 'chatkitty'; const configuration = new Configuration(); const apiInstance = new JobsApi(configuration); let id: number; //Job ID (default to undefined) const { status, data } = await apiInstance.retrieveJob( id ); ``` ### Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **id** | [**number**] | Job ID | defaults to undefined| ### Return type **ApplicationJobResource** ### Authorization [application_authorization](../README.md#application_authorization) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json, application/vnd.chatkitty+json, application/vnd.chatkitty.v1+json, application/vnd.hal+json, application/hal+json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| |**404** | Resource not found | - | |**403** | Access is denied | - | |**400** | Client error | - | |**401** | Unauthorized: Full authentication is required to access this resource | - | |**200** | OK | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)