# SwiftShiftApi.JobroleApi

All URIs are relative to *http://localhost:3000*

Method | HTTP request | Description
------------- | ------------- | -------------
[**deleteJobrole**](JobroleApi.md#deleteJobrole) | **DELETE** /jobroles/{id} | 
[**deleteSiteJobrole**](JobroleApi.md#deleteSiteJobrole) | **DELETE** /organizations/{organization_id}/sites/{site_id}/jobroles/{jobrole_id} | 
[**getJobrole**](JobroleApi.md#getJobrole) | **GET** /jobroles/{id} | Gets jobrole by id
[**getSiteJobrole**](JobroleApi.md#getSiteJobrole) | **GET** /organizations/{organization_id}/sites/{site_id}/jobroles/{jobrole_id} | Gets site jobrole
[**listJobroles**](JobroleApi.md#listJobroles) | **GET** /jobroles | Gets list of all jobroles
[**listSiteJobroles**](JobroleApi.md#listSiteJobroles) | **GET** /organizations/{organization_id}/sites/{site_id}/jobroles | Gets site jobroles
[**postJobrole**](JobroleApi.md#postJobrole) | **POST** /jobroles | Creates a jobrole
[**postSiteJobrole**](JobroleApi.md#postSiteJobrole) | **POST** /organizations/{organization_id}/sites/{site_id}/jobroles | Creates site jobrole
[**putJobrole**](JobroleApi.md#putJobrole) | **PUT** /jobroles/{id} | Updates jobrole by id
[**putSiteJobrole**](JobroleApi.md#putSiteJobrole) | **PUT** /organizations/{organization_id}/sites/{site_id}/jobroles/{jobrole_id} | Updates site jobrole


<a name="deleteJobrole"></a>
# **deleteJobrole**
> Jobrole deleteJobrole(id)



delete jobrole

### Example
```javascript
import SwiftShiftApi from 'swift_shift_api';

let apiInstance = new SwiftShiftApi.JobroleApi();
let id = "id_example"; // String | id of jobrole
apiInstance.deleteJobrole(id, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**| id of jobrole | 

### Return type

[**Jobrole**](Jobrole.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="deleteSiteJobrole"></a>
# **deleteSiteJobrole**
> SiteJobrole deleteSiteJobrole(organizationId, siteId, jobroleId)



delete site jobrole

### Example
```javascript
import SwiftShiftApi from 'swift_shift_api';

let apiInstance = new SwiftShiftApi.JobroleApi();
let organizationId = "organizationId_example"; // String | id of the organization
let siteId = "siteId_example"; // String | id of the site
let jobroleId = "jobroleId_example"; // String | jobrole id
apiInstance.deleteSiteJobrole(organizationId, siteId, jobroleId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **organizationId** | **String**| id of the organization | 
 **siteId** | **String**| id of the site | 
 **jobroleId** | **String**| jobrole id | 

### Return type

[**SiteJobrole**](SiteJobrole.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="getJobrole"></a>
# **getJobrole**
> Jobrole getJobrole(id)

Gets jobrole by id

### Example
```javascript
import SwiftShiftApi from 'swift_shift_api';

let apiInstance = new SwiftShiftApi.JobroleApi();
let id = "id_example"; // String | id of jobrole
apiInstance.getJobrole(id, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**| id of jobrole | 

### Return type

[**Jobrole**](Jobrole.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="getSiteJobrole"></a>
# **getSiteJobrole**
> SiteJobrole getSiteJobrole(organizationId, siteId, jobroleId)

Gets site jobrole

### Example
```javascript
import SwiftShiftApi from 'swift_shift_api';

let apiInstance = new SwiftShiftApi.JobroleApi();
let organizationId = "organizationId_example"; // String | id of the organization
let siteId = "siteId_example"; // String | id of the site
let jobroleId = "jobroleId_example"; // String | jobrole id
apiInstance.getSiteJobrole(organizationId, siteId, jobroleId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **organizationId** | **String**| id of the organization | 
 **siteId** | **String**| id of the site | 
 **jobroleId** | **String**| jobrole id | 

### Return type

[**SiteJobrole**](SiteJobrole.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="listJobroles"></a>
# **listJobroles**
> InlineResponse20012 listJobroles(opts)

Gets list of all jobroles

### Example
```javascript
import SwiftShiftApi from 'swift_shift_api';

let apiInstance = new SwiftShiftApi.JobroleApi();
let opts = {
  'take': 50, // Number | Page size.
  'skip': 0, // Number | The start index.
  'search': "search_example", // String | Search phrase.
  'select': ["null"], // [String] | List of the properties to return.
  'where': "where_example", // String | a type orm json \"where\" compliant statement
  'q': "q_example" // String | resource query language
};
apiInstance.listJobroles(opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **take** | **Number**| Page size. | [optional] [default to 50]
 **skip** | **Number**| The start index. | [optional] [default to 0]
 **search** | **String**| Search phrase. | [optional] 
 **select** | [**[String]**](String.md)| List of the properties to return. | [optional] 
 **where** | **String**| a type orm json \&quot;where\&quot; compliant statement | [optional] 
 **q** | **String**| resource query language | [optional] 

### Return type

[**InlineResponse20012**](InlineResponse20012.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="listSiteJobroles"></a>
# **listSiteJobroles**
> InlineResponse2005 listSiteJobroles(organizationId, siteId, opts)

Gets site jobroles

### Example
```javascript
import SwiftShiftApi from 'swift_shift_api';

let apiInstance = new SwiftShiftApi.JobroleApi();
let organizationId = "organizationId_example"; // String | id of the organization
let siteId = "siteId_example"; // String | id of the site
let opts = {
  'take': 50, // Number | Page size.
  'skip': 0, // Number | The start index.
  'q': "q_example" // String | resource query language
};
apiInstance.listSiteJobroles(organizationId, siteId, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **organizationId** | **String**| id of the organization | 
 **siteId** | **String**| id of the site | 
 **take** | **Number**| Page size. | [optional] [default to 50]
 **skip** | **Number**| The start index. | [optional] [default to 0]
 **q** | **String**| resource query language | [optional] 

### Return type

[**InlineResponse2005**](InlineResponse2005.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="postJobrole"></a>
# **postJobrole**
> Jobrole postJobrole(opts)

Creates a jobrole

### Example
```javascript
import SwiftShiftApi from 'swift_shift_api';

let apiInstance = new SwiftShiftApi.JobroleApi();
let opts = {
  'jobrole': new SwiftShiftApi.Jobrole() // Jobrole | 
};
apiInstance.postJobrole(opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **jobrole** | [**Jobrole**](Jobrole.md)|  | [optional] 

### Return type

[**Jobrole**](Jobrole.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="postSiteJobrole"></a>
# **postSiteJobrole**
> SiteJobrole postSiteJobrole(organizationId, siteId, opts)

Creates site jobrole

### Example
```javascript
import SwiftShiftApi from 'swift_shift_api';

let apiInstance = new SwiftShiftApi.JobroleApi();
let organizationId = "organizationId_example"; // String | id of the organization
let siteId = "siteId_example"; // String | id of the site
let opts = {
  'siteJobrolePayload': new SwiftShiftApi.SiteJobrolePayload() // SiteJobrolePayload | 
};
apiInstance.postSiteJobrole(organizationId, siteId, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **organizationId** | **String**| id of the organization | 
 **siteId** | **String**| id of the site | 
 **siteJobrolePayload** | [**SiteJobrolePayload**](SiteJobrolePayload.md)|  | [optional] 

### Return type

[**SiteJobrole**](SiteJobrole.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="putJobrole"></a>
# **putJobrole**
> Jobrole putJobrole(id, opts)

Updates jobrole by id

### Example
```javascript
import SwiftShiftApi from 'swift_shift_api';

let apiInstance = new SwiftShiftApi.JobroleApi();
let id = "id_example"; // String | id of jobrole
let opts = {
  'jobrole': new SwiftShiftApi.Jobrole() // Jobrole | 
};
apiInstance.putJobrole(id, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**| id of jobrole | 
 **jobrole** | [**Jobrole**](Jobrole.md)|  | [optional] 

### Return type

[**Jobrole**](Jobrole.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="putSiteJobrole"></a>
# **putSiteJobrole**
> SiteJobrole putSiteJobrole(organizationId, siteId, jobroleId, opts)

Updates site jobrole

### Example
```javascript
import SwiftShiftApi from 'swift_shift_api';

let apiInstance = new SwiftShiftApi.JobroleApi();
let organizationId = "organizationId_example"; // String | id of the organization
let siteId = "siteId_example"; // String | id of the site
let jobroleId = "jobroleId_example"; // String | jobrole id
let opts = {
  'siteJobrolePayload': new SwiftShiftApi.SiteJobrolePayload() // SiteJobrolePayload | 
};
apiInstance.putSiteJobrole(organizationId, siteId, jobroleId, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **organizationId** | **String**| id of the organization | 
 **siteId** | **String**| id of the site | 
 **jobroleId** | **String**| jobrole id | 
 **siteJobrolePayload** | [**SiteJobrolePayload**](SiteJobrolePayload.md)|  | [optional] 

### Return type

[**SiteJobrole**](SiteJobrole.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

