# ModelSet.ModelSetViewsApi

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

Method | HTTP request | Description
------------- | ------------- | -------------
[**createModelSetView**](ModelSetViewsApi.md#createModelSetView) | **POST** /v3/containers/{containerId}/modelsets/{modelSetId}/views | Add model set view
[**deleteModelSetView**](ModelSetViewsApi.md#deleteModelSetView) | **DELETE** /v3/containers/{containerId}/modelsets/{modelSetId}/views/{viewId} | Delete a specific model set view
[**getModelSetView**](ModelSetViewsApi.md#getModelSetView) | **GET** /v3/containers/{containerId}/modelsets/{modelSetId}/views/{viewId} | Get a specific model set view
[**getModelSetViewJob**](ModelSetViewsApi.md#getModelSetViewJob) | **GET** /v3/containers/{containerId}/modelsets/{modelSetId}/views/{viewId}/jobs/{jobId} | Get Model Set View Job.
[**getModelSetViewVersion**](ModelSetViewsApi.md#getModelSetViewVersion) | **GET** /v3/containers/{containerId}/modelsets/{modelSetId}/versions/{version}/views/{viewId} | Get view by model set version
[**getModelSetViewVersions**](ModelSetViewsApi.md#getModelSetViewVersions) | **GET** /v3/containers/{containerId}/modelsets/{modelSetId}/versions/{version}/views | Get views for model set version
[**getModelSetViews**](ModelSetViewsApi.md#getModelSetViews) | **GET** /v3/containers/{containerId}/modelsets/{modelSetId}/views | Get Model Set Views
[**searchModelSetViewLineages**](ModelSetViewsApi.md#searchModelSetViewLineages) | **POST** /v3/containers/{containerId}/modelsets/{modelSetId}/views:lineages | Search model set views by lineage composition
[**updateModelSetView**](ModelSetViewsApi.md#updateModelSetView) | **PATCH** /v3/containers/{containerId}/modelsets/{modelSetId}/views/{viewId} | Update a specific model set view



## createModelSetView

> ModelSetViewJob createModelSetView(containerId, modelSetId, opts)

Add model set view

Adds a view to a given model set.  A view consists of a chosen set of distinct model document lineages which exist within a single model set. The ID of a newly uploaded screenshot can also be supplied, which will associate the screenshot with the newly created view.  The response contains information about the created model set view 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.ModelSetViewsApi();
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 = {
  'newModelSetView': new ModelSet.NewModelSetView() // NewModelSetView | 
};
apiInstance.createModelSetView(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 | 
 **newModelSetView** | [**NewModelSetView**](NewModelSetView.md)|  | [optional] 

### Return type

[**ModelSetViewJob**](ModelSetViewJob.md)

### Authorization

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

### HTTP request headers

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


## deleteModelSetView

> ModelSetViewJob deleteModelSetView(containerId, modelSetId, viewId)

Delete a specific model set view

Deletes a specific model set view based on the view&#39;s ID.  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.ModelSetViewsApi();
var containerId = null; // String | The GUID that uniquely identifies the container
var modelSetId = null; // String | The GUID that uniquely identifies the model set
var viewId = null; // String | The GUID that uniquely identifies the view
apiInstance.deleteModelSetView(containerId, modelSetId, viewId).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 | 
 **viewId** | [**String**](.md)| The GUID that uniquely identifies the view | 

### Return type

[**ModelSetViewJob**](ModelSetViewJob.md)

### Authorization

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

### HTTP request headers

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


## getModelSetView

> ModelSetView getModelSetView(containerId, modelSetId, viewId)

Get a specific model set view

Gets a specific model set view based on the view&#39;s ID.  Returns the requested model set view 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.ModelSetViewsApi();
var containerId = null; // String | The GUID that uniquely identifies the container
var modelSetId = null; // String | The GUID that uniquely identifies the model set
var viewId = null; // String | The GUID that uniquely identifies the view
apiInstance.getModelSetView(containerId, modelSetId, viewId).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 | 
 **viewId** | [**String**](.md)| The GUID that uniquely identifies the view | 

### Return type

[**ModelSetView**](ModelSetView.md)

### Authorization

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

### HTTP request headers

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


## getModelSetViewJob

> ModelSetViewJob getModelSetViewJob(containerId, modelSetId, viewId, jobId)

Get Model Set View Job.

Retrieves information about a given model set view job.  Many PATCH, POST and DELETE calls to model set views endpoints will result in a job. This endpoint can be used to track the progress of these jobs.

### 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.ModelSetViewsApi();
var containerId = null; // String | The GUID that uniquely identifies the container
var modelSetId = null; // String | The GUID that uniquely identifies the model set
var viewId = null; // String | The GUID that uniquely identifies the view
var jobId = null; // String | The GUID that uniquely identifies the job
apiInstance.getModelSetViewJob(containerId, modelSetId, viewId, jobId).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 | 
 **viewId** | [**String**](.md)| The GUID that uniquely identifies the view | 
 **jobId** | [**String**](.md)| The GUID that uniquely identifies the job | 

### Return type

[**ModelSetViewJob**](ModelSetViewJob.md)

### Authorization

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

### HTTP request headers

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


## getModelSetViewVersion

> ModelSetViewVersion getModelSetViewVersion(containerId, modelSetId, version, viewId)

Get view by model set version

Gets a model set view as it exists in a specific model set version.  This operation determines which specific versions of the document lineages contained in the given view are present in the given model set version.  Returns the requested model set view 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.ModelSetViewsApi();
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
var viewId = null; // String | The GUID that uniquely identifies the view
apiInstance.getModelSetViewVersion(containerId, modelSetId, version, viewId).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 | 
 **viewId** | [**String**](.md)| The GUID that uniquely identifies the view | 

### Return type

[**ModelSetViewVersion**](ModelSetViewVersion.md)

### Authorization

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

### HTTP request headers

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


## getModelSetViewVersions

> ModelSetViewVersionCollection getModelSetViewVersions(containerId, modelSetId, version, opts)

Get views for model set version

Gets a list of all model set views in a given model set as they exist in a specific model set version.  This operation determines which specific versions of the document lineages contained in each view are present in the given model set version.  The response contains a list of matching view 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.ModelSetViewsApi();
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
var opts = {
  'pageLimit': 56, // Number | The maximum number of views 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.getModelSetViewVersions(containerId, modelSetId, version, 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 | 
 **version** | **Number**| The model set version number | 
 **pageLimit** | **Number**| The maximum number of views 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

[**ModelSetViewVersionCollection**](ModelSetViewVersionCollection.md)

### Authorization

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

### HTTP request headers

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


## getModelSetViews

> ModelSetViewCollection getModelSetViews(containerId, modelSetId, opts)

Get Model Set Views

Gets a list of model set views in a given model set which match the provided search parameters.  The response contains a list of matching views, 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.ModelSetViewsApi();
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 views 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.
  'createdBy': PD23PXGV8V3V, // String | Filters the returned views by the createdBy property
  'modifiedBy': PD23PXGV8V3V, // String | Filters the returned views by the modifiedBy property
  'after': new Date("2013-10-20T19:20:30+01:00"), // Date | Filters the returned views to those created or modified after the given time
  'before': new Date("2013-10-20T19:20:30+01:00"), // Date | Filters the returned views to those created or modified before the given time
  'isPrivate': true, // Boolean | If set to true, filters the returned views to only those belonging to this user
  'sortBy': [new ModelSet.ViewSortFields()], // [ViewSortFields] | Defines properties to sort the returned views by
  'sortDirection': new ModelSet.SortDirection() // SortDirection | Defines the sort direction
};
apiInstance.getModelSetViews(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 views 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] 
 **createdBy** | **String**| Filters the returned views by the createdBy property | [optional] 
 **modifiedBy** | **String**| Filters the returned views by the modifiedBy property | [optional] 
 **after** | **Date**| Filters the returned views to those created or modified after the given time | [optional] 
 **before** | **Date**| Filters the returned views to those created or modified before the given time | [optional] 
 **isPrivate** | **Boolean**| If set to true, filters the returned views to only those belonging to this user | [optional] 
 **sortBy** | [**[ViewSortFields]**](ViewSortFields.md)| Defines properties to sort the returned views by | [optional] 
 **sortDirection** | [**SortDirection**](.md)| Defines the sort direction | [optional] 

### Return type

[**ModelSetViewCollection**](ModelSetViewCollection.md)

### Authorization

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

### HTTP request headers

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


## searchModelSetViewLineages

> ModelSetViewCollection searchModelSetViewLineages(containerId, modelSetId, opts)

Search model set views by lineage composition

Gets a list of model set views in a given model set which contain the provided set of document lineage URNs. To match the provided list exactly, set the &#x60;exact&#x60; property to true.  The response contains a list of matching views, 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.ModelSetViewsApi();
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 = {
  'exact': true, // Boolean | Whether or not to exactly match the set of lineages passed
  'pageLimit': 56, // Number | The maximum number of views 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.
  'requestBody': ["urn:adsk.wipprod:dm.lineage:jvMF7mrHR7OwG_DToKsJUA"] // [String] | 
};
apiInstance.searchModelSetViewLineages(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 | 
 **exact** | **Boolean**| Whether or not to exactly match the set of lineages passed | [optional] 
 **pageLimit** | **Number**| The maximum number of views 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] 
 **requestBody** | [**[String]**](String.md)|  | [optional] 

### Return type

[**ModelSetViewCollection**](ModelSetViewCollection.md)

### Authorization

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

### HTTP request headers

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


## updateModelSetView

> ModelSetViewJob updateModelSetView(containerId, modelSetId, viewId, opts)

Update a specific model set view

Updates a specific model set view.  * If &#x60;oldName&#x60; and &#x60;newName&#x60; are supplied, the name will be updated (both must be supplied, the name cannot be null) * If &#x60;oldDescription&#x60; or &#x60;newDescription&#x60; is supplied, the description will be updated (one can be null or omitted, description can be set to null) * If &#x60;oldIsPrivate&#x60; and &#x60;newIsPrivate&#x60; are supplied, the privacy of the view will be updated (both must be supplied) * If &#x60;oldDefinition&#x60; and &#x60;newDefinition&#x60; are supplied, the view definition will be updated (both must be supplied) * If the view currently has a screenshot and both &#x60;oldScreenshotId&#x60; and &#x60;newScreenshotId&#x60; are supplied, the screenshot will be updated. If the view currently does not have a screenshot and &#x60;newScreenshotId&#x60; is supplied, then the screenshot will be updated (in this case &#x60;oldScreenshotId&#x60; should NOT be supplied or should be null). Screenshots cannot be removed without being replaced.  If no property changes are supplied, an error is returned.

### 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.ModelSetViewsApi();
var containerId = null; // String | The GUID that uniquely identifies the container
var modelSetId = null; // String | The GUID that uniquely identifies the model set
var viewId = null; // String | The GUID that uniquely identifies the view
var opts = {
  'updateModelSetView': new ModelSet.UpdateModelSetView() // UpdateModelSetView | 
};
apiInstance.updateModelSetView(containerId, modelSetId, viewId, 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 | 
 **viewId** | [**String**](.md)| The GUID that uniquely identifies the view | 
 **updateModelSetView** | [**UpdateModelSetView**](UpdateModelSetView.md)|  | [optional] 

### Return type

[**ModelSetViewJob**](ModelSetViewJob.md)

### Authorization

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

### HTTP request headers

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

