# ModelSet.ModelSetVersionsApi

All URIs are relative to *https://developer.api.autodesk.com/bim360/modelset*

Method | HTTP request | Description
------------- | ------------- | -------------
[**createModelSetVersion**](ModelSetVersionsApi.md#createModelSetVersion) | **POST** /v3/containers/{containerId}/modelsets/{modelSetId}/versions | Create Model Set Version
[**disableModelSetVersions**](ModelSetVersionsApi.md#disableModelSetVersions) | **PATCH** /v3/containers/{containerId}/modelsets/{modelSetId}/versions:disable | Disable Automatic Model Set Version Generation.
[**enableModelSetVersions**](ModelSetVersionsApi.md#enableModelSetVersions) | **PATCH** /v3/containers/{containerId}/modelsets/{modelSetId}/versions:enable | Enable Automatic Model Set Version Generation.
[**getModelSetVersion**](ModelSetVersionsApi.md#getModelSetVersion) | **GET** /v3/containers/{containerId}/modelsets/{modelSetId}/versions/{version} | Get Model Set Version
[**getModelSetVersionLatest**](ModelSetVersionsApi.md#getModelSetVersionLatest) | **GET** /v3/containers/{containerId}/modelsets/{modelSetId}/versions/latest | Get Model Set Version
[**getModelSetVersions**](ModelSetVersionsApi.md#getModelSetVersions) | **GET** /v3/containers/{containerId}/modelsets/{modelSetId}/versions | Get Model Set Versions



## createModelSetVersion

> ModelSetJob createModelSetVersion(containerId, modelSetId)

Create Model Set Version

Requests that the Model Coordination system creates a new version of a given model set.  Note that this operation is not guaranteed to result in a new version of the model set being generated. If the folder contents have not changed, or the change does not necessitate a new model set version (e.g. the changed models are not valid for use in Model Coordination) then no new model set version will be created.  The response contains information about the created model set job.

### Example

```javascript
var ModelSet = require('forge-bim360-modelcoordination-modelset');
var defaultClient = ModelSet.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2AuthCode
var oauth2AuthCode = defaultClient.authentications['oauth2AuthCode'];
oauth2AuthCode.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new ModelSet.ModelSetVersionsApi();
var containerId = null; // String | The GUID that uniquely identifies the container
var modelSetId = null; // String | The GUID that uniquely identifies the model set
apiInstance.createModelSetVersion(containerId, modelSetId).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

```

### Parameters



Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **containerId** | [**String**](.md)| The GUID that uniquely identifies the container | 
 **modelSetId** | [**String**](.md)| The GUID that uniquely identifies the model set | 

### Return type

[**ModelSetJob**](ModelSetJob.md)

### Authorization

[oauth2AuthCode](../README.md#oauth2AuthCode)

### HTTP request headers

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


## disableModelSetVersions

> ModelSetJob disableModelSetVersions(containerId, modelSetId)

Disable Automatic Model Set Version Generation.

Disables automatic version creation for a given model set.  If enabled, model set version creation will be triggered when the model set&#39;s folders&#39; content changes, or if a call is explicitly made to the &#39;Create Model Set Version&#39; endpoint. If disabled, only an explicit call to the &#39;Create Model Set Version&#39; endpoint will trigger new version creation.  The response contains information about the created model set job.

### Example

```javascript
var ModelSet = require('forge-bim360-modelcoordination-modelset');
var defaultClient = ModelSet.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2AuthCode
var oauth2AuthCode = defaultClient.authentications['oauth2AuthCode'];
oauth2AuthCode.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new ModelSet.ModelSetVersionsApi();
var containerId = null; // String | The GUID that uniquely identifies the container
var modelSetId = null; // String | The GUID that uniquely identifies the model set
apiInstance.disableModelSetVersions(containerId, modelSetId).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

```

### Parameters



Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **containerId** | [**String**](.md)| The GUID that uniquely identifies the container | 
 **modelSetId** | [**String**](.md)| The GUID that uniquely identifies the model set | 

### Return type

[**ModelSetJob**](ModelSetJob.md)

### Authorization

[oauth2AuthCode](../README.md#oauth2AuthCode)

### HTTP request headers

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


## enableModelSetVersions

> ModelSetJob enableModelSetVersions(containerId, modelSetId)

Enable Automatic Model Set Version Generation.

Enables automatic version creation for a given model set.  If enabled, model set version creation will be triggered when the model set&#39;s folders&#39; content changes, or if a call is explicitly made to the &#39;Create Model Set Version&#39; endpoint. If disabled, only an explicit call to the &#39;Create Model Set Version&#39; endpoint will trigger new version creation.  The response contains information about the created model set job.

### Example

```javascript
var ModelSet = require('forge-bim360-modelcoordination-modelset');
var defaultClient = ModelSet.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2AuthCode
var oauth2AuthCode = defaultClient.authentications['oauth2AuthCode'];
oauth2AuthCode.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new ModelSet.ModelSetVersionsApi();
var containerId = null; // String | The GUID that uniquely identifies the container
var modelSetId = null; // String | The GUID that uniquely identifies the model set
apiInstance.enableModelSetVersions(containerId, modelSetId).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

```

### Parameters



Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **containerId** | [**String**](.md)| The GUID that uniquely identifies the container | 
 **modelSetId** | [**String**](.md)| The GUID that uniquely identifies the model set | 

### Return type

[**ModelSetJob**](ModelSetJob.md)

### Authorization

[oauth2AuthCode](../README.md#oauth2AuthCode)

### HTTP request headers

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


## getModelSetVersion

> ModelSetVersion getModelSetVersion(containerId, modelSetId, version)

Get Model Set Version

Gets a specific version of a given model set based on the model set&#39;s ID and the version number.  Returns the requested model set version object.

### Example

```javascript
var ModelSet = require('forge-bim360-modelcoordination-modelset');
var defaultClient = ModelSet.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2AuthCode
var oauth2AuthCode = defaultClient.authentications['oauth2AuthCode'];
oauth2AuthCode.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new ModelSet.ModelSetVersionsApi();
var containerId = null; // String | The GUID that uniquely identifies the container
var modelSetId = null; // String | The GUID that uniquely identifies the model set
var version = 56; // Number | The model set version number
apiInstance.getModelSetVersion(containerId, modelSetId, version).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

```

### Parameters



Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **containerId** | [**String**](.md)| The GUID that uniquely identifies the container | 
 **modelSetId** | [**String**](.md)| The GUID that uniquely identifies the model set | 
 **version** | **Number**| The model set version number | 

### Return type

[**ModelSetVersion**](ModelSetVersion.md)

### Authorization

[oauth2AuthCode](../README.md#oauth2AuthCode)

### HTTP request headers

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


## getModelSetVersionLatest

> ModelSetVersion getModelSetVersionLatest(containerId, modelSetId)

Get Model Set Version

Gets the latest version of a given model set based on the model set&#39;s ID.  Returns the requested model set version object.

### Example

```javascript
var ModelSet = require('forge-bim360-modelcoordination-modelset');
var defaultClient = ModelSet.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2AuthCode
var oauth2AuthCode = defaultClient.authentications['oauth2AuthCode'];
oauth2AuthCode.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new ModelSet.ModelSetVersionsApi();
var containerId = null; // String | The GUID that uniquely identifies the container
var modelSetId = null; // String | The GUID that uniquely identifies the model set
apiInstance.getModelSetVersionLatest(containerId, modelSetId).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

```

### Parameters



Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **containerId** | [**String**](.md)| The GUID that uniquely identifies the container | 
 **modelSetId** | [**String**](.md)| The GUID that uniquely identifies the model set | 

### Return type

[**ModelSetVersion**](ModelSetVersion.md)

### Authorization

[oauth2AuthCode](../README.md#oauth2AuthCode)

### HTTP request headers

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


## getModelSetVersions

> ModelSetVersionSummaryCollection getModelSetVersions(containerId, modelSetId, opts)

Get Model Set Versions

Gets a list of versions of a given model set.  The response contains a list of model set versions, restricted by the number specified by the &#x60;pageLimit&#x60; property. If set (i.e. there are more results than can be displayed at once), the &#x60;continuationToken&#x60; property in the response can be provided in an additional call in order to retrieve additional results.

### Example

```javascript
var ModelSet = require('forge-bim360-modelcoordination-modelset');
var defaultClient = ModelSet.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2AuthCode
var oauth2AuthCode = defaultClient.authentications['oauth2AuthCode'];
oauth2AuthCode.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new ModelSet.ModelSetVersionsApi();
var containerId = null; // String | The GUID that uniquely identifies the container
var modelSetId = null; // String | The GUID that uniquely identifies the model set
var opts = {
  'pageLimit': 56, // Number | The maximum number of model set versions to return in a page. If not set, the default page limit is used, as determined by the server.
  'continuationToken': 10 // String | The token indicating the start of the page. If not set, the first page will be retrieved.
};
apiInstance.getModelSetVersions(containerId, modelSetId, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

```

### Parameters



Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **containerId** | [**String**](.md)| The GUID that uniquely identifies the container | 
 **modelSetId** | [**String**](.md)| The GUID that uniquely identifies the model set | 
 **pageLimit** | **Number**| The maximum number of model set versions to return in a page. If not set, the default page limit is used, as determined by the server. | [optional] 
 **continuationToken** | **String**| The token indicating the start of the page. If not set, the first page will be retrieved. | [optional] 

### Return type

[**ModelSetVersionSummaryCollection**](ModelSetVersionSummaryCollection.md)

### Authorization

[oauth2AuthCode](../README.md#oauth2AuthCode)

### HTTP request headers

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

