# VmosoApi.ReferenceApi

All URIs are relative to *https://www.vmoso.com/svc*

Method | HTTP request | Description
------------- | ------------- | -------------
[**getObjectReferences**](ReferenceApi.md#getObjectReferences) | **GET** /reference/{key} | 
[**getReferences**](ReferenceApi.md#getReferences) | **GET** /reference/list | 
[**updateReferences**](ReferenceApi.md#updateReferences) | **PUT** /references/{parentKey}/update | 


<a name="getObjectReferences"></a>
# **getObjectReferences**
> GetReferencesResult getObjectReferences(key, type, opts)



Use this API to get object references.

### Example
```javascript
var VmosoApi = require('vmoso-api');
var defaultClient = VmosoApi.ApiClient.default;

// Configure API key authorization: vmoso_auth
var vmoso_auth = defaultClient.authentications['vmoso_auth'];
vmoso_auth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//vmoso_auth.apiKeyPrefix['X-CV-Authorization'] = "Token"

var apiInstance = new VmosoApi.ReferenceApi()

var key = "key_example"; // {String} object key

var type = "type_example"; // {String} Type of references, whether this method should return entities referencing activities (outbound) or entities referenced by activities (inbound). Possible values are 'inbound', 'outbound' or 'all' (default)

var opts = { 
  'link': "link_example", // {String} Filter list of references by type of reference link. Posssible values are 'at', 'hash', 'ampersand' or . Default is 'all'
  'pg': "pg_example" // {String} pagination
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getObjectReferences(key, type, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **key** | **String**| object key | 
 **type** | **String**| Type of references, whether this method should return entities referencing activities (outbound) or entities referenced by activities (inbound). Possible values are &#39;inbound&#39;, &#39;outbound&#39; or &#39;all&#39; (default) | 
 **link** | **String**| Filter list of references by type of reference link. Posssible values are &#39;at&#39;, &#39;hash&#39;, &#39;ampersand&#39; or . Default is &#39;all&#39; | [optional] 
 **pg** | **String**| pagination | [optional] 

### Return type

[**GetReferencesResult**](GetReferencesResult.md)

### Authorization

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

### HTTP reuqest headers

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

<a name="getReferences"></a>
# **getReferences**
> GetReferencesResult getReferences(objectKey, type, opts)



Use this API to get the reference object list by key.

### Example
```javascript
var VmosoApi = require('vmoso-api');
var defaultClient = VmosoApi.ApiClient.default;

// Configure API key authorization: vmoso_auth
var vmoso_auth = defaultClient.authentications['vmoso_auth'];
vmoso_auth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//vmoso_auth.apiKeyPrefix['X-CV-Authorization'] = "Token"

var apiInstance = new VmosoApi.ReferenceApi()

var objectKey = "objectKey_example"; // {String} Object ID.

var type = "type_example"; // {String} Reference type. Options are: at, hash, ampersand

var opts = { 
  'pg': "pg_example" // {String} Pagination options. 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getReferences(objectKey, type, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **objectKey** | **String**| Object ID. | 
 **type** | **String**| Reference type. Options are: at, hash, ampersand | 
 **pg** | **String**| Pagination options.  | [optional] 

### Return type

[**GetReferencesResult**](GetReferencesResult.md)

### Authorization

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

### HTTP reuqest headers

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

<a name="updateReferences"></a>
# **updateReferences**
> UpdateReferencesResult updateReferences(parentKey, input)



Use this API to update a reference.

### Example
```javascript
var VmosoApi = require('vmoso-api');
var defaultClient = VmosoApi.ApiClient.default;

// Configure API key authorization: vmoso_auth
var vmoso_auth = defaultClient.authentications['vmoso_auth'];
vmoso_auth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//vmoso_auth.apiKeyPrefix['X-CV-Authorization'] = "Token"

var apiInstance = new VmosoApi.ReferenceApi()

var parentKey = "parentKey_example"; // {String} 

var input = new VmosoApi.UpdateReferencesInput(); // {UpdateReferencesInput} 


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateReferences(parentKey, input, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **parentKey** | **String**|  | 
 **input** | [**UpdateReferencesInput**](UpdateReferencesInput.md)|  | 

### Return type

[**UpdateReferencesResult**](UpdateReferencesResult.md)

### Authorization

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

### HTTP reuqest headers

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

