Onshape REST API

Accounts

cancelPurchaseNew

Cancel Recurring Subscription


/api/accounts/{aid}/purchases/{pid}

Usage and SDK Samples

curl -X DELETE "http://localhost/api/accounts/{aid}/purchases/{pid}?cancelImmediately="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AccountsApi;

import java.io.File;
import java.util.*;

public class AccountsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        AccountsApi apiInstance = new AccountsApi();
        String aid = aid_example; // String | 
        String pid = pid_example; // String | 
        Boolean cancelImmediately = true; // Boolean | 
        try {
            apiInstance.cancelPurchaseNew(aid, pid, cancelImmediately);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountsApi#cancelPurchaseNew");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.AccountsApi;

public class AccountsApiExample {

    public static void main(String[] args) {
        AccountsApi apiInstance = new AccountsApi();
        String aid = aid_example; // String | 
        String pid = pid_example; // String | 
        Boolean cancelImmediately = true; // Boolean | 
        try {
            apiInstance.cancelPurchaseNew(aid, pid, cancelImmediately);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountsApi#cancelPurchaseNew");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *aid = aid_example; //  (default to null)
String *pid = pid_example; //  (default to null)
Boolean *cancelImmediately = true; //  (optional) (default to false)

AccountsApi *apiInstance = [[AccountsApi alloc] init];

// Cancel Recurring Subscription
[apiInstance cancelPurchaseNewWith:aid
    pid:pid
    cancelImmediately:cancelImmediately
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OnshapeRestApi = require('onshape_rest_api');
var defaultClient = OnshapeRestApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new OnshapeRestApi.AccountsApi()
var aid = aid_example; // {String} 
var pid = pid_example; // {String} 
var opts = {
  'cancelImmediately': true // {Boolean} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.cancelPurchaseNew(aid, pid, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class cancelPurchaseNewExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new AccountsApi();
            var aid = aid_example;  // String |  (default to null)
            var pid = pid_example;  // String |  (default to null)
            var cancelImmediately = true;  // Boolean |  (optional)  (default to false)

            try
            {
                // Cancel Recurring Subscription
                apiInstance.cancelPurchaseNew(aid, pid, cancelImmediately);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccountsApi.cancelPurchaseNew: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new OpenAPITools\Client\Api\AccountsApi();
$aid = aid_example; // String | 
$pid = pid_example; // String | 
$cancelImmediately = true; // Boolean | 

try {
    $api_instance->cancelPurchaseNew($aid, $pid, $cancelImmediately);
} catch (Exception $e) {
    echo 'Exception when calling AccountsApi->cancelPurchaseNew: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AccountsApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::OPenAPIClient::AccountsApi->new();
my $aid = aid_example; # String | 
my $pid = pid_example; # String | 
my $cancelImmediately = true; # Boolean | 

eval { 
    $api_instance->cancelPurchaseNew(aid => $aid, pid => $pid, cancelImmediately => $cancelImmediately);
};
if ($@) {
    warn "Exception when calling AccountsApi->cancelPurchaseNew: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.AccountsApi()
aid = aid_example # String |  (default to null)
pid = pid_example # String |  (default to null)
cancelImmediately = true # Boolean |  (optional) (default to false)

try: 
    # Cancel Recurring Subscription
    api_instance.cancel_purchase_new(aid, pid, cancelImmediately=cancelImmediately)
except ApiException as e:
    print("Exception when calling AccountsApi->cancelPurchaseNew: %s\n" % e)
extern crate AccountsApi;

pub fn main() {
    let aid = aid_example; // String
    let pid = pid_example; // String
    let cancelImmediately = true; // Boolean

    let mut context = AccountsApi::Context::default();
    let result = client.cancelPurchaseNew(aid, pid, cancelImmediately, &context).wait();
    println!("{:?}", result);

}

Scopes

OAuth2Internal Application is Onshape Internal
OAuth2ReadPII Application can read your profile information
OAuth2Read Application can read your documents
OAuth2Write Application can write to your documents
OAuth2Delete Application can delete your documents and workspaces
OAuth2Purchase Application can request purchases on your behalf
OAuth2Share Application can share and unshare documents on your behalf

Parameters

Path parameters
Name Description
aid*
String
Required
pid*
String
Required
Query parameters
Name Description
cancelImmediately
Boolean

Responses


consumePurchase

Mark Purchase Consumed For User


/api/accounts/purchases/{pid}/consume

Usage and SDK Samples

curl -X POST "http://localhost/api/accounts/purchases/{pid}/consume"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AccountsApi;

import java.io.File;
import java.util.*;

public class AccountsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        AccountsApi apiInstance = new AccountsApi();
        String pid = pid_example; // String | 
        BTPurchaseUserParams bTPurchaseUserParams = ; // BTPurchaseUserParams | 
        try {
            BTPurchaseInfo result = apiInstance.consumePurchase(pid, bTPurchaseUserParams);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountsApi#consumePurchase");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.AccountsApi;

public class AccountsApiExample {

    public static void main(String[] args) {
        AccountsApi apiInstance = new AccountsApi();
        String pid = pid_example; // String | 
        BTPurchaseUserParams bTPurchaseUserParams = ; // BTPurchaseUserParams | 
        try {
            BTPurchaseInfo result = apiInstance.consumePurchase(pid, bTPurchaseUserParams);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountsApi#consumePurchase");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *pid = pid_example; //  (default to null)
BTPurchaseUserParams *bTPurchaseUserParams = ; //  (optional)

AccountsApi *apiInstance = [[AccountsApi alloc] init];

// Mark Purchase Consumed For User
[apiInstance consumePurchaseWith:pid
    bTPurchaseUserParams:bTPurchaseUserParams
              completionHandler: ^(BTPurchaseInfo output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OnshapeRestApi = require('onshape_rest_api');
var defaultClient = OnshapeRestApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new OnshapeRestApi.AccountsApi()
var pid = pid_example; // {String} 
var opts = {
  'bTPurchaseUserParams':  // {BTPurchaseUserParams} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.consumePurchase(pid, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class consumePurchaseExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new AccountsApi();
            var pid = pid_example;  // String |  (default to null)
            var bTPurchaseUserParams = new BTPurchaseUserParams(); // BTPurchaseUserParams |  (optional) 

            try
            {
                // Mark Purchase Consumed For User
                BTPurchaseInfo result = apiInstance.consumePurchase(pid, bTPurchaseUserParams);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccountsApi.consumePurchase: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new OpenAPITools\Client\Api\AccountsApi();
$pid = pid_example; // String | 
$bTPurchaseUserParams = ; // BTPurchaseUserParams | 

try {
    $result = $api_instance->consumePurchase($pid, $bTPurchaseUserParams);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountsApi->consumePurchase: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AccountsApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::OPenAPIClient::AccountsApi->new();
my $pid = pid_example; # String | 
my $bTPurchaseUserParams = WWW::OPenAPIClient::Object::BTPurchaseUserParams->new(); # BTPurchaseUserParams | 

eval { 
    my $result = $api_instance->consumePurchase(pid => $pid, bTPurchaseUserParams => $bTPurchaseUserParams);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AccountsApi->consumePurchase: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.AccountsApi()
pid = pid_example # String |  (default to null)
bTPurchaseUserParams =  # BTPurchaseUserParams |  (optional)

try: 
    # Mark Purchase Consumed For User
    api_response = api_instance.consume_purchase(pid, bTPurchaseUserParams=bTPurchaseUserParams)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountsApi->consumePurchase: %s\n" % e)
extern crate AccountsApi;

pub fn main() {
    let pid = pid_example; // String
    let bTPurchaseUserParams = ; // BTPurchaseUserParams

    let mut context = AccountsApi::Context::default();
    let result = client.consumePurchase(pid, bTPurchaseUserParams, &context).wait();
    println!("{:?}", result);

}

Scopes

OAuth2Internal Application is Onshape Internal
OAuth2ReadPII Application can read your profile information
OAuth2Read Application can read your documents
OAuth2Write Application can write to your documents
OAuth2Delete Application can delete your documents and workspaces
OAuth2Purchase Application can request purchases on your behalf
OAuth2Share Application can share and unshare documents on your behalf

Parameters

Path parameters
Name Description
pid*
String
Required
Body parameters
Name Description
bTPurchaseUserParams

Responses


getPlanPurchases

Get Plan Purchases


/api/accounts/plans/{planId}/purchases

Usage and SDK Samples

curl -X GET "http://localhost/api/accounts/plans/{planId}/purchases?offset=&limit="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AccountsApi;

import java.io.File;
import java.util.*;

public class AccountsApiExample {

    public static void main(String[] args) {
        
        AccountsApi apiInstance = new AccountsApi();
        String planId = planId_example; // String | 
        Integer offset = 56; // Integer | 
        Integer limit = 56; // Integer | 
        try {
            BTListResponseBTPurchaseInfo result = apiInstance.getPlanPurchases(planId, offset, limit);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountsApi#getPlanPurchases");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.AccountsApi;

public class AccountsApiExample {

    public static void main(String[] args) {
        AccountsApi apiInstance = new AccountsApi();
        String planId = planId_example; // String | 
        Integer offset = 56; // Integer | 
        Integer limit = 56; // Integer | 
        try {
            BTListResponseBTPurchaseInfo result = apiInstance.getPlanPurchases(planId, offset, limit);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountsApi#getPlanPurchases");
            e.printStackTrace();
        }
    }
}
String *planId = planId_example; //  (default to null)
Integer *offset = 56; //  (optional) (default to 0)
Integer *limit = 56; //  (optional) (default to 20)

AccountsApi *apiInstance = [[AccountsApi alloc] init];

// Get Plan Purchases
[apiInstance getPlanPurchasesWith:planId
    offset:offset
    limit:limit
              completionHandler: ^(BTListResponseBTPurchaseInfo output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OnshapeRestApi = require('onshape_rest_api');

var api = new OnshapeRestApi.AccountsApi()
var planId = planId_example; // {String} 
var opts = {
  'offset': 56, // {Integer} 
  'limit': 56 // {Integer} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getPlanPurchases(planId, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getPlanPurchasesExample
    {
        public void main()
        {
            
            var apiInstance = new AccountsApi();
            var planId = planId_example;  // String |  (default to null)
            var offset = 56;  // Integer |  (optional)  (default to 0)
            var limit = 56;  // Integer |  (optional)  (default to 20)

            try
            {
                // Get Plan Purchases
                BTListResponseBTPurchaseInfo result = apiInstance.getPlanPurchases(planId, offset, limit);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccountsApi.getPlanPurchases: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new OpenAPITools\Client\Api\AccountsApi();
$planId = planId_example; // String | 
$offset = 56; // Integer | 
$limit = 56; // Integer | 

try {
    $result = $api_instance->getPlanPurchases($planId, $offset, $limit);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountsApi->getPlanPurchases: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AccountsApi;

my $api_instance = WWW::OPenAPIClient::AccountsApi->new();
my $planId = planId_example; # String | 
my $offset = 56; # Integer | 
my $limit = 56; # Integer | 

eval { 
    my $result = $api_instance->getPlanPurchases(planId => $planId, offset => $offset, limit => $limit);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AccountsApi->getPlanPurchases: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = openapi_client.AccountsApi()
planId = planId_example # String |  (default to null)
offset = 56 # Integer |  (optional) (default to 0)
limit = 56 # Integer |  (optional) (default to 20)

try: 
    # Get Plan Purchases
    api_response = api_instance.get_plan_purchases(planId, offset=offset, limit=limit)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountsApi->getPlanPurchases: %s\n" % e)
extern crate AccountsApi;

pub fn main() {
    let planId = planId_example; // String
    let offset = 56; // Integer
    let limit = 56; // Integer

    let mut context = AccountsApi::Context::default();
    let result = client.getPlanPurchases(planId, offset, limit, &context).wait();
    println!("{:?}", result);

}

Scopes

Parameters

Path parameters
Name Description
planId*
String
Required
Query parameters
Name Description
offset
Integer (int32)
limit
Integer (int32)

Responses


getPurchases

Get User's Appstore Purchases.


/api/accounts/purchases

Usage and SDK Samples

curl -X GET "http://localhost/api/accounts/purchases?all=&ownPurchaseOnly="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AccountsApi;

import java.io.File;
import java.util.*;

public class AccountsApiExample {

    public static void main(String[] args) {
        
        AccountsApi apiInstance = new AccountsApi();
        Boolean all = true; // Boolean | 
        Boolean ownPurchaseOnly = true; // Boolean | 
        try {
            array[BTPurchaseInfo] result = apiInstance.getPurchases(all, ownPurchaseOnly);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountsApi#getPurchases");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.AccountsApi;

public class AccountsApiExample {

    public static void main(String[] args) {
        AccountsApi apiInstance = new AccountsApi();
        Boolean all = true; // Boolean | 
        Boolean ownPurchaseOnly = true; // Boolean | 
        try {
            array[BTPurchaseInfo] result = apiInstance.getPurchases(all, ownPurchaseOnly);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountsApi#getPurchases");
            e.printStackTrace();
        }
    }
}
Boolean *all = true; //  (optional) (default to false)
Boolean *ownPurchaseOnly = true; //  (optional) (default to false)

AccountsApi *apiInstance = [[AccountsApi alloc] init];

// Get User's Appstore Purchases.
[apiInstance getPurchasesWith:all
    ownPurchaseOnly:ownPurchaseOnly
              completionHandler: ^(array[BTPurchaseInfo] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OnshapeRestApi = require('onshape_rest_api');

var api = new OnshapeRestApi.AccountsApi()
var opts = {
  'all': true, // {Boolean} 
  'ownPurchaseOnly': true // {Boolean} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getPurchases(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getPurchasesExample
    {
        public void main()
        {
            
            var apiInstance = new AccountsApi();
            var all = true;  // Boolean |  (optional)  (default to false)
            var ownPurchaseOnly = true;  // Boolean |  (optional)  (default to false)

            try
            {
                // Get User's Appstore Purchases.
                array[BTPurchaseInfo] result = apiInstance.getPurchases(all, ownPurchaseOnly);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccountsApi.getPurchases: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new OpenAPITools\Client\Api\AccountsApi();
$all = true; // Boolean | 
$ownPurchaseOnly = true; // Boolean | 

try {
    $result = $api_instance->getPurchases($all, $ownPurchaseOnly);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountsApi->getPurchases: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AccountsApi;

my $api_instance = WWW::OPenAPIClient::AccountsApi->new();
my $all = true; # Boolean | 
my $ownPurchaseOnly = true; # Boolean | 

eval { 
    my $result = $api_instance->getPurchases(all => $all, ownPurchaseOnly => $ownPurchaseOnly);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AccountsApi->getPurchases: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = openapi_client.AccountsApi()
all = true # Boolean |  (optional) (default to false)
ownPurchaseOnly = true # Boolean |  (optional) (default to false)

try: 
    # Get User's Appstore Purchases.
    api_response = api_instance.get_purchases(all=all, ownPurchaseOnly=ownPurchaseOnly)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountsApi->getPurchases: %s\n" % e)
extern crate AccountsApi;

pub fn main() {
    let all = true; // Boolean
    let ownPurchaseOnly = true; // Boolean

    let mut context = AccountsApi::Context::default();
    let result = client.getPurchases(all, ownPurchaseOnly, &context).wait();
    println!("{:?}", result);

}

Scopes

Parameters

Query parameters
Name Description
all
Boolean
ownPurchaseOnly
Boolean

Responses


AppElements

commitTransaction

Commit Transaction


/api/appelements/d/{did}/w/{wid}/e/{eid}/transactions/{tid}

Usage and SDK Samples

curl -X POST "http://localhost/api/appelements/d/{did}/w/{wid}/e/{eid}/transactions/{tid}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AppElementsApi;

import java.io.File;
import java.util.*;

public class AppElementsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        AppElementsApi apiInstance = new AppElementsApi();
        String did = did_example; // String | 
        String eid = eid_example; // String | 
        String wid = wid_example; // String | 
        String tid = tid_example; // String | 
        BTAppElementCommitTransactionParams bTAppElementCommitTransactionParams = ; // BTAppElementCommitTransactionParams | 
        try {
            BTAppElementModifyInfo result = apiInstance.commitTransaction(did, eid, wid, tid, bTAppElementCommitTransactionParams);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AppElementsApi#commitTransaction");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.AppElementsApi;

public class AppElementsApiExample {

    public static void main(String[] args) {
        AppElementsApi apiInstance = new AppElementsApi();
        String did = did_example; // String | 
        String eid = eid_example; // String | 
        String wid = wid_example; // String | 
        String tid = tid_example; // String | 
        BTAppElementCommitTransactionParams bTAppElementCommitTransactionParams = ; // BTAppElementCommitTransactionParams | 
        try {
            BTAppElementModifyInfo result = apiInstance.commitTransaction(did, eid, wid, tid, bTAppElementCommitTransactionParams);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AppElementsApi#commitTransaction");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *did = did_example; //  (default to null)
String *eid = eid_example; //  (default to null)
String *wid = wid_example; //  (default to null)
String *tid = tid_example; //  (default to null)
BTAppElementCommitTransactionParams *bTAppElementCommitTransactionParams = ; // 

AppElementsApi *apiInstance = [[AppElementsApi alloc] init];

// Commit Transaction
[apiInstance commitTransactionWith:did
    eid:eid
    wid:wid
    tid:tid
    bTAppElementCommitTransactionParams:bTAppElementCommitTransactionParams
              completionHandler: ^(BTAppElementModifyInfo output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OnshapeRestApi = require('onshape_rest_api');
var defaultClient = OnshapeRestApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new OnshapeRestApi.AppElementsApi()
var did = did_example; // {String} 
var eid = eid_example; // {String} 
var wid = wid_example; // {String} 
var tid = tid_example; // {String} 
var bTAppElementCommitTransactionParams = ; // {BTAppElementCommitTransactionParams} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.commitTransaction(did, eid, wid, tid, bTAppElementCommitTransactionParams, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class commitTransactionExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new AppElementsApi();
            var did = did_example;  // String |  (default to null)
            var eid = eid_example;  // String |  (default to null)
            var wid = wid_example;  // String |  (default to null)
            var tid = tid_example;  // String |  (default to null)
            var bTAppElementCommitTransactionParams = new BTAppElementCommitTransactionParams(); // BTAppElementCommitTransactionParams | 

            try
            {
                // Commit Transaction
                BTAppElementModifyInfo result = apiInstance.commitTransaction(did, eid, wid, tid, bTAppElementCommitTransactionParams);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AppElementsApi.commitTransaction: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new OpenAPITools\Client\Api\AppElementsApi();
$did = did_example; // String | 
$eid = eid_example; // String | 
$wid = wid_example; // String | 
$tid = tid_example; // String | 
$bTAppElementCommitTransactionParams = ; // BTAppElementCommitTransactionParams | 

try {
    $result = $api_instance->commitTransaction($did, $eid, $wid, $tid, $bTAppElementCommitTransactionParams);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AppElementsApi->commitTransaction: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AppElementsApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::OPenAPIClient::AppElementsApi->new();
my $did = did_example; # String | 
my $eid = eid_example; # String | 
my $wid = wid_example; # String | 
my $tid = tid_example; # String | 
my $bTAppElementCommitTransactionParams = WWW::OPenAPIClient::Object::BTAppElementCommitTransactionParams->new(); # BTAppElementCommitTransactionParams | 

eval { 
    my $result = $api_instance->commitTransaction(did => $did, eid => $eid, wid => $wid, tid => $tid, bTAppElementCommitTransactionParams => $bTAppElementCommitTransactionParams);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AppElementsApi->commitTransaction: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.AppElementsApi()
did = did_example # String |  (default to null)
eid = eid_example # String |  (default to null)
wid = wid_example # String |  (default to null)
tid = tid_example # String |  (default to null)
bTAppElementCommitTransactionParams =  # BTAppElementCommitTransactionParams | 

try: 
    # Commit Transaction
    api_response = api_instance.commit_transaction(did, eid, wid, tid, bTAppElementCommitTransactionParams)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AppElementsApi->commitTransaction: %s\n" % e)
extern crate AppElementsApi;

pub fn main() {
    let did = did_example; // String
    let eid = eid_example; // String
    let wid = wid_example; // String
    let tid = tid_example; // String
    let bTAppElementCommitTransactionParams = ; // BTAppElementCommitTransactionParams

    let mut context = AppElementsApi::Context::default();
    let result = client.commitTransaction(did, eid, wid, tid, bTAppElementCommitTransactionParams, &context).wait();
    println!("{:?}", result);

}

Scopes

OAuth2Internal Application is Onshape Internal
OAuth2ReadPII Application can read your profile information
OAuth2Read Application can read your documents
OAuth2Write Application can write to your documents
OAuth2Delete Application can delete your documents and workspaces
OAuth2Purchase Application can request purchases on your behalf
OAuth2Share Application can share and unshare documents on your behalf

Parameters

Path parameters
Name Description
did*
String
Required
eid*
String
Required
wid*
String
Required
tid*
String
Required
Body parameters
Name Description
bTAppElementCommitTransactionParams *

Responses


create7

Create Element.


/api/appelements/d/{did}/w/{wid}

Usage and SDK Samples

curl -X POST "http://localhost/api/appelements/d/{did}/w/{wid}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AppElementsApi;

import java.io.File;
import java.util.*;

public class AppElementsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        AppElementsApi apiInstance = new AppElementsApi();
        String did = did_example; // String | 
        String wid = wid_example; // String | 
        BTAppElementParams bTAppElementParams = ; // BTAppElementParams | 
        try {
            BTAppElementModifyInfo result = apiInstance.create7(did, wid, bTAppElementParams);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AppElementsApi#create7");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.AppElementsApi;

public class AppElementsApiExample {

    public static void main(String[] args) {
        AppElementsApi apiInstance = new AppElementsApi();
        String did = did_example; // String | 
        String wid = wid_example; // String | 
        BTAppElementParams bTAppElementParams = ; // BTAppElementParams | 
        try {
            BTAppElementModifyInfo result = apiInstance.create7(did, wid, bTAppElementParams);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AppElementsApi#create7");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *did = did_example; //  (default to null)
String *wid = wid_example; //  (default to null)
BTAppElementParams *bTAppElementParams = ; // 

AppElementsApi *apiInstance = [[AppElementsApi alloc] init];

// Create Element.
[apiInstance create7With:did
    wid:wid
    bTAppElementParams:bTAppElementParams
              completionHandler: ^(BTAppElementModifyInfo output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OnshapeRestApi = require('onshape_rest_api');
var defaultClient = OnshapeRestApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new OnshapeRestApi.AppElementsApi()
var did = did_example; // {String} 
var wid = wid_example; // {String} 
var bTAppElementParams = ; // {BTAppElementParams} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.create7(did, wid, bTAppElementParams, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class create7Example
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new AppElementsApi();
            var did = did_example;  // String |  (default to null)
            var wid = wid_example;  // String |  (default to null)
            var bTAppElementParams = new BTAppElementParams(); // BTAppElementParams | 

            try
            {
                // Create Element.
                BTAppElementModifyInfo result = apiInstance.create7(did, wid, bTAppElementParams);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AppElementsApi.create7: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new OpenAPITools\Client\Api\AppElementsApi();
$did = did_example; // String | 
$wid = wid_example; // String | 
$bTAppElementParams = ; // BTAppElementParams | 

try {
    $result = $api_instance->create7($did, $wid, $bTAppElementParams);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AppElementsApi->create7: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AppElementsApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::OPenAPIClient::AppElementsApi->new();
my $did = did_example; # String | 
my $wid = wid_example; # String | 
my $bTAppElementParams = WWW::OPenAPIClient::Object::BTAppElementParams->new(); # BTAppElementParams | 

eval { 
    my $result = $api_instance->create7(did => $did, wid => $wid, bTAppElementParams => $bTAppElementParams);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AppElementsApi->create7: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.AppElementsApi()
did = did_example # String |  (default to null)
wid = wid_example # String |  (default to null)
bTAppElementParams =  # BTAppElementParams | 

try: 
    # Create Element.
    api_response = api_instance.create7(did, wid, bTAppElementParams)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AppElementsApi->create7: %s\n" % e)
extern crate AppElementsApi;

pub fn main() {
    let did = did_example; // String
    let wid = wid_example; // String
    let bTAppElementParams = ; // BTAppElementParams

    let mut context = AppElementsApi::Context::default();
    let result = client.create7(did, wid, bTAppElementParams, &context).wait();
    println!("{:?}", result);

}

Scopes

OAuth2Internal Application is Onshape Internal
OAuth2ReadPII Application can read your profile information
OAuth2Read Application can read your documents
OAuth2Write Application can write to your documents
OAuth2Delete Application can delete your documents and workspaces
OAuth2Purchase Application can request purchases on your behalf
OAuth2Share Application can share and unshare documents on your behalf

Parameters

Path parameters
Name Description
did*
String
Required
wid*
String
Required
Body parameters
Name Description
bTAppElementParams *

Responses


createReference1

Create Reference


/api/appelements/d/{did}/{wvm}/{wvmid}/e/{eid}/references

Usage and SDK Samples

curl -X POST "http://localhost/api/appelements/d/{did}/{wvm}/{wvmid}/e/{eid}/references"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AppElementsApi;

import java.io.File;
import java.util.*;

public class AppElementsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        AppElementsApi apiInstance = new AppElementsApi();
        String did = did_example; // String | 
        String eid = eid_example; // String | 
        String wvm = wvm_example; // String | 
        String wvmid = wvmid_example; // String | 
        BTAppElementReferenceParams bTAppElementReferenceParams = ; // BTAppElementReferenceParams | 
        try {
            BTAppElementReferenceInfo result = apiInstance.createReference1(did, eid, wvm, wvmid, bTAppElementReferenceParams);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AppElementsApi#createReference1");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.AppElementsApi;

public class AppElementsApiExample {

    public static void main(String[] args) {
        AppElementsApi apiInstance = new AppElementsApi();
        String did = did_example; // String | 
        String eid = eid_example; // String | 
        String wvm = wvm_example; // String | 
        String wvmid = wvmid_example; // String | 
        BTAppElementReferenceParams bTAppElementReferenceParams = ; // BTAppElementReferenceParams | 
        try {
            BTAppElementReferenceInfo result = apiInstance.createReference1(did, eid, wvm, wvmid, bTAppElementReferenceParams);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AppElementsApi#createReference1");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *did = did_example; //  (default to null)
String *eid = eid_example; //  (default to null)
String *wvm = wvm_example; //  (default to null)
String *wvmid = wvmid_example; //  (default to null)
BTAppElementReferenceParams *bTAppElementReferenceParams = ; // 

AppElementsApi *apiInstance = [[AppElementsApi alloc] init];

// Create Reference
[apiInstance createReference1With:did
    eid:eid
    wvm:wvm
    wvmid:wvmid
    bTAppElementReferenceParams:bTAppElementReferenceParams
              completionHandler: ^(BTAppElementReferenceInfo output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OnshapeRestApi = require('onshape_rest_api');
var defaultClient = OnshapeRestApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new OnshapeRestApi.AppElementsApi()
var did = did_example; // {String} 
var eid = eid_example; // {String} 
var wvm = wvm_example; // {String} 
var wvmid = wvmid_example; // {String} 
var bTAppElementReferenceParams = ; // {BTAppElementReferenceParams} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createReference1(did, eid, wvm, wvmid, bTAppElementReferenceParams, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createReference1Example
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new AppElementsApi();
            var did = did_example;  // String |  (default to null)
            var eid = eid_example;  // String |  (default to null)
            var wvm = wvm_example;  // String |  (default to null)
            var wvmid = wvmid_example;  // String |  (default to null)
            var bTAppElementReferenceParams = new BTAppElementReferenceParams(); // BTAppElementReferenceParams | 

            try
            {
                // Create Reference
                BTAppElementReferenceInfo result = apiInstance.createReference1(did, eid, wvm, wvmid, bTAppElementReferenceParams);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AppElementsApi.createReference1: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new OpenAPITools\Client\Api\AppElementsApi();
$did = did_example; // String | 
$eid = eid_example; // String | 
$wvm = wvm_example; // String | 
$wvmid = wvmid_example; // String | 
$bTAppElementReferenceParams = ; // BTAppElementReferenceParams | 

try {
    $result = $api_instance->createReference1($did, $eid, $wvm, $wvmid, $bTAppElementReferenceParams);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AppElementsApi->createReference1: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AppElementsApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::OPenAPIClient::AppElementsApi->new();
my $did = did_example; # String | 
my $eid = eid_example; # String | 
my $wvm = wvm_example; # String | 
my $wvmid = wvmid_example; # String | 
my $bTAppElementReferenceParams = WWW::OPenAPIClient::Object::BTAppElementReferenceParams->new(); # BTAppElementReferenceParams | 

eval { 
    my $result = $api_instance->createReference1(did => $did, eid => $eid, wvm => $wvm, wvmid => $wvmid, bTAppElementReferenceParams => $bTAppElementReferenceParams);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AppElementsApi->createReference1: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.AppElementsApi()
did = did_example # String |  (default to null)
eid = eid_example # String |  (default to null)
wvm = wvm_example # String |  (default to null)
wvmid = wvmid_example # String |  (default to null)
bTAppElementReferenceParams =  # BTAppElementReferenceParams | 

try: 
    # Create Reference
    api_response = api_instance.create_reference1(did, eid, wvm, wvmid, bTAppElementReferenceParams)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AppElementsApi->createReference1: %s\n" % e)
extern crate AppElementsApi;

pub fn main() {
    let did = did_example; // String
    let eid = eid_example; // String
    let wvm = wvm_example; // String
    let wvmid = wvmid_example; // String
    let bTAppElementReferenceParams = ; // BTAppElementReferenceParams

    let mut context = AppElementsApi::Context::default();
    let result = client.createReference1(did, eid, wvm, wvmid, bTAppElementReferenceParams, &context).wait();
    println!("{:?}", result);

}

Scopes

OAuth2Internal Application is Onshape Internal
OAuth2ReadPII Application can read your profile information
OAuth2Read Application can read your documents
OAuth2Write Application can write to your documents
OAuth2Delete Application can delete your documents and workspaces
OAuth2Purchase Application can request purchases on your behalf
OAuth2Share Application can share and unshare documents on your behalf

Parameters

Path parameters
Name Description
did*
String
Required
eid*
String
Required
wvm*
String
Required
wvmid*
String
Required
Body parameters
Name Description
bTAppElementReferenceParams *

Responses


deleteContent1

Delete a Sub-element


/api/appelements/d/{did}/{wvm}/{wvmid}/e/{eid}/content/subelements/{sid}

Usage and SDK Samples

curl -X DELETE "http://localhost/api/appelements/d/{did}/{wvm}/{wvmid}/e/{eid}/content/subelements/{sid}?transactionId=&parentChangeId=&description="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AppElementsApi;

import java.io.File;
import java.util.*;

public class AppElementsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        AppElementsApi apiInstance = new AppElementsApi();
        String did = did_example; // String | 
        String eid = eid_example; // String | 
        String wvm = wvm_example; // String | 
        String wvmid = wvmid_example; // String | 
        String sid = sid_example; // String | 
        String transactionId = transactionId_example; // String | 
        String parentChangeId = parentChangeId_example; // String | 
        String description = description_example; // String | 
        try {
            BTAppElementModifyInfo result = apiInstance.deleteContent1(did, eid, wvm, wvmid, sid, transactionId, parentChangeId, description);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AppElementsApi#deleteContent1");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.AppElementsApi;

public class AppElementsApiExample {

    public static void main(String[] args) {
        AppElementsApi apiInstance = new AppElementsApi();
        String did = did_example; // String | 
        String eid = eid_example; // String | 
        String wvm = wvm_example; // String | 
        String wvmid = wvmid_example; // String | 
        String sid = sid_example; // String | 
        String transactionId = transactionId_example; // String | 
        String parentChangeId = parentChangeId_example; // String | 
        String description = description_example; // String | 
        try {
            BTAppElementModifyInfo result = apiInstance.deleteContent1(did, eid, wvm, wvmid, sid, transactionId, parentChangeId, description);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AppElementsApi#deleteContent1");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *did = did_example; //  (default to null)
String *eid = eid_example; //  (default to null)
String *wvm = wvm_example; //  (default to null)
String *wvmid = wvmid_example; //  (default to null)
String *sid = sid_example; //  (default to null)
String *transactionId = transactionId_example; //  (optional) (default to null)
String *parentChangeId = parentChangeId_example; //  (optional) (default to null)
String *description = description_example; //  (optional) (default to null)

AppElementsApi *apiInstance = [[AppElementsApi alloc] init];

// Delete a Sub-element
[apiInstance deleteContent1With:did
    eid:eid
    wvm:wvm
    wvmid:wvmid
    sid:sid
    transactionId:transactionId
    parentChangeId:parentChangeId
    description:description
              completionHandler: ^(BTAppElementModifyInfo output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OnshapeRestApi = require('onshape_rest_api');
var defaultClient = OnshapeRestApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new OnshapeRestApi.AppElementsApi()
var did = did_example; // {String} 
var eid = eid_example; // {String} 
var wvm = wvm_example; // {String} 
var wvmid = wvmid_example; // {String} 
var sid = sid_example; // {String} 
var opts = {
  'transactionId': transactionId_example, // {String} 
  'parentChangeId': parentChangeId_example, // {String} 
  'description': description_example // {String} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.deleteContent1(did, eid, wvm, wvmid, sid, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class deleteContent1Example
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new AppElementsApi();
            var did = did_example;  // String |  (default to null)
            var eid = eid_example;  // String |  (default to null)
            var wvm = wvm_example;  // String |  (default to null)
            var wvmid = wvmid_example;  // String |  (default to null)
            var sid = sid_example;  // String |  (default to null)
            var transactionId = transactionId_example;  // String |  (optional)  (default to null)
            var parentChangeId = parentChangeId_example;  // String |  (optional)  (default to null)
            var description = description_example;  // String |  (optional)  (default to null)

            try
            {
                // Delete a Sub-element
                BTAppElementModifyInfo result = apiInstance.deleteContent1(did, eid, wvm, wvmid, sid, transactionId, parentChangeId, description);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AppElementsApi.deleteContent1: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new OpenAPITools\Client\Api\AppElementsApi();
$did = did_example; // String | 
$eid = eid_example; // String | 
$wvm = wvm_example; // String | 
$wvmid = wvmid_example; // String | 
$sid = sid_example; // String | 
$transactionId = transactionId_example; // String | 
$parentChangeId = parentChangeId_example; // String | 
$description = description_example; // String | 

try {
    $result = $api_instance->deleteContent1($did, $eid, $wvm, $wvmid, $sid, $transactionId, $parentChangeId, $description);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AppElementsApi->deleteContent1: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AppElementsApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::OPenAPIClient::AppElementsApi->new();
my $did = did_example; # String | 
my $eid = eid_example; # String | 
my $wvm = wvm_example; # String | 
my $wvmid = wvmid_example; # String | 
my $sid = sid_example; # String | 
my $transactionId = transactionId_example; # String | 
my $parentChangeId = parentChangeId_example; # String | 
my $description = description_example; # String | 

eval { 
    my $result = $api_instance->deleteContent1(did => $did, eid => $eid, wvm => $wvm, wvmid => $wvmid, sid => $sid, transactionId => $transactionId, parentChangeId => $parentChangeId, description => $description);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AppElementsApi->deleteContent1: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.AppElementsApi()
did = did_example # String |  (default to null)
eid = eid_example # String |  (default to null)
wvm = wvm_example # String |  (default to null)
wvmid = wvmid_example # String |  (default to null)
sid = sid_example # String |  (default to null)
transactionId = transactionId_example # String |  (optional) (default to null)
parentChangeId = parentChangeId_example # String |  (optional) (default to null)
description = description_example # String |  (optional) (default to null)

try: 
    # Delete a Sub-element
    api_response = api_instance.delete_content1(did, eid, wvm, wvmid, sid, transactionId=transactionId, parentChangeId=parentChangeId, description=description)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AppElementsApi->deleteContent1: %s\n" % e)
extern crate AppElementsApi;

pub fn main() {
    let did = did_example; // String
    let eid = eid_example; // String
    let wvm = wvm_example; // String
    let wvmid = wvmid_example; // String
    let sid = sid_example; // String
    let transactionId = transactionId_example; // String
    let parentChangeId = parentChangeId_example; // String
    let description = description_example; // String

    let mut context = AppElementsApi::Context::default();
    let result = client.deleteContent1(did, eid, wvm, wvmid, sid, transactionId, parentChangeId, description, &context).wait();
    println!("{:?}", result);

}

Scopes

OAuth2Internal Application is Onshape Internal
OAuth2ReadPII Application can read your profile information
OAuth2Read Application can read your documents
OAuth2Write Application can write to your documents
OAuth2Delete Application can delete your documents and workspaces
OAuth2Purchase Application can request purchases on your behalf
OAuth2Share Application can share and unshare documents on your behalf

Parameters

Path parameters
Name Description
did*
String
Required
eid*
String
Required
wvm*
String
Required
wvmid*
String
Required
sid*
String
Required
Query parameters
Name Description
transactionId
String
parentChangeId
String
description
String

Responses


deleteReference1

Delete Reference


/api/appelements/d/{did}/{wvm}/{wvmid}/e/{eid}/references/{rid}

Usage and SDK Samples

curl -X DELETE "http://localhost/api/appelements/d/{did}/{wvm}/{wvmid}/e/{eid}/references/{rid}?transactionId=&parentChangeId=&description="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AppElementsApi;

import java.io.File;
import java.util.*;

public class AppElementsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        AppElementsApi apiInstance = new AppElementsApi();
        String did = did_example; // String | 
        String eid = eid_example; // String | 
        String wvm = wvm_example; // String | 
        String wvmid = wvmid_example; // String | 
        String rid = rid_example; // String | 
        String transactionId = transactionId_example; // String | 
        String parentChangeId = parentChangeId_example; // String | 
        String description = description_example; // String | 
        try {
            BTAppElementReferenceInfo result = apiInstance.deleteReference1(did, eid, wvm, wvmid, rid, transactionId, parentChangeId, description);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AppElementsApi#deleteReference1");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.AppElementsApi;

public class AppElementsApiExample {

    public static void main(String[] args) {
        AppElementsApi apiInstance = new AppElementsApi();
        String did = did_example; // String | 
        String eid = eid_example; // String | 
        String wvm = wvm_example; // String | 
        String wvmid = wvmid_example; // String | 
        String rid = rid_example; // String | 
        String transactionId = transactionId_example; // String | 
        String parentChangeId = parentChangeId_example; // String | 
        String description = description_example; // String | 
        try {
            BTAppElementReferenceInfo result = apiInstance.deleteReference1(did, eid, wvm, wvmid, rid, transactionId, parentChangeId, description);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AppElementsApi#deleteReference1");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *did = did_example; //  (default to null)
String *eid = eid_example; //  (default to null)
String *wvm = wvm_example; //  (default to null)
String *wvmid = wvmid_example; //  (default to null)
String *rid = rid_example; //  (default to null)
String *transactionId = transactionId_example; //  (optional) (default to null)
String *parentChangeId = parentChangeId_example; //  (optional) (default to null)
String *description = description_example; //  (optional) (default to null)

AppElementsApi *apiInstance = [[AppElementsApi alloc] init];

// Delete Reference
[apiInstance deleteReference1With:did
    eid:eid
    wvm:wvm
    wvmid:wvmid
    rid:rid
    transactionId:transactionId
    parentChangeId:parentChangeId
    description:description
              completionHandler: ^(BTAppElementReferenceInfo output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OnshapeRestApi = require('onshape_rest_api');
var defaultClient = OnshapeRestApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new OnshapeRestApi.AppElementsApi()
var did = did_example; // {String} 
var eid = eid_example; // {String} 
var wvm = wvm_example; // {String} 
var wvmid = wvmid_example; // {String} 
var rid = rid_example; // {String} 
var opts = {
  'transactionId': transactionId_example, // {String} 
  'parentChangeId': parentChangeId_example, // {String} 
  'description': description_example // {String} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.deleteReference1(did, eid, wvm, wvmid, rid, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class deleteReference1Example
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new AppElementsApi();
            var did = did_example;  // String |  (default to null)
            var eid = eid_example;  // String |  (default to null)
            var wvm = wvm_example;  // String |  (default to null)
            var wvmid = wvmid_example;  // String |  (default to null)
            var rid = rid_example;  // String |  (default to null)
            var transactionId = transactionId_example;  // String |  (optional)  (default to null)
            var parentChangeId = parentChangeId_example;  // String |  (optional)  (default to null)
            var description = description_example;  // String |  (optional)  (default to null)

            try
            {
                // Delete Reference
                BTAppElementReferenceInfo result = apiInstance.deleteReference1(did, eid, wvm, wvmid, rid, transactionId, parentChangeId, description);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AppElementsApi.deleteReference1: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new OpenAPITools\Client\Api\AppElementsApi();
$did = did_example; // String | 
$eid = eid_example; // String | 
$wvm = wvm_example; // String | 
$wvmid = wvmid_example; // String | 
$rid = rid_example; // String | 
$transactionId = transactionId_example; // String | 
$parentChangeId = parentChangeId_example; // String | 
$description = description_example; // String | 

try {
    $result = $api_instance->deleteReference1($did, $eid, $wvm, $wvmid, $rid, $transactionId, $parentChangeId, $description);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AppElementsApi->deleteReference1: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AppElementsApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::OPenAPIClient::AppElementsApi->new();
my $did = did_example; # String | 
my $eid = eid_example; # String | 
my $wvm = wvm_example; # String | 
my $wvmid = wvmid_example; # String | 
my $rid = rid_example; # String | 
my $transactionId = transactionId_example; # String | 
my $parentChangeId = parentChangeId_example; # String | 
my $description = description_example; # String | 

eval { 
    my $result = $api_instance->deleteReference1(did => $did, eid => $eid, wvm => $wvm, wvmid => $wvmid, rid => $rid, transactionId => $transactionId, parentChangeId => $parentChangeId, description => $description);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AppElementsApi->deleteReference1: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.AppElementsApi()
did = did_example # String |  (default to null)
eid = eid_example # String |  (default to null)
wvm = wvm_example # String |  (default to null)
wvmid = wvmid_example # String |  (default to null)
rid = rid_example # String |  (default to null)
transactionId = transactionId_example # String |  (optional) (default to null)
parentChangeId = parentChangeId_example # String |  (optional) (default to null)
description = description_example # String |  (optional) (default to null)

try: 
    # Delete Reference
    api_response = api_instance.delete_reference1(did, eid, wvm, wvmid, rid, transactionId=transactionId, parentChangeId=parentChangeId, description=description)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AppElementsApi->deleteReference1: %s\n" % e)
extern crate AppElementsApi;

pub fn main() {
    let did = did_example; // String
    let eid = eid_example; // String
    let wvm = wvm_example; // String
    let wvmid = wvmid_example; // String
    let rid = rid_example; // String
    let transactionId = transactionId_example; // String
    let parentChangeId = parentChangeId_example; // String
    let description = description_example; // String

    let mut context = AppElementsApi::Context::default();
    let result = client.deleteReference1(did, eid, wvm, wvmid, rid, transactionId, parentChangeId, description, &context).wait();
    println!("{:?}", result);

}

Scopes

OAuth2Internal Application is Onshape Internal
OAuth2ReadPII Application can read your profile information
OAuth2Read Application can read your documents
OAuth2Write Application can write to your documents
OAuth2Delete Application can delete your documents and workspaces
OAuth2Purchase Application can request purchases on your behalf
OAuth2Share Application can share and unshare documents on your behalf

Parameters

Path parameters
Name Description
did*
String
Required
eid*
String
Required
wvm*
String
Required
wvmid*
String
Required
rid*
String
Required
Query parameters
Name Description
transactionId
String
parentChangeId
String
description
String

Responses


getHistory

Get History


/api/appelements/d/{did}/{wvm}/{wvmid}/e/{eid}/content/history

Usage and SDK Samples

curl -X GET "http://localhost/api/appelements/d/{did}/{wvm}/{wvmid}/e/{eid}/content/history"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AppElementsApi;

import java.io.File;
import java.util.*;

public class AppElementsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        AppElementsApi apiInstance = new AppElementsApi();
        String did = did_example; // String | 
        String eid = eid_example; // String | 
        String wvm = wvm_example; // String | 
        String wvmid = wvmid_example; // String | 
        try {
            BTAppElementHistoryInfo result = apiInstance.getHistory(did, eid, wvm, wvmid);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AppElementsApi#getHistory");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.AppElementsApi;

public class AppElementsApiExample {

    public static void main(String[] args) {
        AppElementsApi apiInstance = new AppElementsApi();
        String did = did_example; // String | 
        String eid = eid_example; // String | 
        String wvm = wvm_example; // String | 
        String wvmid = wvmid_example; // String | 
        try {
            BTAppElementHistoryInfo result = apiInstance.getHistory(did, eid, wvm, wvmid);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AppElementsApi#getHistory");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *did = did_example; //  (default to null)
String *eid = eid_example; //  (default to null)
String *wvm = wvm_example; //  (default to null)
String *wvmid = wvmid_example; //  (default to null)

AppElementsApi *apiInstance = [[AppElementsApi alloc] init];

// Get History
[apiInstance getHistoryWith:did
    eid:eid
    wvm:wvm
    wvmid:wvmid
              completionHandler: ^(BTAppElementHistoryInfo output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OnshapeRestApi = require('onshape_rest_api');
var defaultClient = OnshapeRestApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new OnshapeRestApi.AppElementsApi()
var did = did_example; // {String} 
var eid = eid_example; // {String} 
var wvm = wvm_example; // {String} 
var wvmid = wvmid_example; // {String} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getHistory(did, eid, wvm, wvmid, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getHistoryExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new AppElementsApi();
            var did = did_example;  // String |  (default to null)
            var eid = eid_example;  // String |  (default to null)
            var wvm = wvm_example;  // String |  (default to null)
            var wvmid = wvmid_example;  // String |  (default to null)

            try
            {
                // Get History
                BTAppElementHistoryInfo result = apiInstance.getHistory(did, eid, wvm, wvmid);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AppElementsApi.getHistory: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new OpenAPITools\Client\Api\AppElementsApi();
$did = did_example; // String | 
$eid = eid_example; // String | 
$wvm = wvm_example; // String | 
$wvmid = wvmid_example; // String | 

try {
    $result = $api_instance->getHistory($did, $eid, $wvm, $wvmid);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AppElementsApi->getHistory: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AppElementsApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::OPenAPIClient::AppElementsApi->new();
my $did = did_example; # String | 
my $eid = eid_example; # String | 
my $wvm = wvm_example; # String | 
my $wvmid = wvmid_example; # String | 

eval { 
    my $result = $api_instance->getHistory(did => $did, eid => $eid, wvm => $wvm, wvmid => $wvmid);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AppElementsApi->getHistory: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.AppElementsApi()
did = did_example # String |  (default to null)
eid = eid_example # String |  (default to null)
wvm = wvm_example # String |  (default to null)
wvmid = wvmid_example # String |  (default to null)

try: 
    # Get History
    api_response = api_instance.get_history(did, eid, wvm, wvmid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AppElementsApi->getHistory: %s\n" % e)
extern crate AppElementsApi;

pub fn main() {
    let did = did_example; // String
    let eid = eid_example; // String
    let wvm = wvm_example; // String
    let wvmid = wvmid_example; // String

    let mut context = AppElementsApi::Context::default();
    let result = client.getHistory(did, eid, wvm, wvmid, &context).wait();
    println!("{:?}", result);

}

Scopes

OAuth2Internal Application is Onshape Internal
OAuth2ReadPII Application can read your profile information
OAuth2Read Application can read your documents
OAuth2Write Application can write to your documents
OAuth2Delete Application can delete your documents and workspaces
OAuth2Purchase Application can request purchases on your behalf
OAuth2Share Application can share and unshare documents on your behalf

Parameters

Path parameters
Name Description
did*
String
Required
eid*
String
Required
wvm*
String
Required
wvmid*
String
Required

Responses


getSubElementContent

Get Content


/api/appelements/d/{did}/{wvm}/{wvmid}/e/{eid}/content

Usage and SDK Samples

curl -X GET "http://localhost/api/appelements/d/{did}/{wvm}/{wvmid}/e/{eid}/content?transactionId=&changeId=&baseChangeId=&subelementId=&linkDocumentId="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AppElementsApi;

import java.io.File;
import java.util.*;

public class AppElementsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        AppElementsApi apiInstance = new AppElementsApi();
        String did = did_example; // String | 
        String eid = eid_example; // String | 
        String wvm = wvm_example; // String | 
        String wvmid = wvmid_example; // String | 
        String transactionId = transactionId_example; // String | 
        String changeId = changeId_example; // String | 
        String baseChangeId = baseChangeId_example; // String | 
        String subelementId = subelementId_example; // String | 
        String linkDocumentId = linkDocumentId_example; // String | 
        try {
            BTAppElementContentInfo result = apiInstance.getSubElementContent(did, eid, wvm, wvmid, transactionId, changeId, baseChangeId, subelementId, linkDocumentId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AppElementsApi#getSubElementContent");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.AppElementsApi;

public class AppElementsApiExample {

    public static void main(String[] args) {
        AppElementsApi apiInstance = new AppElementsApi();
        String did = did_example; // String | 
        String eid = eid_example; // String | 
        String wvm = wvm_example; // String | 
        String wvmid = wvmid_example; // String | 
        String transactionId = transactionId_example; // String | 
        String changeId = changeId_example; // String | 
        String baseChangeId = baseChangeId_example; // String | 
        String subelementId = subelementId_example; // String | 
        String linkDocumentId = linkDocumentId_example; // String | 
        try {
            BTAppElementContentInfo result = apiInstance.getSubElementContent(did, eid, wvm, wvmid, transactionId, changeId, baseChangeId, subelementId, linkDocumentId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AppElementsApi#getSubElementContent");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *did = did_example; //  (default to null)
String *eid = eid_example; //  (default to null)
String *wvm = wvm_example; //  (default to null)
String *wvmid = wvmid_example; //  (default to null)
String *transactionId = transactionId_example; //  (optional) (default to null)
String *changeId = changeId_example; //  (optional) (default to null)
String *baseChangeId = baseChangeId_example; //  (optional) (default to null)
String *subelementId = subelementId_example; //  (optional) (default to null)
String *linkDocumentId = linkDocumentId_example; //  (optional) (default to null)

AppElementsApi *apiInstance = [[AppElementsApi alloc] init];

// Get Content
[apiInstance getSubElementContentWith:did
    eid:eid
    wvm:wvm
    wvmid:wvmid
    transactionId:transactionId
    changeId:changeId
    baseChangeId:baseChangeId
    subelementId:subelementId
    linkDocumentId:linkDocumentId
              completionHandler: ^(BTAppElementContentInfo output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OnshapeRestApi = require('onshape_rest_api');
var defaultClient = OnshapeRestApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new OnshapeRestApi.AppElementsApi()
var did = did_example; // {String} 
var eid = eid_example; // {String} 
var wvm = wvm_example; // {String} 
var wvmid = wvmid_example; // {String} 
var opts = {
  'transactionId': transactionId_example, // {String} 
  'changeId': changeId_example, // {String} 
  'baseChangeId': baseChangeId_example, // {String} 
  'subelementId': subelementId_example, // {String} 
  'linkDocumentId': linkDocumentId_example // {String} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getSubElementContent(did, eid, wvm, wvmid, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getSubElementContentExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new AppElementsApi();
            var did = did_example;  // String |  (default to null)
            var eid = eid_example;  // String |  (default to null)
            var wvm = wvm_example;  // String |  (default to null)
            var wvmid = wvmid_example;  // String |  (default to null)
            var transactionId = transactionId_example;  // String |  (optional)  (default to null)
            var changeId = changeId_example;  // String |  (optional)  (default to null)
            var baseChangeId = baseChangeId_example;  // String |  (optional)  (default to null)
            var subelementId = subelementId_example;  // String |  (optional)  (default to null)
            var linkDocumentId = linkDocumentId_example;  // String |  (optional)  (default to null)

            try
            {
                // Get Content
                BTAppElementContentInfo result = apiInstance.getSubElementContent(did, eid, wvm, wvmid, transactionId, changeId, baseChangeId, subelementId, linkDocumentId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AppElementsApi.getSubElementContent: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new OpenAPITools\Client\Api\AppElementsApi();
$did = did_example; // String | 
$eid = eid_example; // String | 
$wvm = wvm_example; // String | 
$wvmid = wvmid_example; // String | 
$transactionId = transactionId_example; // String | 
$changeId = changeId_example; // String | 
$baseChangeId = baseChangeId_example; // String | 
$subelementId = subelementId_example; // String | 
$linkDocumentId = linkDocumentId_example; // String | 

try {
    $result = $api_instance->getSubElementContent($did, $eid, $wvm, $wvmid, $transactionId, $changeId, $baseChangeId, $subelementId, $linkDocumentId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AppElementsApi->getSubElementContent: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AppElementsApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::OPenAPIClient::AppElementsApi->new();
my $did = did_example; # String | 
my $eid = eid_example; # String | 
my $wvm = wvm_example; # String | 
my $wvmid = wvmid_example; # String | 
my $transactionId = transactionId_example; # String | 
my $changeId = changeId_example; # String | 
my $baseChangeId = baseChangeId_example; # String | 
my $subelementId = subelementId_example; # String | 
my $linkDocumentId = linkDocumentId_example; # String | 

eval { 
    my $result = $api_instance->getSubElementContent(did => $did, eid => $eid, wvm => $wvm, wvmid => $wvmid, transactionId => $transactionId, changeId => $changeId, baseChangeId => $baseChangeId, subelementId => $subelementId, linkDocumentId => $linkDocumentId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AppElementsApi->getSubElementContent: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.AppElementsApi()
did = did_example # String |  (default to null)
eid = eid_example # String |  (default to null)
wvm = wvm_example # String |  (default to null)
wvmid = wvmid_example # String |  (default to null)
transactionId = transactionId_example # String |  (optional) (default to null)
changeId = changeId_example # String |  (optional) (default to null)
baseChangeId = baseChangeId_example # String |  (optional) (default to null)
subelementId = subelementId_example # String |  (optional) (default to null)
linkDocumentId = linkDocumentId_example # String |  (optional) (default to null)

try: 
    # Get Content
    api_response = api_instance.get_sub_element_content(did, eid, wvm, wvmid, transactionId=transactionId, changeId=changeId, baseChangeId=baseChangeId, subelementId=subelementId, linkDocumentId=linkDocumentId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AppElementsApi->getSubElementContent: %s\n" % e)
extern crate AppElementsApi;

pub fn main() {
    let did = did_example; // String
    let eid = eid_example; // String
    let wvm = wvm_example; // String
    let wvmid = wvmid_example; // String
    let transactionId = transactionId_example; // String
    let changeId = changeId_example; // String
    let baseChangeId = baseChangeId_example; // String
    let subelementId = subelementId_example; // String
    let linkDocumentId = linkDocumentId_example; // String

    let mut context = AppElementsApi::Context::default();
    let result = client.getSubElementContent(did, eid, wvm, wvmid, transactionId, changeId, baseChangeId, subelementId, linkDocumentId, &context).wait();
    println!("{:?}", result);

}

Scopes

OAuth2Internal Application is Onshape Internal
OAuth2ReadPII Application can read your profile information
OAuth2Read Application can read your documents
OAuth2Write Application can write to your documents
OAuth2Delete Application can delete your documents and workspaces
OAuth2Purchase Application can request purchases on your behalf
OAuth2Share Application can share and unshare documents on your behalf

Parameters

Path parameters
Name Description
did*
String
Required
eid*
String
Required
wvm*
String
Required
wvmid*
String
Required
Query parameters
Name Description
transactionId
String
changeId
String
baseChangeId
String
subelementId
String
linkDocumentId
String

Responses


getSubelementIds

Get Sub-element IDs


/api/appelements/d/{did}/{wvm}/{wvmid}/e/{eid}/content/ids

Usage and SDK Samples

curl -X GET "http://localhost/api/appelements/d/{did}/{wvm}/{wvmid}/e/{eid}/content/ids?transactionId=&changeId="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AppElementsApi;

import java.io.File;
import java.util.*;

public class AppElementsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        AppElementsApi apiInstance = new AppElementsApi();
        String did = did_example; // String | 
        String eid = eid_example; // String | 
        String wvm = wvm_example; // String | 
        String wvmid = wvmid_example; // String | 
        String transactionId = transactionId_example; // String | 
        String changeId = changeId_example; // String | 
        try {
            BTAppElementModifyInfo result = apiInstance.getSubelementIds(did, eid, wvm, wvmid, transactionId, changeId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AppElementsApi#getSubelementIds");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.AppElementsApi;

public class AppElementsApiExample {

    public static void main(String[] args) {
        AppElementsApi apiInstance = new AppElementsApi();
        String did = did_example; // String | 
        String eid = eid_example; // String | 
        String wvm = wvm_example; // String | 
        String wvmid = wvmid_example; // String | 
        String transactionId = transactionId_example; // String | 
        String changeId = changeId_example; // String | 
        try {
            BTAppElementModifyInfo result = apiInstance.getSubelementIds(did, eid, wvm, wvmid, transactionId, changeId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AppElementsApi#getSubelementIds");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *did = did_example; //  (default to null)
String *eid = eid_example; //  (default to null)
String *wvm = wvm_example; //  (default to null)
String *wvmid = wvmid_example; //  (default to null)
String *transactionId = transactionId_example; //  (optional) (default to null)
String *changeId = changeId_example; //  (optional) (default to null)

AppElementsApi *apiInstance = [[AppElementsApi alloc] init];

// Get Sub-element IDs
[apiInstance getSubelementIdsWith:did
    eid:eid
    wvm:wvm
    wvmid:wvmid
    transactionId:transactionId
    changeId:changeId
              completionHandler: ^(BTAppElementModifyInfo output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OnshapeRestApi = require('onshape_rest_api');
var defaultClient = OnshapeRestApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new OnshapeRestApi.AppElementsApi()
var did = did_example; // {String} 
var eid = eid_example; // {String} 
var wvm = wvm_example; // {String} 
var wvmid = wvmid_example; // {String} 
var opts = {
  'transactionId': transactionId_example, // {String} 
  'changeId': changeId_example // {String} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getSubelementIds(did, eid, wvm, wvmid, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getSubelementIdsExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new AppElementsApi();
            var did = did_example;  // String |  (default to null)
            var eid = eid_example;  // String |  (default to null)
            var wvm = wvm_example;  // String |  (default to null)
            var wvmid = wvmid_example;  // String |  (default to null)
            var transactionId = transactionId_example;  // String |  (optional)  (default to null)
            var changeId = changeId_example;  // String |  (optional)  (default to null)

            try
            {
                // Get Sub-element IDs
                BTAppElementModifyInfo result = apiInstance.getSubelementIds(did, eid, wvm, wvmid, transactionId, changeId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AppElementsApi.getSubelementIds: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new OpenAPITools\Client\Api\AppElementsApi();
$did = did_example; // String | 
$eid = eid_example; // String | 
$wvm = wvm_example; // String | 
$wvmid = wvmid_example; // String | 
$transactionId = transactionId_example; // String | 
$changeId = changeId_example; // String | 

try {
    $result = $api_instance->getSubelementIds($did, $eid, $wvm, $wvmid, $transactionId, $changeId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AppElementsApi->getSubelementIds: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AppElementsApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::OPenAPIClient::AppElementsApi->new();
my $did = did_example; # String | 
my $eid = eid_example; # String | 
my $wvm = wvm_example; # String | 
my $wvmid = wvmid_example; # String | 
my $transactionId = transactionId_example; # String | 
my $changeId = changeId_example; # String | 

eval { 
    my $result = $api_instance->getSubelementIds(did => $did, eid => $eid, wvm => $wvm, wvmid => $wvmid, transactionId => $transactionId, changeId => $changeId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AppElementsApi->getSubelementIds: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.AppElementsApi()
did = did_example # String |  (default to null)
eid = eid_example # String |  (default to null)
wvm = wvm_example # String |  (default to null)
wvmid = wvmid_example # String |  (default to null)
transactionId = transactionId_example # String |  (optional) (default to null)
changeId = changeId_example # String |  (optional) (default to null)

try: 
    # Get Sub-element IDs
    api_response = api_instance.get_subelement_ids(did, eid, wvm, wvmid, transactionId=transactionId, changeId=changeId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AppElementsApi->getSubelementIds: %s\n" % e)
extern crate AppElementsApi;

pub fn main() {
    let did = did_example; // String
    let eid = eid_example; // String
    let wvm = wvm_example; // String
    let wvmid = wvmid_example; // String
    let transactionId = transactionId_example; // String
    let changeId = changeId_example; // String

    let mut context = AppElementsApi::Context::default();
    let result = client.getSubelementIds(did, eid, wvm, wvmid, transactionId, changeId, &context).wait();
    println!("{:?}", result);

}

Scopes

OAuth2Internal Application is Onshape Internal
OAuth2ReadPII Application can read your profile information
OAuth2Read Application can read your documents
OAuth2Write Application can write to your documents
OAuth2Delete Application can delete your documents and workspaces
OAuth2Purchase Application can request purchases on your behalf
OAuth2Share Application can share and unshare documents on your behalf

Parameters

Path parameters
Name Description
did*
String
Required
eid*
String
Required
wvm*
String
Required
wvmid*
String
Required
Query parameters
Name Description
transactionId
String
changeId
String

Responses


resolveReference1

Resolve Reference


/api/appelements/d/{did}/{wvm}/{wvmid}/e/{eid}/references/{rid}

Usage and SDK Samples

curl -X GET "http://localhost/api/appelements/d/{did}/{wvm}/{wvmid}/e/{eid}/references/{rid}?transactionId=&parentChangeId=&includeInternal=&linkDocumentId="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AppElementsApi;

import java.io.File;
import java.util.*;

public class AppElementsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        AppElementsApi apiInstance = new AppElementsApi();
        String did = did_example; // String | 
        String eid = eid_example; // String | 
        String wvm = wvm_example; // String | 
        String wvmid = wvmid_example; // String | 
        String rid = rid_example; // String | 
        String transactionId = transactionId_example; // String | 
        String parentChangeId = parentChangeId_example; // String | 
        Boolean includeInternal = true; // Boolean | 
        String linkDocumentId = linkDocumentId_example; // String | 
        try {
            BTAppElementReferenceResolveInfo result = apiInstance.resolveReference1(did, eid, wvm, wvmid, rid, transactionId, parentChangeId, includeInternal, linkDocumentId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AppElementsApi#resolveReference1");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.AppElementsApi;

public class AppElementsApiExample {

    public static void main(String[] args) {
        AppElementsApi apiInstance = new AppElementsApi();
        String did = did_example; // String | 
        String eid = eid_example; // String | 
        String wvm = wvm_example; // String | 
        String wvmid = wvmid_example; // String | 
        String rid = rid_example; // String | 
        String transactionId = transactionId_example; // String | 
        String parentChangeId = parentChangeId_example; // String | 
        Boolean includeInternal = true; // Boolean | 
        String linkDocumentId = linkDocumentId_example; // String | 
        try {
            BTAppElementReferenceResolveInfo result = apiInstance.resolveReference1(did, eid, wvm, wvmid, rid, transactionId, parentChangeId, includeInternal, linkDocumentId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AppElementsApi#resolveReference1");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *did = did_example; //  (default to null)
String *eid = eid_example; //  (default to null)
String *wvm = wvm_example; //  (default to null)
String *wvmid = wvmid_example; //  (default to null)
String *rid = rid_example; //  (default to null)
String *transactionId = transactionId_example; //  (optional) (default to null)
String *parentChangeId = parentChangeId_example; //  (optional) (default to null)
Boolean *includeInternal = true; //  (optional) (default to false)
String *linkDocumentId = linkDocumentId_example; //  (optional) (default to null)

AppElementsApi *apiInstance = [[AppElementsApi alloc] init];

// Resolve Reference
[apiInstance resolveReference1With:did
    eid:eid
    wvm:wvm
    wvmid:wvmid
    rid:rid
    transactionId:transactionId
    parentChangeId:parentChangeId
    includeInternal:includeInternal
    linkDocumentId:linkDocumentId
              completionHandler: ^(BTAppElementReferenceResolveInfo output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OnshapeRestApi = require('onshape_rest_api');
var defaultClient = OnshapeRestApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new OnshapeRestApi.AppElementsApi()
var did = did_example; // {String} 
var eid = eid_example; // {String} 
var wvm = wvm_example; // {String} 
var wvmid = wvmid_example; // {String} 
var rid = rid_example; // {String} 
var opts = {
  'transactionId': transactionId_example, // {String} 
  'parentChangeId': parentChangeId_example, // {String} 
  'includeInternal': true, // {Boolean} 
  'linkDocumentId': linkDocumentId_example // {String} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.resolveReference1(did, eid, wvm, wvmid, rid, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class resolveReference1Example
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new AppElementsApi();
            var did = did_example;  // String |  (default to null)
            var eid = eid_example;  // String |  (default to null)
            var wvm = wvm_example;  // String |  (default to null)
            var wvmid = wvmid_example;  // String |  (default to null)
            var rid = rid_example;  // String |  (default to null)
            var transactionId = transactionId_example;  // String |  (optional)  (default to null)
            var parentChangeId = parentChangeId_example;  // String |  (optional)  (default to null)
            var includeInternal = true;  // Boolean |  (optional)  (default to false)
            var linkDocumentId = linkDocumentId_example;  // String |  (optional)  (default to null)

            try
            {
                // Resolve Reference
                BTAppElementReferenceResolveInfo result = apiInstance.resolveReference1(did, eid, wvm, wvmid, rid, transactionId, parentChangeId, includeInternal, linkDocumentId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AppElementsApi.resolveReference1: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new OpenAPITools\Client\Api\AppElementsApi();
$did = did_example; // String | 
$eid = eid_example; // String | 
$wvm = wvm_example; // String | 
$wvmid = wvmid_example; // String | 
$rid = rid_example; // String | 
$transactionId = transactionId_example; // String | 
$parentChangeId = parentChangeId_example; // String | 
$includeInternal = true; // Boolean | 
$linkDocumentId = linkDocumentId_example; // String | 

try {
    $result = $api_instance->resolveReference1($did, $eid, $wvm, $wvmid, $rid, $transactionId, $parentChangeId, $includeInternal, $linkDocumentId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AppElementsApi->resolveReference1: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AppElementsApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::OPenAPIClient::AppElementsApi->new();
my $did = did_example; # String | 
my $eid = eid_example; # String | 
my $wvm = wvm_example; # String | 
my $wvmid = wvmid_example; # String | 
my $rid = rid_example; # String | 
my $transactionId = transactionId_example; # String | 
my $parentChangeId = parentChangeId_example; # String | 
my $includeInternal = true; # Boolean | 
my $linkDocumentId = linkDocumentId_example; # String | 

eval { 
    my $result = $api_instance->resolveReference1(did => $did, eid => $eid, wvm => $wvm, wvmid => $wvmid, rid => $rid, transactionId => $transactionId, parentChangeId => $parentChangeId, includeInternal => $includeInternal, linkDocumentId => $linkDocumentId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AppElementsApi->resolveReference1: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.AppElementsApi()
did = did_example # String |  (default to null)
eid = eid_example # String |  (default to null)
wvm = wvm_example # String |  (default to null)
wvmid = wvmid_example # String |  (default to null)
rid = rid_example # String |  (default to null)
transactionId = transactionId_example # String |  (optional) (default to null)
parentChangeId = parentChangeId_example # String |  (optional) (default to null)
includeInternal = true # Boolean |  (optional) (default to false)
linkDocumentId = linkDocumentId_example # String |  (optional) (default to null)

try: 
    # Resolve Reference
    api_response = api_instance.resolve_reference1(did, eid, wvm, wvmid, rid, transactionId=transactionId, parentChangeId=parentChangeId, includeInternal=includeInternal, linkDocumentId=linkDocumentId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AppElementsApi->resolveReference1: %s\n" % e)
extern crate AppElementsApi;

pub fn main() {
    let did = did_example; // String
    let eid = eid_example; // String
    let wvm = wvm_example; // String
    let wvmid = wvmid_example; // String
    let rid = rid_example; // String
    let transactionId = transactionId_example; // String
    let parentChangeId = parentChangeId_example; // String
    let includeInternal = true; // Boolean
    let linkDocumentId = linkDocumentId_example; // String

    let mut context = AppElementsApi::Context::default();
    let result = client.resolveReference1(did, eid, wvm, wvmid, rid, transactionId, parentChangeId, includeInternal, linkDocumentId, &context).wait();
    println!("{:?}", result);

}

Scopes

OAuth2Internal Application is Onshape Internal
OAuth2ReadPII Application can read your profile information
OAuth2Read Application can read your documents
OAuth2Write Application can write to your documents
OAuth2Delete Application can delete your documents and workspaces
OAuth2Purchase Application can request purchases on your behalf
OAuth2Share Application can share and unshare documents on your behalf

Parameters

Path parameters
Name Description
did*
String
Required
eid*
String
Required
wvm*
String
Required
wvmid*
String
Required
rid*
String
Required
Query parameters
Name Description
transactionId
String
parentChangeId
String
includeInternal
Boolean
linkDocumentId
String

Responses


startTransaction

Start Transaction


/api/appelements/d/{did}/w/{wid}/e/{eid}/transactions

Usage and SDK Samples

curl -X POST "http://localhost/api/appelements/d/{did}/w/{wid}/e/{eid}/transactions"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AppElementsApi;

import java.io.File;
import java.util.*;

public class AppElementsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        AppElementsApi apiInstance = new AppElementsApi();
        String did = did_example; // String | 
        String eid = eid_example; // String | 
        String wid = wid_example; // String | 
        BTAppElementStartTransactionParams bTAppElementStartTransactionParams = ; // BTAppElementStartTransactionParams | 
        try {
            BTAppElementModifyInfo result = apiInstance.startTransaction(did, eid, wid, bTAppElementStartTransactionParams);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AppElementsApi#startTransaction");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.AppElementsApi;

public class AppElementsApiExample {

    public static void main(String[] args) {
        AppElementsApi apiInstance = new AppElementsApi();
        String did = did_example; // String | 
        String eid = eid_example; // String | 
        String wid = wid_example; // String | 
        BTAppElementStartTransactionParams bTAppElementStartTransactionParams = ; // BTAppElementStartTransactionParams | 
        try {
            BTAppElementModifyInfo result = apiInstance.startTransaction(did, eid, wid, bTAppElementStartTransactionParams);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AppElementsApi#startTransaction");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *did = did_example; //  (default to null)
String *eid = eid_example; //  (default to null)
String *wid = wid_example; //  (default to null)
BTAppElementStartTransactionParams *bTAppElementStartTransactionParams = ; // 

AppElementsApi *apiInstance = [[AppElementsApi alloc] init];

// Start Transaction
[apiInstance startTransactionWith:did
    eid:eid
    wid:wid
    bTAppElementStartTransactionParams:bTAppElementStartTransactionParams
              completionHandler: ^(BTAppElementModifyInfo output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OnshapeRestApi = require('onshape_rest_api');
var defaultClient = OnshapeRestApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new OnshapeRestApi.AppElementsApi()
var did = did_example; // {String} 
var eid = eid_example; // {String} 
var wid = wid_example; // {String} 
var bTAppElementStartTransactionParams = ; // {BTAppElementStartTransactionParams} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.startTransaction(did, eid, wid, bTAppElementStartTransactionParams, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class startTransactionExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new AppElementsApi();
            var did = did_example;  // String |  (default to null)
            var eid = eid_example;  // String |  (default to null)
            var wid = wid_example;  // String |  (default to null)
            var bTAppElementStartTransactionParams = new BTAppElementStartTransactionParams(); // BTAppElementStartTransactionParams | 

            try
            {
                // Start Transaction
                BTAppElementModifyInfo result = apiInstance.startTransaction(did, eid, wid, bTAppElementStartTransactionParams);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AppElementsApi.startTransaction: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new OpenAPITools\Client\Api\AppElementsApi();
$did = did_example; // String | 
$eid = eid_example; // String | 
$wid = wid_example; // String | 
$bTAppElementStartTransactionParams = ; // BTAppElementStartTransactionParams | 

try {
    $result = $api_instance->startTransaction($did, $eid, $wid, $bTAppElementStartTransactionParams);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AppElementsApi->startTransaction: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AppElementsApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::OPenAPIClient::AppElementsApi->new();
my $did = did_example; # String | 
my $eid = eid_example; # String | 
my $wid = wid_example; # String | 
my $bTAppElementStartTransactionParams = WWW::OPenAPIClient::Object::BTAppElementStartTransactionParams->new(); # BTAppElementStartTransactionParams | 

eval { 
    my $result = $api_instance->startTransaction(did => $did, eid => $eid, wid => $wid, bTAppElementStartTransactionParams => $bTAppElementStartTransactionParams);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AppElementsApi->startTransaction: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.AppElementsApi()
did = did_example # String |  (default to null)
eid = eid_example # String |  (default to null)
wid = wid_example # String |  (default to null)
bTAppElementStartTransactionParams =  # BTAppElementStartTransactionParams | 

try: 
    # Start Transaction
    api_response = api_instance.start_transaction(did, eid, wid, bTAppElementStartTransactionParams)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AppElementsApi->startTransaction: %s\n" % e)
extern crate AppElementsApi;

pub fn main() {
    let did = did_example; // String
    let eid = eid_example; // String
    let wid = wid_example; // String
    let bTAppElementStartTransactionParams = ; // BTAppElementStartTransactionParams

    let mut context = AppElementsApi::Context::default();
    let result = client.startTransaction(did, eid, wid, bTAppElementStartTransactionParams, &context).wait();
    println!("{:?}", result);

}

Scopes

OAuth2Internal Application is Onshape Internal
OAuth2ReadPII Application can read your profile information
OAuth2Read Application can read your documents
OAuth2Write Application can write to your documents
OAuth2Delete Application can delete your documents and workspaces
OAuth2Purchase Application can request purchases on your behalf
OAuth2Share Application can share and unshare documents on your behalf

Parameters

Path parameters
Name Description
did*
String
Required
eid*
String
Required
wid*
String
Required
Body parameters
Name Description
bTAppElementStartTransactionParams *

Responses


update5

Update Element


/api/appelements/d/{did}/{wvm}/{wvmid}/e/{eid}/content

Usage and SDK Samples

curl -X POST "http://localhost/api/appelements/d/{did}/{wvm}/{wvmid}/e/{eid}/content"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AppElementsApi;

import java.io.File;
import java.util.*;

public class AppElementsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        AppElementsApi apiInstance = new AppElementsApi();
        String did = did_example; // String | 
        String eid = eid_example; // String | 
        String wvm = wvm_example; // String | 
        String wvmid = wvmid_example; // String | 
        BTAppElementUpdateParams bTAppElementUpdateParams = ; // BTAppElementUpdateParams | 
        try {
            BTAppElementModifyInfo result = apiInstance.update5(did, eid, wvm, wvmid, bTAppElementUpdateParams);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AppElementsApi#update5");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.AppElementsApi;

public class AppElementsApiExample {

    public static void main(String[] args) {
        AppElementsApi apiInstance = new AppElementsApi();
        String did = did_example; // String | 
        String eid = eid_example; // String | 
        String wvm = wvm_example; // String | 
        String wvmid = wvmid_example; // String | 
        BTAppElementUpdateParams bTAppElementUpdateParams = ; // BTAppElementUpdateParams | 
        try {
            BTAppElementModifyInfo result = apiInstance.update5(did, eid, wvm, wvmid, bTAppElementUpdateParams);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AppElementsApi#update5");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *did = did_example; //  (default to null)
String *eid = eid_example; //  (default to null)
String *wvm = wvm_example; //  (default to null)
String *wvmid = wvmid_example; //  (default to null)
BTAppElementUpdateParams *bTAppElementUpdateParams = ; // 

AppElementsApi *apiInstance = [[AppElementsApi alloc] init];

// Update Element
[apiInstance update5With:did
    eid:eid
    wvm:wvm
    wvmid:wvmid
    bTAppElementUpdateParams:bTAppElementUpdateParams
              completionHandler: ^(BTAppElementModifyInfo output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OnshapeRestApi = require('onshape_rest_api');
var defaultClient = OnshapeRestApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new OnshapeRestApi.AppElementsApi()
var did = did_example; // {String} 
var eid = eid_example; // {String} 
var wvm = wvm_example; // {String} 
var wvmid = wvmid_example; // {String} 
var bTAppElementUpdateParams = ; // {BTAppElementUpdateParams} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.update5(did, eid, wvm, wvmid, bTAppElementUpdateParams, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class update5Example
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new AppElementsApi();
            var did = did_example;  // String |  (default to null)
            var eid = eid_example;  // String |  (default to null)
            var wvm = wvm_example;  // String |  (default to null)
            var wvmid = wvmid_example;  // String |  (default to null)
            var bTAppElementUpdateParams = new BTAppElementUpdateParams(); // BTAppElementUpdateParams | 

            try
            {
                // Update Element
                BTAppElementModifyInfo result = apiInstance.update5(did, eid, wvm, wvmid, bTAppElementUpdateParams);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AppElementsApi.update5: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new OpenAPITools\Client\Api\AppElementsApi();
$did = did_example; // String | 
$eid = eid_example; // String | 
$wvm = wvm_example; // String | 
$wvmid = wvmid_example; // String | 
$bTAppElementUpdateParams = ; // BTAppElementUpdateParams | 

try {
    $result = $api_instance->update5($did, $eid, $wvm, $wvmid, $bTAppElementUpdateParams);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AppElementsApi->update5: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AppElementsApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::OPenAPIClient::AppElementsApi->new();
my $did = did_example; # String | 
my $eid = eid_example; # String | 
my $wvm = wvm_example; # String | 
my $wvmid = wvmid_example; # String | 
my $bTAppElementUpdateParams = WWW::OPenAPIClient::Object::BTAppElementUpdateParams->new(); # BTAppElementUpdateParams | 

eval { 
    my $result = $api_instance->update5(did => $did, eid => $eid, wvm => $wvm, wvmid => $wvmid, bTAppElementUpdateParams => $bTAppElementUpdateParams);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AppElementsApi->update5: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.AppElementsApi()
did = did_example # String |  (default to null)
eid = eid_example # String |  (default to null)
wvm = wvm_example # String |  (default to null)
wvmid = wvmid_example # String |  (default to null)
bTAppElementUpdateParams =  # BTAppElementUpdateParams | 

try: 
    # Update Element
    api_response = api_instance.update5(did, eid, wvm, wvmid, bTAppElementUpdateParams)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AppElementsApi->update5: %s\n" % e)
extern crate AppElementsApi;

pub fn main() {
    let did = did_example; // String
    let eid = eid_example; // String
    let wvm = wvm_example; // String
    let wvmid = wvmid_example; // String
    let bTAppElementUpdateParams = ; // BTAppElementUpdateParams

    let mut context = AppElementsApi::Context::default();
    let result = client.update5(did, eid, wvm, wvmid, bTAppElementUpdateParams, &context).wait();
    println!("{:?}", result);

}

Scopes

OAuth2Internal Application is Onshape Internal
OAuth2ReadPII Application can read your profile information
OAuth2Read Application can read your documents
OAuth2Write Application can write to your documents
OAuth2Delete Application can delete your documents and workspaces
OAuth2Purchase Application can request purchases on your behalf
OAuth2Share Application can share and unshare documents on your behalf

Parameters

Path parameters
Name Description
did*
String
Required
eid*
String
Required
wvm*
String
Required
wvmid*
String
Required
Body parameters
Name Description
bTAppElementUpdateParams *

Responses


updateReference1

Update Reference


/api/appelements/d/{did}/{wvm}/{wvmid}/e/{eid}/references/{rid}

Usage and SDK Samples

curl -X POST "http://localhost/api/appelements/d/{did}/{wvm}/{wvmid}/e/{eid}/references/{rid}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AppElementsApi;

import java.io.File;
import java.util.*;

public class AppElementsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        AppElementsApi apiInstance = new AppElementsApi();
        String did = did_example; // String | 
        String eid = eid_example; // String | 
        String wvm = wvm_example; // String | 
        String wvmid = wvmid_example; // String | 
        String rid = rid_example; // String | 
        BTAppElementReferenceParams bTAppElementReferenceParams = ; // BTAppElementReferenceParams | 
        try {
            BTAppElementReferenceInfo result = apiInstance.updateReference1(did, eid, wvm, wvmid, rid, bTAppElementReferenceParams);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AppElementsApi#updateReference1");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.AppElementsApi;

public class AppElementsApiExample {

    public static void main(String[] args) {
        AppElementsApi apiInstance = new AppElementsApi();
        String did = did_example; // String | 
        String eid = eid_example; // String | 
        String wvm = wvm_example; // String | 
        String wvmid = wvmid_example; // String | 
        String rid = rid_example; // String | 
        BTAppElementReferenceParams bTAppElementReferenceParams = ; // BTAppElementReferenceParams | 
        try {
            BTAppElementReferenceInfo result = apiInstance.updateReference1(did, eid, wvm, wvmid, rid, bTAppElementReferenceParams);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AppElementsApi#updateReference1");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *did = did_example; //  (default to null)
String *eid = eid_example; //  (default to null)
String *wvm = wvm_example; //  (default to null)
String *wvmid = wvmid_example; //  (default to null)
String *rid = rid_example; //  (default to null)
BTAppElementReferenceParams *bTAppElementReferenceParams = ; // 

AppElementsApi *apiInstance = [[AppElementsApi alloc] init];

// Update Reference
[apiInstance updateReference1With:did
    eid:eid
    wvm:wvm
    wvmid:wvmid
    rid:rid
    bTAppElementReferenceParams:bTAppElementReferenceParams
              completionHandler: ^(BTAppElementReferenceInfo output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OnshapeRestApi = require('onshape_rest_api');
var defaultClient = OnshapeRestApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new OnshapeRestApi.AppElementsApi()
var did = did_example; // {String} 
var eid = eid_example; // {String} 
var wvm = wvm_example; // {String} 
var wvmid = wvmid_example; // {String} 
var rid = rid_example; // {String} 
var bTAppElementReferenceParams = ; // {BTAppElementReferenceParams} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateReference1(did, eid, wvm, wvmid, rid, bTAppElementReferenceParams, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class updateReference1Example
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new AppElementsApi();
            var did = did_example;  // String |  (default to null)
            var eid = eid_example;  // String |  (default to null)
            var wvm = wvm_example;  // String |  (default to null)
            var wvmid = wvmid_example;  // String |  (default to null)
            var rid = rid_example;  // String |  (default to null)
            var bTAppElementReferenceParams = new BTAppElementReferenceParams(); // BTAppElementReferenceParams | 

            try
            {
                // Update Reference
                BTAppElementReferenceInfo result = apiInstance.updateReference1(did, eid, wvm, wvmid, rid, bTAppElementReferenceParams);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AppElementsApi.updateReference1: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new OpenAPITools\Client\Api\AppElementsApi();
$did = did_example; // String | 
$eid = eid_example; // String | 
$wvm = wvm_example; // String | 
$wvmid = wvmid_example; // String | 
$rid = rid_example; // String | 
$bTAppElementReferenceParams = ; // BTAppElementReferenceParams | 

try {
    $result = $api_instance->updateReference1($did, $eid, $wvm, $wvmid, $rid, $bTAppElementReferenceParams);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AppElementsApi->updateReference1: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AppElementsApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::OPenAPIClient::AppElementsApi->new();
my $did = did_example; # String | 
my $eid = eid_example; # String | 
my $wvm = wvm_example; # String | 
my $wvmid = wvmid_example; # String | 
my $rid = rid_example; # String | 
my $bTAppElementReferenceParams = WWW::OPenAPIClient::Object::BTAppElementReferenceParams->new(); # BTAppElementReferenceParams | 

eval { 
    my $result = $api_instance->updateReference1(did => $did, eid => $eid, wvm => $wvm, wvmid => $wvmid, rid => $rid, bTAppElementReferenceParams => $bTAppElementReferenceParams);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AppElementsApi->updateReference1: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.AppElementsApi()
did = did_example # String |  (default to null)
eid = eid_example # String |  (default to null)
wvm = wvm_example # String |  (default to null)
wvmid = wvmid_example # String |  (default to null)
rid = rid_example # String |  (default to null)
bTAppElementReferenceParams =  # BTAppElementReferenceParams | 

try: 
    # Update Reference
    api_response = api_instance.update_reference1(did, eid, wvm, wvmid, rid, bTAppElementReferenceParams)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AppElementsApi->updateReference1: %s\n" % e)
extern crate AppElementsApi;

pub fn main() {
    let did = did_example; // String
    let eid = eid_example; // String
    let wvm = wvm_example; // String
    let wvmid = wvmid_example; // String
    let rid = rid_example; // String
    let bTAppElementReferenceParams = ; // BTAppElementReferenceParams

    let mut context = AppElementsApi::Context::default();
    let result = client.updateReference1(did, eid, wvm, wvmid, rid, bTAppElementReferenceParams, &context).wait();
    println!("{:?}", result);

}

Scopes

OAuth2Internal Application is Onshape Internal
OAuth2ReadPII Application can read your profile information
OAuth2Read Application can read your documents
OAuth2Write Application can write to your documents
OAuth2Delete Application can delete your documents and workspaces
OAuth2Purchase Application can request purchases on your behalf
OAuth2Share Application can share and unshare documents on your behalf

Parameters

Path parameters
Name Description
did*
String
Required
eid*
String
Required
wvm*
String
Required
wvmid*
String
Required
rid*
String
Required
Body parameters
Name Description
bTAppElementReferenceParams *

Responses


Default

addFeature1

Add Feature


/api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/features

Usage and SDK Samples

curl -X POST "http://localhost/api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/features"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        DefaultApi apiInstance = new DefaultApi();
        String did = did_example; // String | Document ID.
        String wvm = wvm_example; // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
        String wvmid = wvmid_example; // String | Workspace (w), Version (v) or Microversion (m) ID.
        String eid = eid_example; // String | Element ID.
        String body = body_example; // String | 
        try {
            BTFeatureDefinitionResponse result = apiInstance.addFeature1(did, wvm, wvmid, eid, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#addFeature1");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String did = did_example; // String | Document ID.
        String wvm = wvm_example; // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
        String wvmid = wvmid_example; // String | Workspace (w), Version (v) or Microversion (m) ID.
        String eid = eid_example; // String | Element ID.
        String body = body_example; // String | 
        try {
            BTFeatureDefinitionResponse result = apiInstance.addFeature1(did, wvm, wvmid, eid, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#addFeature1");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *did = did_example; // Document ID. (default to null)
String *wvm = wvm_example; // One of w or v or m corresponding to whether a workspace or version or microversion was entered. (default to null)
String *wvmid = wvmid_example; // Workspace (w), Version (v) or Microversion (m) ID. (default to null)
String *eid = eid_example; // Element ID. (default to null)
String *body = body_example; //  (optional)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Add Feature
[apiInstance addFeature1With:did
    wvm:wvm
    wvmid:wvmid
    eid:eid
    body:body
              completionHandler: ^(BTFeatureDefinitionResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OnshapeRestApi = require('onshape_rest_api');
var defaultClient = OnshapeRestApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new OnshapeRestApi.DefaultApi()
var did = did_example; // {String} Document ID.
var wvm = wvm_example; // {String} One of w or v or m corresponding to whether a workspace or version or microversion was entered.
var wvmid = wvmid_example; // {String} Workspace (w), Version (v) or Microversion (m) ID.
var eid = eid_example; // {String} Element ID.
var opts = {
  'body': body_example // {String} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.addFeature1(did, wvm, wvmid, eid, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class addFeature1Example
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new DefaultApi();
            var did = did_example;  // String | Document ID. (default to null)
            var wvm = wvm_example;  // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered. (default to null)
            var wvmid = wvmid_example;  // String | Workspace (w), Version (v) or Microversion (m) ID. (default to null)
            var eid = eid_example;  // String | Element ID. (default to null)
            var body = body_example;  // String |  (optional) 

            try
            {
                // Add Feature
                BTFeatureDefinitionResponse result = apiInstance.addFeature1(did, wvm, wvmid, eid, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.addFeature1: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$did = did_example; // String | Document ID.
$wvm = wvm_example; // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
$wvmid = wvmid_example; // String | Workspace (w), Version (v) or Microversion (m) ID.
$eid = eid_example; // String | Element ID.
$body = body_example; // String | 

try {
    $result = $api_instance->addFeature1($did, $wvm, $wvmid, $eid, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->addFeature1: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $did = did_example; # String | Document ID.
my $wvm = wvm_example; # String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
my $wvmid = wvmid_example; # String | Workspace (w), Version (v) or Microversion (m) ID.
my $eid = eid_example; # String | Element ID.
my $body = WWW::OPenAPIClient::Object::String->new(); # String | 

eval { 
    my $result = $api_instance->addFeature1(did => $did, wvm => $wvm, wvmid => $wvmid, eid => $eid, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->addFeature1: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.DefaultApi()
did = did_example # String | Document ID. (default to null)
wvm = wvm_example # String | One of w or v or m corresponding to whether a workspace or version or microversion was entered. (default to null)
wvmid = wvmid_example # String | Workspace (w), Version (v) or Microversion (m) ID. (default to null)
eid = eid_example # String | Element ID. (default to null)
body = body_example # String |  (optional)

try: 
    # Add Feature
    api_response = api_instance.add_feature1(did, wvm, wvmid, eid, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->addFeature1: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let did = did_example; // String
    let wvm = wvm_example; // String
    let wvmid = wvmid_example; // String
    let eid = eid_example; // String
    let body = body_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.addFeature1(did, wvm, wvmid, eid, body, &context).wait();
    println!("{:?}", result);

}

Scopes

OAuth2Internal Application is Onshape Internal
OAuth2ReadPII Application can read your profile information
OAuth2Read Application can read your documents
OAuth2Write Application can write to your documents
OAuth2Delete Application can delete your documents and workspaces
OAuth2Purchase Application can request purchases on your behalf
OAuth2Share Application can share and unshare documents on your behalf

Parameters

Path parameters
Name Description
did*
String
Document ID.
Required
wvm*
String
One of w or v or m corresponding to whether a workspace or version or microversion was entered.
Required
wvmid*
String
Workspace (w), Version (v) or Microversion (m) ID.
Required
eid*
String
Element ID.
Required
Body parameters
Name Description
body

feature The serialized feature definition

Responses


createPartStudio

Create Part Studio


/api/partstudios/d/{did}/w/{wid}

Usage and SDK Samples

curl -X POST "http://localhost/api/partstudios/d/{did}/w/{wid}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        DefaultApi apiInstance = new DefaultApi();
        String did = did_example; // String | Document ID.
        String wid = wid_example; // String | Workspace ID.
        BTModelElementParams bTModelElementParams = ; // BTModelElementParams | 
        try {
            BTDocumentElementInfo result = apiInstance.createPartStudio(did, wid, bTModelElementParams);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#createPartStudio");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String did = did_example; // String | Document ID.
        String wid = wid_example; // String | Workspace ID.
        BTModelElementParams bTModelElementParams = ; // BTModelElementParams | 
        try {
            BTDocumentElementInfo result = apiInstance.createPartStudio(did, wid, bTModelElementParams);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#createPartStudio");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *did = did_example; // Document ID. (default to null)
String *wid = wid_example; // Workspace ID. (default to null)
BTModelElementParams *bTModelElementParams = ; // 

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Create Part Studio
[apiInstance createPartStudioWith:did
    wid:wid
    bTModelElementParams:bTModelElementParams
              completionHandler: ^(BTDocumentElementInfo output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OnshapeRestApi = require('onshape_rest_api');
var defaultClient = OnshapeRestApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new OnshapeRestApi.DefaultApi()
var did = did_example; // {String} Document ID.
var wid = wid_example; // {String} Workspace ID.
var bTModelElementParams = ; // {BTModelElementParams} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createPartStudio(did, wid, bTModelElementParams, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createPartStudioExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new DefaultApi();
            var did = did_example;  // String | Document ID. (default to null)
            var wid = wid_example;  // String | Workspace ID. (default to null)
            var bTModelElementParams = new BTModelElementParams(); // BTModelElementParams | 

            try
            {
                // Create Part Studio
                BTDocumentElementInfo result = apiInstance.createPartStudio(did, wid, bTModelElementParams);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.createPartStudio: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$did = did_example; // String | Document ID.
$wid = wid_example; // String | Workspace ID.
$bTModelElementParams = ; // BTModelElementParams | 

try {
    $result = $api_instance->createPartStudio($did, $wid, $bTModelElementParams);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->createPartStudio: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $did = did_example; # String | Document ID.
my $wid = wid_example; # String | Workspace ID.
my $bTModelElementParams = WWW::OPenAPIClient::Object::BTModelElementParams->new(); # BTModelElementParams | 

eval { 
    my $result = $api_instance->createPartStudio(did => $did, wid => $wid, bTModelElementParams => $bTModelElementParams);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->createPartStudio: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.DefaultApi()
did = did_example # String | Document ID. (default to null)
wid = wid_example # String | Workspace ID. (default to null)
bTModelElementParams =  # BTModelElementParams | 

try: 
    # Create Part Studio
    api_response = api_instance.create_part_studio(did, wid, bTModelElementParams)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->createPartStudio: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let did = did_example; // String
    let wid = wid_example; // String
    let bTModelElementParams = ; // BTModelElementParams

    let mut context = DefaultApi::Context::default();
    let result = client.createPartStudio(did, wid, bTModelElementParams, &context).wait();
    println!("{:?}", result);

}

Scopes

OAuth2Internal Application is Onshape Internal
OAuth2ReadPII Application can read your profile information
OAuth2Read Application can read your documents
OAuth2Write Application can write to your documents
OAuth2Delete Application can delete your documents and workspaces
OAuth2Purchase Application can request purchases on your behalf
OAuth2Share Application can share and unshare documents on your behalf

Parameters

Path parameters
Name Description
did*
String
Document ID.
Required
wid*
String
Workspace ID.
Required
Body parameters
Name Description
bTModelElementParams *

Responses


exportPS1

Export Part Studio to Parasolid


/api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/parasolid

Usage and SDK Samples

curl -X GET "http://localhost/api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/parasolid?partIds=&version=&includeExportIds=&configuration=&linkDocumentId="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        DefaultApi apiInstance = new DefaultApi();
        String did = did_example; // String | Document ID.
        String wvm = wvm_example; // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
        String wvmid = wvmid_example; // String | Workspace (w), Version (v) or Microversion (m) ID.
        String eid = eid_example; // String | Element ID.
        String partIds = partIds_example; // String | IDs of the parts to retrieve. Repeat query param to add more than one, i.e. partId=JHK&partId=JHD). May not be combined with other ID filters
        String version = version_example; // String | Parasolid version
        Boolean includeExportIds = true; // Boolean | Whether topolgy ids should be exported as parasolid attributes
        String configuration = configuration_example; // String | Configuration string.
        String linkDocumentId = linkDocumentId_example; // String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.
        try {
            apiInstance.exportPS1(did, wvm, wvmid, eid, partIds, version, includeExportIds, configuration, linkDocumentId);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#exportPS1");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String did = did_example; // String | Document ID.
        String wvm = wvm_example; // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
        String wvmid = wvmid_example; // String | Workspace (w), Version (v) or Microversion (m) ID.
        String eid = eid_example; // String | Element ID.
        String partIds = partIds_example; // String | IDs of the parts to retrieve. Repeat query param to add more than one, i.e. partId=JHK&partId=JHD). May not be combined with other ID filters
        String version = version_example; // String | Parasolid version
        Boolean includeExportIds = true; // Boolean | Whether topolgy ids should be exported as parasolid attributes
        String configuration = configuration_example; // String | Configuration string.
        String linkDocumentId = linkDocumentId_example; // String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.
        try {
            apiInstance.exportPS1(did, wvm, wvmid, eid, partIds, version, includeExportIds, configuration, linkDocumentId);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#exportPS1");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *did = did_example; // Document ID. (default to null)
String *wvm = wvm_example; // One of w or v or m corresponding to whether a workspace or version or microversion was entered. (default to null)
String *wvmid = wvmid_example; // Workspace (w), Version (v) or Microversion (m) ID. (default to null)
String *eid = eid_example; // Element ID. (default to null)
String *partIds = partIds_example; // IDs of the parts to retrieve. Repeat query param to add more than one, i.e. partId=JHK&partId=JHD). May not be combined with other ID filters (optional) (default to null)
String *version = version_example; // Parasolid version (optional) (default to 0)
Boolean *includeExportIds = true; // Whether topolgy ids should be exported as parasolid attributes (optional) (default to false)
String *configuration = configuration_example; // Configuration string. (optional) (default to null)
String *linkDocumentId = linkDocumentId_example; // Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter. (optional) (default to null)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Export Part Studio to Parasolid
[apiInstance exportPS1With:did
    wvm:wvm
    wvmid:wvmid
    eid:eid
    partIds:partIds
    version:version
    includeExportIds:includeExportIds
    configuration:configuration
    linkDocumentId:linkDocumentId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OnshapeRestApi = require('onshape_rest_api');
var defaultClient = OnshapeRestApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new OnshapeRestApi.DefaultApi()
var did = did_example; // {String} Document ID.
var wvm = wvm_example; // {String} One of w or v or m corresponding to whether a workspace or version or microversion was entered.
var wvmid = wvmid_example; // {String} Workspace (w), Version (v) or Microversion (m) ID.
var eid = eid_example; // {String} Element ID.
var opts = {
  'partIds': partIds_example, // {String} IDs of the parts to retrieve. Repeat query param to add more than one, i.e. partId=JHK&partId=JHD). May not be combined with other ID filters
  'version': version_example, // {String} Parasolid version
  'includeExportIds': true, // {Boolean} Whether topolgy ids should be exported as parasolid attributes
  'configuration': configuration_example, // {String} Configuration string.
  'linkDocumentId': linkDocumentId_example // {String} Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.exportPS1(did, wvm, wvmid, eid, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class exportPS1Example
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new DefaultApi();
            var did = did_example;  // String | Document ID. (default to null)
            var wvm = wvm_example;  // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered. (default to null)
            var wvmid = wvmid_example;  // String | Workspace (w), Version (v) or Microversion (m) ID. (default to null)
            var eid = eid_example;  // String | Element ID. (default to null)
            var partIds = partIds_example;  // String | IDs of the parts to retrieve. Repeat query param to add more than one, i.e. partId=JHK&partId=JHD). May not be combined with other ID filters (optional)  (default to null)
            var version = version_example;  // String | Parasolid version (optional)  (default to 0)
            var includeExportIds = true;  // Boolean | Whether topolgy ids should be exported as parasolid attributes (optional)  (default to false)
            var configuration = configuration_example;  // String | Configuration string. (optional)  (default to null)
            var linkDocumentId = linkDocumentId_example;  // String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter. (optional)  (default to null)

            try
            {
                // Export Part Studio to Parasolid
                apiInstance.exportPS1(did, wvm, wvmid, eid, partIds, version, includeExportIds, configuration, linkDocumentId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.exportPS1: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$did = did_example; // String | Document ID.
$wvm = wvm_example; // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
$wvmid = wvmid_example; // String | Workspace (w), Version (v) or Microversion (m) ID.
$eid = eid_example; // String | Element ID.
$partIds = partIds_example; // String | IDs of the parts to retrieve. Repeat query param to add more than one, i.e. partId=JHK&partId=JHD). May not be combined with other ID filters
$version = version_example; // String | Parasolid version
$includeExportIds = true; // Boolean | Whether topolgy ids should be exported as parasolid attributes
$configuration = configuration_example; // String | Configuration string.
$linkDocumentId = linkDocumentId_example; // String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.

try {
    $api_instance->exportPS1($did, $wvm, $wvmid, $eid, $partIds, $version, $includeExportIds, $configuration, $linkDocumentId);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->exportPS1: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $did = did_example; # String | Document ID.
my $wvm = wvm_example; # String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
my $wvmid = wvmid_example; # String | Workspace (w), Version (v) or Microversion (m) ID.
my $eid = eid_example; # String | Element ID.
my $partIds = partIds_example; # String | IDs of the parts to retrieve. Repeat query param to add more than one, i.e. partId=JHK&partId=JHD). May not be combined with other ID filters
my $version = version_example; # String | Parasolid version
my $includeExportIds = true; # Boolean | Whether topolgy ids should be exported as parasolid attributes
my $configuration = configuration_example; # String | Configuration string.
my $linkDocumentId = linkDocumentId_example; # String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.

eval { 
    $api_instance->exportPS1(did => $did, wvm => $wvm, wvmid => $wvmid, eid => $eid, partIds => $partIds, version => $version, includeExportIds => $includeExportIds, configuration => $configuration, linkDocumentId => $linkDocumentId);
};
if ($@) {
    warn "Exception when calling DefaultApi->exportPS1: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.DefaultApi()
did = did_example # String | Document ID. (default to null)
wvm = wvm_example # String | One of w or v or m corresponding to whether a workspace or version or microversion was entered. (default to null)
wvmid = wvmid_example # String | Workspace (w), Version (v) or Microversion (m) ID. (default to null)
eid = eid_example # String | Element ID. (default to null)
partIds = partIds_example # String | IDs of the parts to retrieve. Repeat query param to add more than one, i.e. partId=JHK&partId=JHD). May not be combined with other ID filters (optional) (default to null)
version = version_example # String | Parasolid version (optional) (default to 0)
includeExportIds = true # Boolean | Whether topolgy ids should be exported as parasolid attributes (optional) (default to false)
configuration = configuration_example # String | Configuration string. (optional) (default to null)
linkDocumentId = linkDocumentId_example # String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter. (optional) (default to null)

try: 
    # Export Part Studio to Parasolid
    api_instance.export_ps1(did, wvm, wvmid, eid, partIds=partIds, version=version, includeExportIds=includeExportIds, configuration=configuration, linkDocumentId=linkDocumentId)
except ApiException as e:
    print("Exception when calling DefaultApi->exportPS1: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let did = did_example; // String
    let wvm = wvm_example; // String
    let wvmid = wvmid_example; // String
    let eid = eid_example; // String
    let partIds = partIds_example; // String
    let version = version_example; // String
    let includeExportIds = true; // Boolean
    let configuration = configuration_example; // String
    let linkDocumentId = linkDocumentId_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.exportPS1(did, wvm, wvmid, eid, partIds, version, includeExportIds, configuration, linkDocumentId, &context).wait();
    println!("{:?}", result);

}

Scopes

OAuth2Internal Application is Onshape Internal
OAuth2ReadPII Application can read your profile information
OAuth2Read Application can read your documents
OAuth2Write Application can write to your documents
OAuth2Delete Application can delete your documents and workspaces
OAuth2Purchase Application can request purchases on your behalf
OAuth2Share Application can share and unshare documents on your behalf

Parameters

Path parameters
Name Description
did*
String
Document ID.
Required
wvm*
String
One of w or v or m corresponding to whether a workspace or version or microversion was entered.
Required
wvmid*
String
Workspace (w), Version (v) or Microversion (m) ID.
Required
eid*
String
Element ID.
Required
Query parameters
Name Description
partIds
String
IDs of the parts to retrieve. Repeat query param to add more than one, i.e. partId=JHK&partId=JHD). May not be combined with other ID filters
version
String
Parasolid version
includeExportIds
Boolean
Whether topolgy ids should be exported as parasolid attributes
configuration
String
Configuration string.
linkDocumentId
String
Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.

Responses


exportStl1

Export Part Studio to STL


/api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/stl

Usage and SDK Samples

curl -X GET "http://localhost/api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/stl?partIds=&mode=&grouping=&scale=&units=&angleTolerance=&chordTolerance=&maxFacetWidth=&minFacetWidth=&configuration=&linkDocumentId="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        DefaultApi apiInstance = new DefaultApi();
        String did = did_example; // String | Document ID.
        String wvm = wvm_example; // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
        String wvmid = wvmid_example; // String | Workspace (w), Version (v) or Microversion (m) ID.
        String eid = eid_example; // String | Element ID.
        String partIds = partIds_example; // String | IDs of the parts to retrieve. Repeat query param to add more than one, i.e. partId=JHK&partId=JHD). May not be combined with other ID filters
        String mode = mode_example; // String | Type of file: text, binary
        Boolean grouping = true; // Boolean | Whether parts should be exported as a group or individually in a .zip file
        Double scale = 1.2; // Double | Scale for measurements.
        String units = units_example; // String | Name of base unit (meter, centimeter, millimeter, inch, foot, or yard)
        Double angleTolerance = 1.2; // Double | Angle tolerance (in radians). This specifies the limit on the sum of the angular deviations of a tessellation chord from the tangent vectors at two chord endpoints. The specified value must be less than PI/2. This parameter currently has a default value chosen based on the complexity of the parts being tessellated.
        Double chordTolerance = 1.2; // Double | Chord tolerance (in meters). This specifies the limit on the maximum deviation of a tessellation chord from the true surface/edge. This parameter currently has a default value chosen based on the size and complexity of the parts being tessellated.
        Double maxFacetWidth = 1.2; // Double | Max facet width. This specifies the limit on the size of any side of a tessellation facet.
        Double minFacetWidth = 1.2; // Double | Max facet width. This specifies the limit on the size of any side of a tessellation facet.
        String configuration = configuration_example; // String | Configuration string.
        String linkDocumentId = linkDocumentId_example; // String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.
        try {
            apiInstance.exportStl1(did, wvm, wvmid, eid, partIds, mode, grouping, scale, units, angleTolerance, chordTolerance, maxFacetWidth, minFacetWidth, configuration, linkDocumentId);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#exportStl1");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String did = did_example; // String | Document ID.
        String wvm = wvm_example; // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
        String wvmid = wvmid_example; // String | Workspace (w), Version (v) or Microversion (m) ID.
        String eid = eid_example; // String | Element ID.
        String partIds = partIds_example; // String | IDs of the parts to retrieve. Repeat query param to add more than one, i.e. partId=JHK&partId=JHD). May not be combined with other ID filters
        String mode = mode_example; // String | Type of file: text, binary
        Boolean grouping = true; // Boolean | Whether parts should be exported as a group or individually in a .zip file
        Double scale = 1.2; // Double | Scale for measurements.
        String units = units_example; // String | Name of base unit (meter, centimeter, millimeter, inch, foot, or yard)
        Double angleTolerance = 1.2; // Double | Angle tolerance (in radians). This specifies the limit on the sum of the angular deviations of a tessellation chord from the tangent vectors at two chord endpoints. The specified value must be less than PI/2. This parameter currently has a default value chosen based on the complexity of the parts being tessellated.
        Double chordTolerance = 1.2; // Double | Chord tolerance (in meters). This specifies the limit on the maximum deviation of a tessellation chord from the true surface/edge. This parameter currently has a default value chosen based on the size and complexity of the parts being tessellated.
        Double maxFacetWidth = 1.2; // Double | Max facet width. This specifies the limit on the size of any side of a tessellation facet.
        Double minFacetWidth = 1.2; // Double | Max facet width. This specifies the limit on the size of any side of a tessellation facet.
        String configuration = configuration_example; // String | Configuration string.
        String linkDocumentId = linkDocumentId_example; // String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.
        try {
            apiInstance.exportStl1(did, wvm, wvmid, eid, partIds, mode, grouping, scale, units, angleTolerance, chordTolerance, maxFacetWidth, minFacetWidth, configuration, linkDocumentId);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#exportStl1");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *did = did_example; // Document ID. (default to null)
String *wvm = wvm_example; // One of w or v or m corresponding to whether a workspace or version or microversion was entered. (default to null)
String *wvmid = wvmid_example; // Workspace (w), Version (v) or Microversion (m) ID. (default to null)
String *eid = eid_example; // Element ID. (default to null)
String *partIds = partIds_example; // IDs of the parts to retrieve. Repeat query param to add more than one, i.e. partId=JHK&partId=JHD). May not be combined with other ID filters (optional) (default to null)
String *mode = mode_example; // Type of file: text, binary (optional) (default to text)
Boolean *grouping = true; // Whether parts should be exported as a group or individually in a .zip file (optional) (default to true)
Double *scale = 1.2; // Scale for measurements. (optional) (default to 1.0)
String *units = units_example; // Name of base unit (meter, centimeter, millimeter, inch, foot, or yard) (optional) (default to inch)
Double *angleTolerance = 1.2; // Angle tolerance (in radians). This specifies the limit on the sum of the angular deviations of a tessellation chord from the tangent vectors at two chord endpoints. The specified value must be less than PI/2. This parameter currently has a default value chosen based on the complexity of the parts being tessellated. (optional) (default to null)
Double *chordTolerance = 1.2; // Chord tolerance (in meters). This specifies the limit on the maximum deviation of a tessellation chord from the true surface/edge. This parameter currently has a default value chosen based on the size and complexity of the parts being tessellated. (optional) (default to null)
Double *maxFacetWidth = 1.2; // Max facet width. This specifies the limit on the size of any side of a tessellation facet. (optional) (default to null)
Double *minFacetWidth = 1.2; // Max facet width. This specifies the limit on the size of any side of a tessellation facet. (optional) (default to null)
String *configuration = configuration_example; // Configuration string. (optional) (default to null)
String *linkDocumentId = linkDocumentId_example; // Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter. (optional) (default to null)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Export Part Studio to STL
[apiInstance exportStl1With:did
    wvm:wvm
    wvmid:wvmid
    eid:eid
    partIds:partIds
    mode:mode
    grouping:grouping
    scale:scale
    units:units
    angleTolerance:angleTolerance
    chordTolerance:chordTolerance
    maxFacetWidth:maxFacetWidth
    minFacetWidth:minFacetWidth
    configuration:configuration
    linkDocumentId:linkDocumentId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OnshapeRestApi = require('onshape_rest_api');
var defaultClient = OnshapeRestApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new OnshapeRestApi.DefaultApi()
var did = did_example; // {String} Document ID.
var wvm = wvm_example; // {String} One of w or v or m corresponding to whether a workspace or version or microversion was entered.
var wvmid = wvmid_example; // {String} Workspace (w), Version (v) or Microversion (m) ID.
var eid = eid_example; // {String} Element ID.
var opts = {
  'partIds': partIds_example, // {String} IDs of the parts to retrieve. Repeat query param to add more than one, i.e. partId=JHK&partId=JHD). May not be combined with other ID filters
  'mode': mode_example, // {String} Type of file: text, binary
  'grouping': true, // {Boolean} Whether parts should be exported as a group or individually in a .zip file
  'scale': 1.2, // {Double} Scale for measurements.
  'units': units_example, // {String} Name of base unit (meter, centimeter, millimeter, inch, foot, or yard)
  'angleTolerance': 1.2, // {Double} Angle tolerance (in radians). This specifies the limit on the sum of the angular deviations of a tessellation chord from the tangent vectors at two chord endpoints. The specified value must be less than PI/2. This parameter currently has a default value chosen based on the complexity of the parts being tessellated.
  'chordTolerance': 1.2, // {Double} Chord tolerance (in meters). This specifies the limit on the maximum deviation of a tessellation chord from the true surface/edge. This parameter currently has a default value chosen based on the size and complexity of the parts being tessellated.
  'maxFacetWidth': 1.2, // {Double} Max facet width. This specifies the limit on the size of any side of a tessellation facet.
  'minFacetWidth': 1.2, // {Double} Max facet width. This specifies the limit on the size of any side of a tessellation facet.
  'configuration': configuration_example, // {String} Configuration string.
  'linkDocumentId': linkDocumentId_example // {String} Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.exportStl1(did, wvm, wvmid, eid, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class exportStl1Example
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new DefaultApi();
            var did = did_example;  // String | Document ID. (default to null)
            var wvm = wvm_example;  // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered. (default to null)
            var wvmid = wvmid_example;  // String | Workspace (w), Version (v) or Microversion (m) ID. (default to null)
            var eid = eid_example;  // String | Element ID. (default to null)
            var partIds = partIds_example;  // String | IDs of the parts to retrieve. Repeat query param to add more than one, i.e. partId=JHK&partId=JHD). May not be combined with other ID filters (optional)  (default to null)
            var mode = mode_example;  // String | Type of file: text, binary (optional)  (default to text)
            var grouping = true;  // Boolean | Whether parts should be exported as a group or individually in a .zip file (optional)  (default to true)
            var scale = 1.2;  // Double | Scale for measurements. (optional)  (default to 1.0)
            var units = units_example;  // String | Name of base unit (meter, centimeter, millimeter, inch, foot, or yard) (optional)  (default to inch)
            var angleTolerance = 1.2;  // Double | Angle tolerance (in radians). This specifies the limit on the sum of the angular deviations of a tessellation chord from the tangent vectors at two chord endpoints. The specified value must be less than PI/2. This parameter currently has a default value chosen based on the complexity of the parts being tessellated. (optional)  (default to null)
            var chordTolerance = 1.2;  // Double | Chord tolerance (in meters). This specifies the limit on the maximum deviation of a tessellation chord from the true surface/edge. This parameter currently has a default value chosen based on the size and complexity of the parts being tessellated. (optional)  (default to null)
            var maxFacetWidth = 1.2;  // Double | Max facet width. This specifies the limit on the size of any side of a tessellation facet. (optional)  (default to null)
            var minFacetWidth = 1.2;  // Double | Max facet width. This specifies the limit on the size of any side of a tessellation facet. (optional)  (default to null)
            var configuration = configuration_example;  // String | Configuration string. (optional)  (default to null)
            var linkDocumentId = linkDocumentId_example;  // String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter. (optional)  (default to null)

            try
            {
                // Export Part Studio to STL
                apiInstance.exportStl1(did, wvm, wvmid, eid, partIds, mode, grouping, scale, units, angleTolerance, chordTolerance, maxFacetWidth, minFacetWidth, configuration, linkDocumentId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.exportStl1: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$did = did_example; // String | Document ID.
$wvm = wvm_example; // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
$wvmid = wvmid_example; // String | Workspace (w), Version (v) or Microversion (m) ID.
$eid = eid_example; // String | Element ID.
$partIds = partIds_example; // String | IDs of the parts to retrieve. Repeat query param to add more than one, i.e. partId=JHK&partId=JHD). May not be combined with other ID filters
$mode = mode_example; // String | Type of file: text, binary
$grouping = true; // Boolean | Whether parts should be exported as a group or individually in a .zip file
$scale = 1.2; // Double | Scale for measurements.
$units = units_example; // String | Name of base unit (meter, centimeter, millimeter, inch, foot, or yard)
$angleTolerance = 1.2; // Double | Angle tolerance (in radians). This specifies the limit on the sum of the angular deviations of a tessellation chord from the tangent vectors at two chord endpoints. The specified value must be less than PI/2. This parameter currently has a default value chosen based on the complexity of the parts being tessellated.
$chordTolerance = 1.2; // Double | Chord tolerance (in meters). This specifies the limit on the maximum deviation of a tessellation chord from the true surface/edge. This parameter currently has a default value chosen based on the size and complexity of the parts being tessellated.
$maxFacetWidth = 1.2; // Double | Max facet width. This specifies the limit on the size of any side of a tessellation facet.
$minFacetWidth = 1.2; // Double | Max facet width. This specifies the limit on the size of any side of a tessellation facet.
$configuration = configuration_example; // String | Configuration string.
$linkDocumentId = linkDocumentId_example; // String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.

try {
    $api_instance->exportStl1($did, $wvm, $wvmid, $eid, $partIds, $mode, $grouping, $scale, $units, $angleTolerance, $chordTolerance, $maxFacetWidth, $minFacetWidth, $configuration, $linkDocumentId);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->exportStl1: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $did = did_example; # String | Document ID.
my $wvm = wvm_example; # String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
my $wvmid = wvmid_example; # String | Workspace (w), Version (v) or Microversion (m) ID.
my $eid = eid_example; # String | Element ID.
my $partIds = partIds_example; # String | IDs of the parts to retrieve. Repeat query param to add more than one, i.e. partId=JHK&partId=JHD). May not be combined with other ID filters
my $mode = mode_example; # String | Type of file: text, binary
my $grouping = true; # Boolean | Whether parts should be exported as a group or individually in a .zip file
my $scale = 1.2; # Double | Scale for measurements.
my $units = units_example; # String | Name of base unit (meter, centimeter, millimeter, inch, foot, or yard)
my $angleTolerance = 1.2; # Double | Angle tolerance (in radians). This specifies the limit on the sum of the angular deviations of a tessellation chord from the tangent vectors at two chord endpoints. The specified value must be less than PI/2. This parameter currently has a default value chosen based on the complexity of the parts being tessellated.
my $chordTolerance = 1.2; # Double | Chord tolerance (in meters). This specifies the limit on the maximum deviation of a tessellation chord from the true surface/edge. This parameter currently has a default value chosen based on the size and complexity of the parts being tessellated.
my $maxFacetWidth = 1.2; # Double | Max facet width. This specifies the limit on the size of any side of a tessellation facet.
my $minFacetWidth = 1.2; # Double | Max facet width. This specifies the limit on the size of any side of a tessellation facet.
my $configuration = configuration_example; # String | Configuration string.
my $linkDocumentId = linkDocumentId_example; # String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.

eval { 
    $api_instance->exportStl1(did => $did, wvm => $wvm, wvmid => $wvmid, eid => $eid, partIds => $partIds, mode => $mode, grouping => $grouping, scale => $scale, units => $units, angleTolerance => $angleTolerance, chordTolerance => $chordTolerance, maxFacetWidth => $maxFacetWidth, minFacetWidth => $minFacetWidth, configuration => $configuration, linkDocumentId => $linkDocumentId);
};
if ($@) {
    warn "Exception when calling DefaultApi->exportStl1: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.DefaultApi()
did = did_example # String | Document ID. (default to null)
wvm = wvm_example # String | One of w or v or m corresponding to whether a workspace or version or microversion was entered. (default to null)
wvmid = wvmid_example # String | Workspace (w), Version (v) or Microversion (m) ID. (default to null)
eid = eid_example # String | Element ID. (default to null)
partIds = partIds_example # String | IDs of the parts to retrieve. Repeat query param to add more than one, i.e. partId=JHK&partId=JHD). May not be combined with other ID filters (optional) (default to null)
mode = mode_example # String | Type of file: text, binary (optional) (default to text)
grouping = true # Boolean | Whether parts should be exported as a group or individually in a .zip file (optional) (default to true)
scale = 1.2 # Double | Scale for measurements. (optional) (default to 1.0)
units = units_example # String | Name of base unit (meter, centimeter, millimeter, inch, foot, or yard) (optional) (default to inch)
angleTolerance = 1.2 # Double | Angle tolerance (in radians). This specifies the limit on the sum of the angular deviations of a tessellation chord from the tangent vectors at two chord endpoints. The specified value must be less than PI/2. This parameter currently has a default value chosen based on the complexity of the parts being tessellated. (optional) (default to null)
chordTolerance = 1.2 # Double | Chord tolerance (in meters). This specifies the limit on the maximum deviation of a tessellation chord from the true surface/edge. This parameter currently has a default value chosen based on the size and complexity of the parts being tessellated. (optional) (default to null)
maxFacetWidth = 1.2 # Double | Max facet width. This specifies the limit on the size of any side of a tessellation facet. (optional) (default to null)
minFacetWidth = 1.2 # Double | Max facet width. This specifies the limit on the size of any side of a tessellation facet. (optional) (default to null)
configuration = configuration_example # String | Configuration string. (optional) (default to null)
linkDocumentId = linkDocumentId_example # String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter. (optional) (default to null)

try: 
    # Export Part Studio to STL
    api_instance.export_stl1(did, wvm, wvmid, eid, partIds=partIds, mode=mode, grouping=grouping, scale=scale, units=units, angleTolerance=angleTolerance, chordTolerance=chordTolerance, maxFacetWidth=maxFacetWidth, minFacetWidth=minFacetWidth, configuration=configuration, linkDocumentId=linkDocumentId)
except ApiException as e:
    print("Exception when calling DefaultApi->exportStl1: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let did = did_example; // String
    let wvm = wvm_example; // String
    let wvmid = wvmid_example; // String
    let eid = eid_example; // String
    let partIds = partIds_example; // String
    let mode = mode_example; // String
    let grouping = true; // Boolean
    let scale = 1.2; // Double
    let units = units_example; // String
    let angleTolerance = 1.2; // Double
    let chordTolerance = 1.2; // Double
    let maxFacetWidth = 1.2; // Double
    let minFacetWidth = 1.2; // Double
    let configuration = configuration_example; // String
    let linkDocumentId = linkDocumentId_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.exportStl1(did, wvm, wvmid, eid, partIds, mode, grouping, scale, units, angleTolerance, chordTolerance, maxFacetWidth, minFacetWidth, configuration, linkDocumentId, &context).wait();
    println!("{:?}", result);

}

Scopes

OAuth2Internal Application is Onshape Internal
OAuth2ReadPII Application can read your profile information
OAuth2Read Application can read your documents
OAuth2Write Application can write to your documents
OAuth2Delete Application can delete your documents and workspaces
OAuth2Purchase Application can request purchases on your behalf
OAuth2Share Application can share and unshare documents on your behalf

Parameters

Path parameters
Name Description
did*
String
Document ID.
Required
wvm*
String
One of w or v or m corresponding to whether a workspace or version or microversion was entered.
Required
wvmid*
String
Workspace (w), Version (v) or Microversion (m) ID.
Required
eid*
String
Element ID.
Required
Query parameters
Name Description
partIds
String
IDs of the parts to retrieve. Repeat query param to add more than one, i.e. partId=JHK&partId=JHD). May not be combined with other ID filters
mode
String
Type of file: text, binary
grouping
Boolean
Whether parts should be exported as a group or individually in a .zip file
scale
Double (double)
Scale for measurements.
units
String
Name of base unit (meter, centimeter, millimeter, inch, foot, or yard)
angleTolerance
Double (double)
Angle tolerance (in radians). This specifies the limit on the sum of the angular deviations of a tessellation chord from the tangent vectors at two chord endpoints. The specified value must be less than PI/2. This parameter currently has a default value chosen based on the complexity of the parts being tessellated.
chordTolerance
Double (double)
Chord tolerance (in meters). This specifies the limit on the maximum deviation of a tessellation chord from the true surface/edge. This parameter currently has a default value chosen based on the size and complexity of the parts being tessellated.
maxFacetWidth
Double (double)
Max facet width. This specifies the limit on the size of any side of a tessellation facet.
minFacetWidth
Double (double)
Max facet width. This specifies the limit on the size of any side of a tessellation facet.
configuration
String
Configuration string.
linkDocumentId
String
Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.

Responses


getBodyDetails2

Array of body information


/api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/bodydetails

Usage and SDK Samples

curl -X GET "http://localhost/api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/bodydetails?configuration=&linkDocumentId="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        DefaultApi apiInstance = new DefaultApi();
        String did = did_example; // String | Document ID.
        String wvm = wvm_example; // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
        String wvmid = wvmid_example; // String | Workspace (w), Version (v) or Microversion (m) ID.
        String eid = eid_example; // String | Element ID.
        String configuration = configuration_example; // String | Configuration string.
        String linkDocumentId = linkDocumentId_example; // String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.
        try {
            array[BTExportModelBodiesResponse] result = apiInstance.getBodyDetails2(did, wvm, wvmid, eid, configuration, linkDocumentId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getBodyDetails2");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String did = did_example; // String | Document ID.
        String wvm = wvm_example; // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
        String wvmid = wvmid_example; // String | Workspace (w), Version (v) or Microversion (m) ID.
        String eid = eid_example; // String | Element ID.
        String configuration = configuration_example; // String | Configuration string.
        String linkDocumentId = linkDocumentId_example; // String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.
        try {
            array[BTExportModelBodiesResponse] result = apiInstance.getBodyDetails2(did, wvm, wvmid, eid, configuration, linkDocumentId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getBodyDetails2");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *did = did_example; // Document ID. (default to null)
String *wvm = wvm_example; // One of w or v or m corresponding to whether a workspace or version or microversion was entered. (default to null)
String *wvmid = wvmid_example; // Workspace (w), Version (v) or Microversion (m) ID. (default to null)
String *eid = eid_example; // Element ID. (default to null)
String *configuration = configuration_example; // Configuration string. (optional) (default to null)
String *linkDocumentId = linkDocumentId_example; // Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter. (optional) (default to null)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Array of body information
[apiInstance getBodyDetails2With:did
    wvm:wvm
    wvmid:wvmid
    eid:eid
    configuration:configuration
    linkDocumentId:linkDocumentId
              completionHandler: ^(array[BTExportModelBodiesResponse] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OnshapeRestApi = require('onshape_rest_api');
var defaultClient = OnshapeRestApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new OnshapeRestApi.DefaultApi()
var did = did_example; // {String} Document ID.
var wvm = wvm_example; // {String} One of w or v or m corresponding to whether a workspace or version or microversion was entered.
var wvmid = wvmid_example; // {String} Workspace (w), Version (v) or Microversion (m) ID.
var eid = eid_example; // {String} Element ID.
var opts = {
  'configuration': configuration_example, // {String} Configuration string.
  'linkDocumentId': linkDocumentId_example // {String} Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getBodyDetails2(did, wvm, wvmid, eid, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getBodyDetails2Example
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new DefaultApi();
            var did = did_example;  // String | Document ID. (default to null)
            var wvm = wvm_example;  // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered. (default to null)
            var wvmid = wvmid_example;  // String | Workspace (w), Version (v) or Microversion (m) ID. (default to null)
            var eid = eid_example;  // String | Element ID. (default to null)
            var configuration = configuration_example;  // String | Configuration string. (optional)  (default to null)
            var linkDocumentId = linkDocumentId_example;  // String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter. (optional)  (default to null)

            try
            {
                // Array of body information
                array[BTExportModelBodiesResponse] result = apiInstance.getBodyDetails2(did, wvm, wvmid, eid, configuration, linkDocumentId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.getBodyDetails2: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$did = did_example; // String | Document ID.
$wvm = wvm_example; // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
$wvmid = wvmid_example; // String | Workspace (w), Version (v) or Microversion (m) ID.
$eid = eid_example; // String | Element ID.
$configuration = configuration_example; // String | Configuration string.
$linkDocumentId = linkDocumentId_example; // String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.

try {
    $result = $api_instance->getBodyDetails2($did, $wvm, $wvmid, $eid, $configuration, $linkDocumentId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->getBodyDetails2: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $did = did_example; # String | Document ID.
my $wvm = wvm_example; # String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
my $wvmid = wvmid_example; # String | Workspace (w), Version (v) or Microversion (m) ID.
my $eid = eid_example; # String | Element ID.
my $configuration = configuration_example; # String | Configuration string.
my $linkDocumentId = linkDocumentId_example; # String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.

eval { 
    my $result = $api_instance->getBodyDetails2(did => $did, wvm => $wvm, wvmid => $wvmid, eid => $eid, configuration => $configuration, linkDocumentId => $linkDocumentId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->getBodyDetails2: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.DefaultApi()
did = did_example # String | Document ID. (default to null)
wvm = wvm_example # String | One of w or v or m corresponding to whether a workspace or version or microversion was entered. (default to null)
wvmid = wvmid_example # String | Workspace (w), Version (v) or Microversion (m) ID. (default to null)
eid = eid_example # String | Element ID. (default to null)
configuration = configuration_example # String | Configuration string. (optional) (default to null)
linkDocumentId = linkDocumentId_example # String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter. (optional) (default to null)

try: 
    # Array of body information
    api_response = api_instance.get_body_details2(did, wvm, wvmid, eid, configuration=configuration, linkDocumentId=linkDocumentId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->getBodyDetails2: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let did = did_example; // String
    let wvm = wvm_example; // String
    let wvmid = wvmid_example; // String
    let eid = eid_example; // String
    let configuration = configuration_example; // String
    let linkDocumentId = linkDocumentId_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.getBodyDetails2(did, wvm, wvmid, eid, configuration, linkDocumentId, &context).wait();
    println!("{:?}", result);

}

Scopes

OAuth2Internal Application is Onshape Internal
OAuth2ReadPII Application can read your profile information
OAuth2Read Application can read your documents
OAuth2Write Application can write to your documents
OAuth2Delete Application can delete your documents and workspaces
OAuth2Purchase Application can request purchases on your behalf
OAuth2Share Application can share and unshare documents on your behalf

Parameters

Path parameters
Name Description
did*
String
Document ID.
Required
wvm*
String
One of w or v or m corresponding to whether a workspace or version or microversion was entered.
Required
wvmid*
String
Workspace (w), Version (v) or Microversion (m) ID.
Required
eid*
String
Element ID.
Required
Query parameters
Name Description
configuration
String
Configuration string.
linkDocumentId
String
Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.

Responses


getBoundingBoxes2

Mass properties of parts or a PartStudio.


/api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/boundingboxes

Usage and SDK Samples

curl -X GET "http://localhost/api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/boundingboxes?includeHidden=&includeWireBodies=&configuration=&linkDocumentId="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        DefaultApi apiInstance = new DefaultApi();
        String did = did_example; // String | Document ID.
        String wvm = wvm_example; // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
        String wvmid = wvmid_example; // String | Workspace (w), Version (v) or Microversion (m) ID.
        String eid = eid_example; // String | Element ID.
        Boolean includeHidden = true; // Boolean | Whether or not to include bounding boxes for hidden parts.
        Boolean includeWireBodies = true; // Boolean | Whether to include wire bodies in the bounding box.
        String configuration = configuration_example; // String | Configuration string.
        String linkDocumentId = linkDocumentId_example; // String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.
        try {
            BTBoundingBox result = apiInstance.getBoundingBoxes2(did, wvm, wvmid, eid, includeHidden, includeWireBodies, configuration, linkDocumentId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getBoundingBoxes2");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String did = did_example; // String | Document ID.
        String wvm = wvm_example; // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
        String wvmid = wvmid_example; // String | Workspace (w), Version (v) or Microversion (m) ID.
        String eid = eid_example; // String | Element ID.
        Boolean includeHidden = true; // Boolean | Whether or not to include bounding boxes for hidden parts.
        Boolean includeWireBodies = true; // Boolean | Whether to include wire bodies in the bounding box.
        String configuration = configuration_example; // String | Configuration string.
        String linkDocumentId = linkDocumentId_example; // String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.
        try {
            BTBoundingBox result = apiInstance.getBoundingBoxes2(did, wvm, wvmid, eid, includeHidden, includeWireBodies, configuration, linkDocumentId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getBoundingBoxes2");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *did = did_example; // Document ID. (default to null)
String *wvm = wvm_example; // One of w or v or m corresponding to whether a workspace or version or microversion was entered. (default to null)
String *wvmid = wvmid_example; // Workspace (w), Version (v) or Microversion (m) ID. (default to null)
String *eid = eid_example; // Element ID. (default to null)
Boolean *includeHidden = true; // Whether or not to include bounding boxes for hidden parts. (optional) (default to false)
Boolean *includeWireBodies = true; // Whether to include wire bodies in the bounding box. (optional) (default to true)
String *configuration = configuration_example; // Configuration string. (optional) (default to null)
String *linkDocumentId = linkDocumentId_example; // Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter. (optional) (default to null)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Mass properties of parts or a PartStudio.
[apiInstance getBoundingBoxes2With:did
    wvm:wvm
    wvmid:wvmid
    eid:eid
    includeHidden:includeHidden
    includeWireBodies:includeWireBodies
    configuration:configuration
    linkDocumentId:linkDocumentId
              completionHandler: ^(BTBoundingBox output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OnshapeRestApi = require('onshape_rest_api');
var defaultClient = OnshapeRestApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new OnshapeRestApi.DefaultApi()
var did = did_example; // {String} Document ID.
var wvm = wvm_example; // {String} One of w or v or m corresponding to whether a workspace or version or microversion was entered.
var wvmid = wvmid_example; // {String} Workspace (w), Version (v) or Microversion (m) ID.
var eid = eid_example; // {String} Element ID.
var opts = {
  'includeHidden': true, // {Boolean} Whether or not to include bounding boxes for hidden parts.
  'includeWireBodies': true, // {Boolean} Whether to include wire bodies in the bounding box.
  'configuration': configuration_example, // {String} Configuration string.
  'linkDocumentId': linkDocumentId_example // {String} Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getBoundingBoxes2(did, wvm, wvmid, eid, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getBoundingBoxes2Example
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new DefaultApi();
            var did = did_example;  // String | Document ID. (default to null)
            var wvm = wvm_example;  // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered. (default to null)
            var wvmid = wvmid_example;  // String | Workspace (w), Version (v) or Microversion (m) ID. (default to null)
            var eid = eid_example;  // String | Element ID. (default to null)
            var includeHidden = true;  // Boolean | Whether or not to include bounding boxes for hidden parts. (optional)  (default to false)
            var includeWireBodies = true;  // Boolean | Whether to include wire bodies in the bounding box. (optional)  (default to true)
            var configuration = configuration_example;  // String | Configuration string. (optional)  (default to null)
            var linkDocumentId = linkDocumentId_example;  // String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter. (optional)  (default to null)

            try
            {
                // Mass properties of parts or a PartStudio.
                BTBoundingBox result = apiInstance.getBoundingBoxes2(did, wvm, wvmid, eid, includeHidden, includeWireBodies, configuration, linkDocumentId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.getBoundingBoxes2: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$did = did_example; // String | Document ID.
$wvm = wvm_example; // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
$wvmid = wvmid_example; // String | Workspace (w), Version (v) or Microversion (m) ID.
$eid = eid_example; // String | Element ID.
$includeHidden = true; // Boolean | Whether or not to include bounding boxes for hidden parts.
$includeWireBodies = true; // Boolean | Whether to include wire bodies in the bounding box.
$configuration = configuration_example; // String | Configuration string.
$linkDocumentId = linkDocumentId_example; // String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.

try {
    $result = $api_instance->getBoundingBoxes2($did, $wvm, $wvmid, $eid, $includeHidden, $includeWireBodies, $configuration, $linkDocumentId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->getBoundingBoxes2: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $did = did_example; # String | Document ID.
my $wvm = wvm_example; # String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
my $wvmid = wvmid_example; # String | Workspace (w), Version (v) or Microversion (m) ID.
my $eid = eid_example; # String | Element ID.
my $includeHidden = true; # Boolean | Whether or not to include bounding boxes for hidden parts.
my $includeWireBodies = true; # Boolean | Whether to include wire bodies in the bounding box.
my $configuration = configuration_example; # String | Configuration string.
my $linkDocumentId = linkDocumentId_example; # String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.

eval { 
    my $result = $api_instance->getBoundingBoxes2(did => $did, wvm => $wvm, wvmid => $wvmid, eid => $eid, includeHidden => $includeHidden, includeWireBodies => $includeWireBodies, configuration => $configuration, linkDocumentId => $linkDocumentId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->getBoundingBoxes2: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.DefaultApi()
did = did_example # String | Document ID. (default to null)
wvm = wvm_example # String | One of w or v or m corresponding to whether a workspace or version or microversion was entered. (default to null)
wvmid = wvmid_example # String | Workspace (w), Version (v) or Microversion (m) ID. (default to null)
eid = eid_example # String | Element ID. (default to null)
includeHidden = true # Boolean | Whether or not to include bounding boxes for hidden parts. (optional) (default to false)
includeWireBodies = true # Boolean | Whether to include wire bodies in the bounding box. (optional) (default to true)
configuration = configuration_example # String | Configuration string. (optional) (default to null)
linkDocumentId = linkDocumentId_example # String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter. (optional) (default to null)

try: 
    # Mass properties of parts or a PartStudio.
    api_response = api_instance.get_bounding_boxes2(did, wvm, wvmid, eid, includeHidden=includeHidden, includeWireBodies=includeWireBodies, configuration=configuration, linkDocumentId=linkDocumentId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->getBoundingBoxes2: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let did = did_example; // String
    let wvm = wvm_example; // String
    let wvmid = wvmid_example; // String
    let eid = eid_example; // String
    let includeHidden = true; // Boolean
    let includeWireBodies = true; // Boolean
    let configuration = configuration_example; // String
    let linkDocumentId = linkDocumentId_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.getBoundingBoxes2(did, wvm, wvmid, eid, includeHidden, includeWireBodies, configuration, linkDocumentId, &context).wait();
    println!("{:?}", result);

}

Scopes

OAuth2Internal Application is Onshape Internal
OAuth2ReadPII Application can read your profile information
OAuth2Read Application can read your documents
OAuth2Write Application can write to your documents
OAuth2Delete Application can delete your documents and workspaces
OAuth2Purchase Application can request purchases on your behalf
OAuth2Share Application can share and unshare documents on your behalf

Parameters

Path parameters
Name Description
did*
String
Document ID.
Required
wvm*
String
One of w or v or m corresponding to whether a workspace or version or microversion was entered.
Required
wvmid*
String
Workspace (w), Version (v) or Microversion (m) ID.
Required
eid*
String
Element ID.
Required
Query parameters
Name Description
includeHidden
Boolean
Whether or not to include bounding boxes for hidden parts.
includeWireBodies
Boolean
Whether to include wire bodies in the bounding box.
configuration
String
Configuration string.
linkDocumentId
String
Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.

Responses


getEdges2

Tesselated edges from a PartStudio.


/api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/tessellatededges

Usage and SDK Samples

curl -X GET "http://localhost/api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/tessellatededges?angleTolerance=&chordTolerance=&partId=&edgeId=&configuration=&linkDocumentId="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        DefaultApi apiInstance = new DefaultApi();
        String did = did_example; // String | 
        String wvm = wvm_example; // String | 
        String wvmid = wvmid_example; // String | 
        String eid = eid_example; // String | 
        Double angleTolerance = 1.2; // Double | 
        Double chordTolerance = 1.2; // Double | 
        array[String] partId = ; // array[String] | 
        array[String] edgeId = ; // array[String] | 
        String configuration = configuration_example; // String | 
        String linkDocumentId = linkDocumentId_example; // String | 
        try {
            BTExportTessellatedEdgesResponse result = apiInstance.getEdges2(did, wvm, wvmid, eid, angleTolerance, chordTolerance, partId, edgeId, configuration, linkDocumentId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getEdges2");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String did = did_example; // String | 
        String wvm = wvm_example; // String | 
        String wvmid = wvmid_example; // String | 
        String eid = eid_example; // String | 
        Double angleTolerance = 1.2; // Double | 
        Double chordTolerance = 1.2; // Double | 
        array[String] partId = ; // array[String] | 
        array[String] edgeId = ; // array[String] | 
        String configuration = configuration_example; // String | 
        String linkDocumentId = linkDocumentId_example; // String | 
        try {
            BTExportTessellatedEdgesResponse result = apiInstance.getEdges2(did, wvm, wvmid, eid, angleTolerance, chordTolerance, partId, edgeId, configuration, linkDocumentId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getEdges2");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *did = did_example; //  (default to null)
String *wvm = wvm_example; //  (default to null)
String *wvmid = wvmid_example; //  (default to null)
String *eid = eid_example; //  (default to null)
Double *angleTolerance = 1.2; //  (optional) (default to null)
Double *chordTolerance = 1.2; //  (optional) (default to null)
array[String] *partId = ; //  (optional) (default to null)
array[String] *edgeId = ; //  (optional) (default to null)
String *configuration = configuration_example; //  (optional) (default to null)
String *linkDocumentId = linkDocumentId_example; //  (optional) (default to null)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Tesselated edges from a PartStudio.
[apiInstance getEdges2With:did
    wvm:wvm
    wvmid:wvmid
    eid:eid
    angleTolerance:angleTolerance
    chordTolerance:chordTolerance
    partId:partId
    edgeId:edgeId
    configuration:configuration
    linkDocumentId:linkDocumentId
              completionHandler: ^(BTExportTessellatedEdgesResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OnshapeRestApi = require('onshape_rest_api');
var defaultClient = OnshapeRestApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new OnshapeRestApi.DefaultApi()
var did = did_example; // {String} 
var wvm = wvm_example; // {String} 
var wvmid = wvmid_example; // {String} 
var eid = eid_example; // {String} 
var opts = {
  'angleTolerance': 1.2, // {Double} 
  'chordTolerance': 1.2, // {Double} 
  'partId': , // {array[String]} 
  'edgeId': , // {array[String]} 
  'configuration': configuration_example, // {String} 
  'linkDocumentId': linkDocumentId_example // {String} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getEdges2(did, wvm, wvmid, eid, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getEdges2Example
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new DefaultApi();
            var did = did_example;  // String |  (default to null)
            var wvm = wvm_example;  // String |  (default to null)
            var wvmid = wvmid_example;  // String |  (default to null)
            var eid = eid_example;  // String |  (default to null)
            var angleTolerance = 1.2;  // Double |  (optional)  (default to null)
            var chordTolerance = 1.2;  // Double |  (optional)  (default to null)
            var partId = new array[String](); // array[String] |  (optional)  (default to null)
            var edgeId = new array[String](); // array[String] |  (optional)  (default to null)
            var configuration = configuration_example;  // String |  (optional)  (default to null)
            var linkDocumentId = linkDocumentId_example;  // String |  (optional)  (default to null)

            try
            {
                // Tesselated edges from a PartStudio.
                BTExportTessellatedEdgesResponse result = apiInstance.getEdges2(did, wvm, wvmid, eid, angleTolerance, chordTolerance, partId, edgeId, configuration, linkDocumentId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.getEdges2: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$did = did_example; // String | 
$wvm = wvm_example; // String | 
$wvmid = wvmid_example; // String | 
$eid = eid_example; // String | 
$angleTolerance = 1.2; // Double | 
$chordTolerance = 1.2; // Double | 
$partId = ; // array[String] | 
$edgeId = ; // array[String] | 
$configuration = configuration_example; // String | 
$linkDocumentId = linkDocumentId_example; // String | 

try {
    $result = $api_instance->getEdges2($did, $wvm, $wvmid, $eid, $angleTolerance, $chordTolerance, $partId, $edgeId, $configuration, $linkDocumentId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->getEdges2: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $did = did_example; # String | 
my $wvm = wvm_example; # String | 
my $wvmid = wvmid_example; # String | 
my $eid = eid_example; # String | 
my $angleTolerance = 1.2; # Double | 
my $chordTolerance = 1.2; # Double | 
my $partId = []; # array[String] | 
my $edgeId = []; # array[String] | 
my $configuration = configuration_example; # String | 
my $linkDocumentId = linkDocumentId_example; # String | 

eval { 
    my $result = $api_instance->getEdges2(did => $did, wvm => $wvm, wvmid => $wvmid, eid => $eid, angleTolerance => $angleTolerance, chordTolerance => $chordTolerance, partId => $partId, edgeId => $edgeId, configuration => $configuration, linkDocumentId => $linkDocumentId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->getEdges2: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.DefaultApi()
did = did_example # String |  (default to null)
wvm = wvm_example # String |  (default to null)
wvmid = wvmid_example # String |  (default to null)
eid = eid_example # String |  (default to null)
angleTolerance = 1.2 # Double |  (optional) (default to null)
chordTolerance = 1.2 # Double |  (optional) (default to null)
partId =  # array[String] |  (optional) (default to null)
edgeId =  # array[String] |  (optional) (default to null)
configuration = configuration_example # String |  (optional) (default to null)
linkDocumentId = linkDocumentId_example # String |  (optional) (default to null)

try: 
    # Tesselated edges from a PartStudio.
    api_response = api_instance.get_edges2(did, wvm, wvmid, eid, angleTolerance=angleTolerance, chordTolerance=chordTolerance, partId=partId, edgeId=edgeId, configuration=configuration, linkDocumentId=linkDocumentId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->getEdges2: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let did = did_example; // String
    let wvm = wvm_example; // String
    let wvmid = wvmid_example; // String
    let eid = eid_example; // String
    let angleTolerance = 1.2; // Double
    let chordTolerance = 1.2; // Double
    let partId = ; // array[String]
    let edgeId = ; // array[String]
    let configuration = configuration_example; // String
    let linkDocumentId = linkDocumentId_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.getEdges2(did, wvm, wvmid, eid, angleTolerance, chordTolerance, partId, edgeId, configuration, linkDocumentId, &context).wait();
    println!("{:?}", result);

}

Scopes

OAuth2Internal Application is Onshape Internal
OAuth2ReadPII Application can read your profile information
OAuth2Read Application can read your documents
OAuth2Write Application can write to your documents
OAuth2Delete Application can delete your documents and workspaces
OAuth2Purchase Application can request purchases on your behalf
OAuth2Share Application can share and unshare documents on your behalf

Parameters

Path parameters
Name Description
did*
String
Required
wvm*
String
Required
wvmid*
String
Required
eid*
String
Required
Query parameters
Name Description
angleTolerance
Double (double)
chordTolerance
Double (double)
partId
array[String]
edgeId
array[String]
configuration
String
linkDocumentId
String

Responses


getFaces2

Tesselated faces of the parts in the Part Studio.


/api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/tessellatedfaces

Usage and SDK Samples

curl -X GET "http://localhost/api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/tessellatedfaces?angleTolerance=&chordTolerance=&maxFacetWidth=&outputVertexNormals=&outputFacetNormals=&outputTextureCoordinates=&outputIndexTable=&partId=&faceId=&outputErrorFaces=&configuration=&linkDocumentId="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        DefaultApi apiInstance = new DefaultApi();
        String did = did_example; // String | Document ID.
        String wvm = wvm_example; // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
        String wvmid = wvmid_example; // String | Workspace (w), Version (v) or Microversion (m) ID.
        String eid = eid_example; // String | Element ID.
        Double angleTolerance = 1.2; // Double | Angle tolerance (in radians). This specifies the limit on the sum of the angular deviations of a tessellation chord from the tangent vectors at two chord endpoints. The specified value must be less than PI/2. This parameter currently has a default value chosen based on the complexity of the parts being tessellated.
        Double chordTolerance = 1.2; // Double | Chord tolerance (in meters). This specifies the limit on the maximum deviation of a tessellation chord from the true surface/edge. This parameter currently has a default value chosen based on the size and complexity of the parts being tessellated.
        Double maxFacetWidth = 1.2; // Double | Max facet width. This specifies the limit on the size of any side of a tessellation facet.
        Boolean outputVertexNormals = true; // Boolean | If true, output vertex normals corresponding to surface normals at facet vertex points.
        Boolean outputFacetNormals = true; // Boolean | Output facet normals.
        Boolean outputTextureCoordinates = true; // Boolean | Output texture coordinates.
        Boolean outputIndexTable = true; // Boolean | Output index table.
        array[String] partId = ; // array[String] | IDs of the parts to retrieve. Repeat query param to add more than one, i.e. partId=JHK&partId=JHD). May not be combined with other ID filters
        array[String] faceId = ; // array[String] | IDs of the faces to tessellate (repeat query param to add more than one, i.e. faceId=JHK&faceId=JHD)
        Boolean outputErrorFaces = true; // Boolean | Whether or not to output faces that cause an error
        String configuration = configuration_example; // String | Configuration string.
        String linkDocumentId = linkDocumentId_example; // String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.
        try {
            BTExportTessellatedFacesResponse result = apiInstance.getFaces2(did, wvm, wvmid, eid, angleTolerance, chordTolerance, maxFacetWidth, outputVertexNormals, outputFacetNormals, outputTextureCoordinates, outputIndexTable, partId, faceId, outputErrorFaces, configuration, linkDocumentId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getFaces2");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String did = did_example; // String | Document ID.
        String wvm = wvm_example; // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
        String wvmid = wvmid_example; // String | Workspace (w), Version (v) or Microversion (m) ID.
        String eid = eid_example; // String | Element ID.
        Double angleTolerance = 1.2; // Double | Angle tolerance (in radians). This specifies the limit on the sum of the angular deviations of a tessellation chord from the tangent vectors at two chord endpoints. The specified value must be less than PI/2. This parameter currently has a default value chosen based on the complexity of the parts being tessellated.
        Double chordTolerance = 1.2; // Double | Chord tolerance (in meters). This specifies the limit on the maximum deviation of a tessellation chord from the true surface/edge. This parameter currently has a default value chosen based on the size and complexity of the parts being tessellated.
        Double maxFacetWidth = 1.2; // Double | Max facet width. This specifies the limit on the size of any side of a tessellation facet.
        Boolean outputVertexNormals = true; // Boolean | If true, output vertex normals corresponding to surface normals at facet vertex points.
        Boolean outputFacetNormals = true; // Boolean | Output facet normals.
        Boolean outputTextureCoordinates = true; // Boolean | Output texture coordinates.
        Boolean outputIndexTable = true; // Boolean | Output index table.
        array[String] partId = ; // array[String] | IDs of the parts to retrieve. Repeat query param to add more than one, i.e. partId=JHK&partId=JHD). May not be combined with other ID filters
        array[String] faceId = ; // array[String] | IDs of the faces to tessellate (repeat query param to add more than one, i.e. faceId=JHK&faceId=JHD)
        Boolean outputErrorFaces = true; // Boolean | Whether or not to output faces that cause an error
        String configuration = configuration_example; // String | Configuration string.
        String linkDocumentId = linkDocumentId_example; // String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.
        try {
            BTExportTessellatedFacesResponse result = apiInstance.getFaces2(did, wvm, wvmid, eid, angleTolerance, chordTolerance, maxFacetWidth, outputVertexNormals, outputFacetNormals, outputTextureCoordinates, outputIndexTable, partId, faceId, outputErrorFaces, configuration, linkDocumentId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getFaces2");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *did = did_example; // Document ID. (default to null)
String *wvm = wvm_example; // One of w or v or m corresponding to whether a workspace or version or microversion was entered. (default to null)
String *wvmid = wvmid_example; // Workspace (w), Version (v) or Microversion (m) ID. (default to null)
String *eid = eid_example; // Element ID. (default to null)
Double *angleTolerance = 1.2; // Angle tolerance (in radians). This specifies the limit on the sum of the angular deviations of a tessellation chord from the tangent vectors at two chord endpoints. The specified value must be less than PI/2. This parameter currently has a default value chosen based on the complexity of the parts being tessellated. (optional) (default to null)
Double *chordTolerance = 1.2; // Chord tolerance (in meters). This specifies the limit on the maximum deviation of a tessellation chord from the true surface/edge. This parameter currently has a default value chosen based on the size and complexity of the parts being tessellated. (optional) (default to null)
Double *maxFacetWidth = 1.2; // Max facet width. This specifies the limit on the size of any side of a tessellation facet. (optional) (default to null)
Boolean *outputVertexNormals = true; // If true, output vertex normals corresponding to surface normals at facet vertex points. (optional) (default to false)
Boolean *outputFacetNormals = true; // Output facet normals. (optional) (default to true)
Boolean *outputTextureCoordinates = true; // Output texture coordinates. (optional) (default to false)
Boolean *outputIndexTable = true; // Output index table. (optional) (default to false)
array[String] *partId = ; // IDs of the parts to retrieve. Repeat query param to add more than one, i.e. partId=JHK&partId=JHD). May not be combined with other ID filters (optional) (default to null)
array[String] *faceId = ; // IDs of the faces to tessellate (repeat query param to add more than one, i.e. faceId=JHK&faceId=JHD) (optional) (default to null)
Boolean *outputErrorFaces = true; // Whether or not to output faces that cause an error (optional) (default to false)
String *configuration = configuration_example; // Configuration string. (optional) (default to null)
String *linkDocumentId = linkDocumentId_example; // Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter. (optional) (default to null)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Tesselated faces of the parts in the Part Studio.
[apiInstance getFaces2With:did
    wvm:wvm
    wvmid:wvmid
    eid:eid
    angleTolerance:angleTolerance
    chordTolerance:chordTolerance
    maxFacetWidth:maxFacetWidth
    outputVertexNormals:outputVertexNormals
    outputFacetNormals:outputFacetNormals
    outputTextureCoordinates:outputTextureCoordinates
    outputIndexTable:outputIndexTable
    partId:partId
    faceId:faceId
    outputErrorFaces:outputErrorFaces
    configuration:configuration
    linkDocumentId:linkDocumentId
              completionHandler: ^(BTExportTessellatedFacesResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OnshapeRestApi = require('onshape_rest_api');
var defaultClient = OnshapeRestApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new OnshapeRestApi.DefaultApi()
var did = did_example; // {String} Document ID.
var wvm = wvm_example; // {String} One of w or v or m corresponding to whether a workspace or version or microversion was entered.
var wvmid = wvmid_example; // {String} Workspace (w), Version (v) or Microversion (m) ID.
var eid = eid_example; // {String} Element ID.
var opts = {
  'angleTolerance': 1.2, // {Double} Angle tolerance (in radians). This specifies the limit on the sum of the angular deviations of a tessellation chord from the tangent vectors at two chord endpoints. The specified value must be less than PI/2. This parameter currently has a default value chosen based on the complexity of the parts being tessellated.
  'chordTolerance': 1.2, // {Double} Chord tolerance (in meters). This specifies the limit on the maximum deviation of a tessellation chord from the true surface/edge. This parameter currently has a default value chosen based on the size and complexity of the parts being tessellated.
  'maxFacetWidth': 1.2, // {Double} Max facet width. This specifies the limit on the size of any side of a tessellation facet.
  'outputVertexNormals': true, // {Boolean} If true, output vertex normals corresponding to surface normals at facet vertex points.
  'outputFacetNormals': true, // {Boolean} Output facet normals.
  'outputTextureCoordinates': true, // {Boolean} Output texture coordinates.
  'outputIndexTable': true, // {Boolean} Output index table.
  'partId': , // {array[String]} IDs of the parts to retrieve. Repeat query param to add more than one, i.e. partId=JHK&partId=JHD). May not be combined with other ID filters
  'faceId': , // {array[String]} IDs of the faces to tessellate (repeat query param to add more than one, i.e. faceId=JHK&faceId=JHD)
  'outputErrorFaces': true, // {Boolean} Whether or not to output faces that cause an error
  'configuration': configuration_example, // {String} Configuration string.
  'linkDocumentId': linkDocumentId_example // {String} Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getFaces2(did, wvm, wvmid, eid, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getFaces2Example
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new DefaultApi();
            var did = did_example;  // String | Document ID. (default to null)
            var wvm = wvm_example;  // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered. (default to null)
            var wvmid = wvmid_example;  // String | Workspace (w), Version (v) or Microversion (m) ID. (default to null)
            var eid = eid_example;  // String | Element ID. (default to null)
            var angleTolerance = 1.2;  // Double | Angle tolerance (in radians). This specifies the limit on the sum of the angular deviations of a tessellation chord from the tangent vectors at two chord endpoints. The specified value must be less than PI/2. This parameter currently has a default value chosen based on the complexity of the parts being tessellated. (optional)  (default to null)
            var chordTolerance = 1.2;  // Double | Chord tolerance (in meters). This specifies the limit on the maximum deviation of a tessellation chord from the true surface/edge. This parameter currently has a default value chosen based on the size and complexity of the parts being tessellated. (optional)  (default to null)
            var maxFacetWidth = 1.2;  // Double | Max facet width. This specifies the limit on the size of any side of a tessellation facet. (optional)  (default to null)
            var outputVertexNormals = true;  // Boolean | If true, output vertex normals corresponding to surface normals at facet vertex points. (optional)  (default to false)
            var outputFacetNormals = true;  // Boolean | Output facet normals. (optional)  (default to true)
            var outputTextureCoordinates = true;  // Boolean | Output texture coordinates. (optional)  (default to false)
            var outputIndexTable = true;  // Boolean | Output index table. (optional)  (default to false)
            var partId = new array[String](); // array[String] | IDs of the parts to retrieve. Repeat query param to add more than one, i.e. partId=JHK&partId=JHD). May not be combined with other ID filters (optional)  (default to null)
            var faceId = new array[String](); // array[String] | IDs of the faces to tessellate (repeat query param to add more than one, i.e. faceId=JHK&faceId=JHD) (optional)  (default to null)
            var outputErrorFaces = true;  // Boolean | Whether or not to output faces that cause an error (optional)  (default to false)
            var configuration = configuration_example;  // String | Configuration string. (optional)  (default to null)
            var linkDocumentId = linkDocumentId_example;  // String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter. (optional)  (default to null)

            try
            {
                // Tesselated faces of the parts in the Part Studio.
                BTExportTessellatedFacesResponse result = apiInstance.getFaces2(did, wvm, wvmid, eid, angleTolerance, chordTolerance, maxFacetWidth, outputVertexNormals, outputFacetNormals, outputTextureCoordinates, outputIndexTable, partId, faceId, outputErrorFaces, configuration, linkDocumentId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.getFaces2: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$did = did_example; // String | Document ID.
$wvm = wvm_example; // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
$wvmid = wvmid_example; // String | Workspace (w), Version (v) or Microversion (m) ID.
$eid = eid_example; // String | Element ID.
$angleTolerance = 1.2; // Double | Angle tolerance (in radians). This specifies the limit on the sum of the angular deviations of a tessellation chord from the tangent vectors at two chord endpoints. The specified value must be less than PI/2. This parameter currently has a default value chosen based on the complexity of the parts being tessellated.
$chordTolerance = 1.2; // Double | Chord tolerance (in meters). This specifies the limit on the maximum deviation of a tessellation chord from the true surface/edge. This parameter currently has a default value chosen based on the size and complexity of the parts being tessellated.
$maxFacetWidth = 1.2; // Double | Max facet width. This specifies the limit on the size of any side of a tessellation facet.
$outputVertexNormals = true; // Boolean | If true, output vertex normals corresponding to surface normals at facet vertex points.
$outputFacetNormals = true; // Boolean | Output facet normals.
$outputTextureCoordinates = true; // Boolean | Output texture coordinates.
$outputIndexTable = true; // Boolean | Output index table.
$partId = ; // array[String] | IDs of the parts to retrieve. Repeat query param to add more than one, i.e. partId=JHK&partId=JHD). May not be combined with other ID filters
$faceId = ; // array[String] | IDs of the faces to tessellate (repeat query param to add more than one, i.e. faceId=JHK&faceId=JHD)
$outputErrorFaces = true; // Boolean | Whether or not to output faces that cause an error
$configuration = configuration_example; // String | Configuration string.
$linkDocumentId = linkDocumentId_example; // String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.

try {
    $result = $api_instance->getFaces2($did, $wvm, $wvmid, $eid, $angleTolerance, $chordTolerance, $maxFacetWidth, $outputVertexNormals, $outputFacetNormals, $outputTextureCoordinates, $outputIndexTable, $partId, $faceId, $outputErrorFaces, $configuration, $linkDocumentId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->getFaces2: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $did = did_example; # String | Document ID.
my $wvm = wvm_example; # String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
my $wvmid = wvmid_example; # String | Workspace (w), Version (v) or Microversion (m) ID.
my $eid = eid_example; # String | Element ID.
my $angleTolerance = 1.2; # Double | Angle tolerance (in radians). This specifies the limit on the sum of the angular deviations of a tessellation chord from the tangent vectors at two chord endpoints. The specified value must be less than PI/2. This parameter currently has a default value chosen based on the complexity of the parts being tessellated.
my $chordTolerance = 1.2; # Double | Chord tolerance (in meters). This specifies the limit on the maximum deviation of a tessellation chord from the true surface/edge. This parameter currently has a default value chosen based on the size and complexity of the parts being tessellated.
my $maxFacetWidth = 1.2; # Double | Max facet width. This specifies the limit on the size of any side of a tessellation facet.
my $outputVertexNormals = true; # Boolean | If true, output vertex normals corresponding to surface normals at facet vertex points.
my $outputFacetNormals = true; # Boolean | Output facet normals.
my $outputTextureCoordinates = true; # Boolean | Output texture coordinates.
my $outputIndexTable = true; # Boolean | Output index table.
my $partId = []; # array[String] | IDs of the parts to retrieve. Repeat query param to add more than one, i.e. partId=JHK&partId=JHD). May not be combined with other ID filters
my $faceId = []; # array[String] | IDs of the faces to tessellate (repeat query param to add more than one, i.e. faceId=JHK&faceId=JHD)
my $outputErrorFaces = true; # Boolean | Whether or not to output faces that cause an error
my $configuration = configuration_example; # String | Configuration string.
my $linkDocumentId = linkDocumentId_example; # String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.

eval { 
    my $result = $api_instance->getFaces2(did => $did, wvm => $wvm, wvmid => $wvmid, eid => $eid, angleTolerance => $angleTolerance, chordTolerance => $chordTolerance, maxFacetWidth => $maxFacetWidth, outputVertexNormals => $outputVertexNormals, outputFacetNormals => $outputFacetNormals, outputTextureCoordinates => $outputTextureCoordinates, outputIndexTable => $outputIndexTable, partId => $partId, faceId => $faceId, outputErrorFaces => $outputErrorFaces, configuration => $configuration, linkDocumentId => $linkDocumentId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->getFaces2: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.DefaultApi()
did = did_example # String | Document ID. (default to null)
wvm = wvm_example # String | One of w or v or m corresponding to whether a workspace or version or microversion was entered. (default to null)
wvmid = wvmid_example # String | Workspace (w), Version (v) or Microversion (m) ID. (default to null)
eid = eid_example # String | Element ID. (default to null)
angleTolerance = 1.2 # Double | Angle tolerance (in radians). This specifies the limit on the sum of the angular deviations of a tessellation chord from the tangent vectors at two chord endpoints. The specified value must be less than PI/2. This parameter currently has a default value chosen based on the complexity of the parts being tessellated. (optional) (default to null)
chordTolerance = 1.2 # Double | Chord tolerance (in meters). This specifies the limit on the maximum deviation of a tessellation chord from the true surface/edge. This parameter currently has a default value chosen based on the size and complexity of the parts being tessellated. (optional) (default to null)
maxFacetWidth = 1.2 # Double | Max facet width. This specifies the limit on the size of any side of a tessellation facet. (optional) (default to null)
outputVertexNormals = true # Boolean | If true, output vertex normals corresponding to surface normals at facet vertex points. (optional) (default to false)
outputFacetNormals = true # Boolean | Output facet normals. (optional) (default to true)
outputTextureCoordinates = true # Boolean | Output texture coordinates. (optional) (default to false)
outputIndexTable = true # Boolean | Output index table. (optional) (default to false)
partId =  # array[String] | IDs of the parts to retrieve. Repeat query param to add more than one, i.e. partId=JHK&partId=JHD). May not be combined with other ID filters (optional) (default to null)
faceId =  # array[String] | IDs of the faces to tessellate (repeat query param to add more than one, i.e. faceId=JHK&faceId=JHD) (optional) (default to null)
outputErrorFaces = true # Boolean | Whether or not to output faces that cause an error (optional) (default to false)
configuration = configuration_example # String | Configuration string. (optional) (default to null)
linkDocumentId = linkDocumentId_example # String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter. (optional) (default to null)

try: 
    # Tesselated faces of the parts in the Part Studio.
    api_response = api_instance.get_faces2(did, wvm, wvmid, eid, angleTolerance=angleTolerance, chordTolerance=chordTolerance, maxFacetWidth=maxFacetWidth, outputVertexNormals=outputVertexNormals, outputFacetNormals=outputFacetNormals, outputTextureCoordinates=outputTextureCoordinates, outputIndexTable=outputIndexTable, partId=partId, faceId=faceId, outputErrorFaces=outputErrorFaces, configuration=configuration, linkDocumentId=linkDocumentId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->getFaces2: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let did = did_example; // String
    let wvm = wvm_example; // String
    let wvmid = wvmid_example; // String
    let eid = eid_example; // String
    let angleTolerance = 1.2; // Double
    let chordTolerance = 1.2; // Double
    let maxFacetWidth = 1.2; // Double
    let outputVertexNormals = true; // Boolean
    let outputFacetNormals = true; // Boolean
    let outputTextureCoordinates = true; // Boolean
    let outputIndexTable = true; // Boolean
    let partId = ; // array[String]
    let faceId = ; // array[String]
    let outputErrorFaces = true; // Boolean
    let configuration = configuration_example; // String
    let linkDocumentId = linkDocumentId_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.getFaces2(did, wvm, wvmid, eid, angleTolerance, chordTolerance, maxFacetWidth, outputVertexNormals, outputFacetNormals, outputTextureCoordinates, outputIndexTable, partId, faceId, outputErrorFaces, configuration, linkDocumentId, &context).wait();
    println!("{:?}", result);

}

Scopes

OAuth2Internal Application is Onshape Internal
OAuth2ReadPII Application can read your profile information
OAuth2Read Application can read your documents
OAuth2Write Application can write to your documents
OAuth2Delete Application can delete your documents and workspaces
OAuth2Purchase Application can request purchases on your behalf
OAuth2Share Application can share and unshare documents on your behalf

Parameters

Path parameters
Name Description
did*
String
Document ID.
Required
wvm*
String
One of w or v or m corresponding to whether a workspace or version or microversion was entered.
Required
wvmid*
String
Workspace (w), Version (v) or Microversion (m) ID.
Required
eid*
String
Element ID.
Required
Query parameters
Name Description
angleTolerance
Double (double)
Angle tolerance (in radians). This specifies the limit on the sum of the angular deviations of a tessellation chord from the tangent vectors at two chord endpoints. The specified value must be less than PI/2. This parameter currently has a default value chosen based on the complexity of the parts being tessellated.
chordTolerance
Double (double)
Chord tolerance (in meters). This specifies the limit on the maximum deviation of a tessellation chord from the true surface/edge. This parameter currently has a default value chosen based on the size and complexity of the parts being tessellated.
maxFacetWidth
Double (double)
Max facet width. This specifies the limit on the size of any side of a tessellation facet.
outputVertexNormals
Boolean
If true, output vertex normals corresponding to surface normals at facet vertex points.
outputFacetNormals
Boolean
Output facet normals.
outputTextureCoordinates
Boolean
Output texture coordinates.
outputIndexTable
Boolean
Output index table.
partId
array[String]
IDs of the parts to retrieve. Repeat query param to add more than one, i.e. partId=JHK&partId=JHD). May not be combined with other ID filters
faceId
array[String]
IDs of the faces to tessellate (repeat query param to add more than one, i.e. faceId=JHK&faceId=JHD)
outputErrorFaces
Boolean
Whether or not to output faces that cause an error
configuration
String
Configuration string.
linkDocumentId
String
Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.

Responses


getFeatures

Get Feature List


/api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/features

Usage and SDK Samples

curl -X GET "http://localhost/api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/features?featureId=&linkDocumentId=&noSketchGeometry="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        DefaultApi apiInstance = new DefaultApi();
        String did = did_example; // String | Document ID.
        String wvm = wvm_example; // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
        String wvmid = wvmid_example; // String | Workspace (w), Version (v) or Microversion (m) ID.
        String eid = eid_example; // String | Element ID.
        array[String] featureId = ; // array[String] | ID of a feature; repeat query param to add more than one
        String linkDocumentId = linkDocumentId_example; // String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.
        Boolean noSketchGeometry = true; // Boolean | Whether or not to output simple sketch info without geometry
        try {
            BTFeatureListResponse result = apiInstance.getFeatures(did, wvm, wvmid, eid, featureId, linkDocumentId, noSketchGeometry);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getFeatures");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String did = did_example; // String | Document ID.
        String wvm = wvm_example; // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
        String wvmid = wvmid_example; // String | Workspace (w), Version (v) or Microversion (m) ID.
        String eid = eid_example; // String | Element ID.
        array[String] featureId = ; // array[String] | ID of a feature; repeat query param to add more than one
        String linkDocumentId = linkDocumentId_example; // String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.
        Boolean noSketchGeometry = true; // Boolean | Whether or not to output simple sketch info without geometry
        try {
            BTFeatureListResponse result = apiInstance.getFeatures(did, wvm, wvmid, eid, featureId, linkDocumentId, noSketchGeometry);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getFeatures");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *did = did_example; // Document ID. (default to null)
String *wvm = wvm_example; // One of w or v or m corresponding to whether a workspace or version or microversion was entered. (default to null)
String *wvmid = wvmid_example; // Workspace (w), Version (v) or Microversion (m) ID. (default to null)
String *eid = eid_example; // Element ID. (default to null)
array[String] *featureId = ; // ID of a feature; repeat query param to add more than one (optional) (default to null)
String *linkDocumentId = linkDocumentId_example; // Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter. (optional) (default to null)
Boolean *noSketchGeometry = true; // Whether or not to output simple sketch info without geometry (optional) (default to false)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Get Feature List
[apiInstance getFeaturesWith:did
    wvm:wvm
    wvmid:wvmid
    eid:eid
    featureId:featureId
    linkDocumentId:linkDocumentId
    noSketchGeometry:noSketchGeometry
              completionHandler: ^(BTFeatureListResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OnshapeRestApi = require('onshape_rest_api');
var defaultClient = OnshapeRestApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new OnshapeRestApi.DefaultApi()
var did = did_example; // {String} Document ID.
var wvm = wvm_example; // {String} One of w or v or m corresponding to whether a workspace or version or microversion was entered.
var wvmid = wvmid_example; // {String} Workspace (w), Version (v) or Microversion (m) ID.
var eid = eid_example; // {String} Element ID.
var opts = {
  'featureId': , // {array[String]} ID of a feature; repeat query param to add more than one
  'linkDocumentId': linkDocumentId_example, // {String} Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.
  'noSketchGeometry': true // {Boolean} Whether or not to output simple sketch info without geometry
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getFeatures(did, wvm, wvmid, eid, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getFeaturesExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new DefaultApi();
            var did = did_example;  // String | Document ID. (default to null)
            var wvm = wvm_example;  // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered. (default to null)
            var wvmid = wvmid_example;  // String | Workspace (w), Version (v) or Microversion (m) ID. (default to null)
            var eid = eid_example;  // String | Element ID. (default to null)
            var featureId = new array[String](); // array[String] | ID of a feature; repeat query param to add more than one (optional)  (default to null)
            var linkDocumentId = linkDocumentId_example;  // String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter. (optional)  (default to null)
            var noSketchGeometry = true;  // Boolean | Whether or not to output simple sketch info without geometry (optional)  (default to false)

            try
            {
                // Get Feature List
                BTFeatureListResponse result = apiInstance.getFeatures(did, wvm, wvmid, eid, featureId, linkDocumentId, noSketchGeometry);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.getFeatures: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$did = did_example; // String | Document ID.
$wvm = wvm_example; // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
$wvmid = wvmid_example; // String | Workspace (w), Version (v) or Microversion (m) ID.
$eid = eid_example; // String | Element ID.
$featureId = ; // array[String] | ID of a feature; repeat query param to add more than one
$linkDocumentId = linkDocumentId_example; // String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.
$noSketchGeometry = true; // Boolean | Whether or not to output simple sketch info without geometry

try {
    $result = $api_instance->getFeatures($did, $wvm, $wvmid, $eid, $featureId, $linkDocumentId, $noSketchGeometry);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->getFeatures: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $did = did_example; # String | Document ID.
my $wvm = wvm_example; # String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
my $wvmid = wvmid_example; # String | Workspace (w), Version (v) or Microversion (m) ID.
my $eid = eid_example; # String | Element ID.
my $featureId = []; # array[String] | ID of a feature; repeat query param to add more than one
my $linkDocumentId = linkDocumentId_example; # String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.
my $noSketchGeometry = true; # Boolean | Whether or not to output simple sketch info without geometry

eval { 
    my $result = $api_instance->getFeatures(did => $did, wvm => $wvm, wvmid => $wvmid, eid => $eid, featureId => $featureId, linkDocumentId => $linkDocumentId, noSketchGeometry => $noSketchGeometry);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->getFeatures: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.DefaultApi()
did = did_example # String | Document ID. (default to null)
wvm = wvm_example # String | One of w or v or m corresponding to whether a workspace or version or microversion was entered. (default to null)
wvmid = wvmid_example # String | Workspace (w), Version (v) or Microversion (m) ID. (default to null)
eid = eid_example # String | Element ID. (default to null)
featureId =  # array[String] | ID of a feature; repeat query param to add more than one (optional) (default to null)
linkDocumentId = linkDocumentId_example # String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter. (optional) (default to null)
noSketchGeometry = true # Boolean | Whether or not to output simple sketch info without geometry (optional) (default to false)

try: 
    # Get Feature List
    api_response = api_instance.get_features(did, wvm, wvmid, eid, featureId=featureId, linkDocumentId=linkDocumentId, noSketchGeometry=noSketchGeometry)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->getFeatures: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let did = did_example; // String
    let wvm = wvm_example; // String
    let wvmid = wvmid_example; // String
    let eid = eid_example; // String
    let featureId = ; // array[String]
    let linkDocumentId = linkDocumentId_example; // String
    let noSketchGeometry = true; // Boolean

    let mut context = DefaultApi::Context::default();
    let result = client.getFeatures(did, wvm, wvmid, eid, featureId, linkDocumentId, noSketchGeometry, &context).wait();
    println!("{:?}", result);

}

Scopes

OAuth2Internal Application is Onshape Internal
OAuth2ReadPII Application can read your profile information
OAuth2Read Application can read your documents
OAuth2Write Application can write to your documents
OAuth2Delete Application can delete your documents and workspaces
OAuth2Purchase Application can request purchases on your behalf
OAuth2Share Application can share and unshare documents on your behalf

Parameters

Path parameters
Name Description
did*
String
Document ID.
Required
wvm*
String
One of w or v or m corresponding to whether a workspace or version or microversion was entered.
Required
wvmid*
String
Workspace (w), Version (v) or Microversion (m) ID.
Required
eid*
String
Element ID.
Required
Query parameters
Name Description
featureId
array[String]
ID of a feature; repeat query param to add more than one
linkDocumentId
String
Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.
noSketchGeometry
Boolean
Whether or not to output simple sketch info without geometry

Responses


getMassProperties

Mass properties of parts or a PartStudio.


/api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/massproperties

Usage and SDK Samples

curl -X GET "http://localhost/api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/massproperties?partId=&massAsGroup=&configuration=&linkDocumentId="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        DefaultApi apiInstance = new DefaultApi();
        String did = did_example; // String | Document ID.
        String wvm = wvm_example; // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
        String wvmid = wvmid_example; // String | Workspace (w), Version (v) or Microversion (m) ID.
        String eid = eid_example; // String | Element ID.
        array[String] partId = ; // array[String] | IDs of the parts to retrieve. Repeat query param to add more than one, i.e. partId=JHK&partId=JHD). May not be combined with other ID filters
        Boolean massAsGroup = true; // Boolean | If true, specified parts will be evaluated as a single object instead of individually
        String configuration = configuration_example; // String | Configuration string.
        String linkDocumentId = linkDocumentId_example; // String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.
        try {
            BTMassPropResponse result = apiInstance.getMassProperties(did, wvm, wvmid, eid, partId, massAsGroup, configuration, linkDocumentId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getMassProperties");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String did = did_example; // String | Document ID.
        String wvm = wvm_example; // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
        String wvmid = wvmid_example; // String | Workspace (w), Version (v) or Microversion (m) ID.
        String eid = eid_example; // String | Element ID.
        array[String] partId = ; // array[String] | IDs of the parts to retrieve. Repeat query param to add more than one, i.e. partId=JHK&partId=JHD). May not be combined with other ID filters
        Boolean massAsGroup = true; // Boolean | If true, specified parts will be evaluated as a single object instead of individually
        String configuration = configuration_example; // String | Configuration string.
        String linkDocumentId = linkDocumentId_example; // String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.
        try {
            BTMassPropResponse result = apiInstance.getMassProperties(did, wvm, wvmid, eid, partId, massAsGroup, configuration, linkDocumentId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getMassProperties");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *did = did_example; // Document ID. (default to null)
String *wvm = wvm_example; // One of w or v or m corresponding to whether a workspace or version or microversion was entered. (default to null)
String *wvmid = wvmid_example; // Workspace (w), Version (v) or Microversion (m) ID. (default to null)
String *eid = eid_example; // Element ID. (default to null)
array[String] *partId = ; // IDs of the parts to retrieve. Repeat query param to add more than one, i.e. partId=JHK&partId=JHD). May not be combined with other ID filters (optional) (default to null)
Boolean *massAsGroup = true; // If true, specified parts will be evaluated as a single object instead of individually (optional) (default to true)
String *configuration = configuration_example; // Configuration string. (optional) (default to null)
String *linkDocumentId = linkDocumentId_example; // Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter. (optional) (default to null)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Mass properties of parts or a PartStudio.
[apiInstance getMassPropertiesWith:did
    wvm:wvm
    wvmid:wvmid
    eid:eid
    partId:partId
    massAsGroup:massAsGroup
    configuration:configuration
    linkDocumentId:linkDocumentId
              completionHandler: ^(BTMassPropResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OnshapeRestApi = require('onshape_rest_api');
var defaultClient = OnshapeRestApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new OnshapeRestApi.DefaultApi()
var did = did_example; // {String} Document ID.
var wvm = wvm_example; // {String} One of w or v or m corresponding to whether a workspace or version or microversion was entered.
var wvmid = wvmid_example; // {String} Workspace (w), Version (v) or Microversion (m) ID.
var eid = eid_example; // {String} Element ID.
var opts = {
  'partId': , // {array[String]} IDs of the parts to retrieve. Repeat query param to add more than one, i.e. partId=JHK&partId=JHD). May not be combined with other ID filters
  'massAsGroup': true, // {Boolean} If true, specified parts will be evaluated as a single object instead of individually
  'configuration': configuration_example, // {String} Configuration string.
  'linkDocumentId': linkDocumentId_example // {String} Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getMassProperties(did, wvm, wvmid, eid, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getMassPropertiesExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new DefaultApi();
            var did = did_example;  // String | Document ID. (default to null)
            var wvm = wvm_example;  // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered. (default to null)
            var wvmid = wvmid_example;  // String | Workspace (w), Version (v) or Microversion (m) ID. (default to null)
            var eid = eid_example;  // String | Element ID. (default to null)
            var partId = new array[String](); // array[String] | IDs of the parts to retrieve. Repeat query param to add more than one, i.e. partId=JHK&partId=JHD). May not be combined with other ID filters (optional)  (default to null)
            var massAsGroup = true;  // Boolean | If true, specified parts will be evaluated as a single object instead of individually (optional)  (default to true)
            var configuration = configuration_example;  // String | Configuration string. (optional)  (default to null)
            var linkDocumentId = linkDocumentId_example;  // String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter. (optional)  (default to null)

            try
            {
                // Mass properties of parts or a PartStudio.
                BTMassPropResponse result = apiInstance.getMassProperties(did, wvm, wvmid, eid, partId, massAsGroup, configuration, linkDocumentId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.getMassProperties: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$did = did_example; // String | Document ID.
$wvm = wvm_example; // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
$wvmid = wvmid_example; // String | Workspace (w), Version (v) or Microversion (m) ID.
$eid = eid_example; // String | Element ID.
$partId = ; // array[String] | IDs of the parts to retrieve. Repeat query param to add more than one, i.e. partId=JHK&partId=JHD). May not be combined with other ID filters
$massAsGroup = true; // Boolean | If true, specified parts will be evaluated as a single object instead of individually
$configuration = configuration_example; // String | Configuration string.
$linkDocumentId = linkDocumentId_example; // String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.

try {
    $result = $api_instance->getMassProperties($did, $wvm, $wvmid, $eid, $partId, $massAsGroup, $configuration, $linkDocumentId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->getMassProperties: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $did = did_example; # String | Document ID.
my $wvm = wvm_example; # String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
my $wvmid = wvmid_example; # String | Workspace (w), Version (v) or Microversion (m) ID.
my $eid = eid_example; # String | Element ID.
my $partId = []; # array[String] | IDs of the parts to retrieve. Repeat query param to add more than one, i.e. partId=JHK&partId=JHD). May not be combined with other ID filters
my $massAsGroup = true; # Boolean | If true, specified parts will be evaluated as a single object instead of individually
my $configuration = configuration_example; # String | Configuration string.
my $linkDocumentId = linkDocumentId_example; # String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.

eval { 
    my $result = $api_instance->getMassProperties(did => $did, wvm => $wvm, wvmid => $wvmid, eid => $eid, partId => $partId, massAsGroup => $massAsGroup, configuration => $configuration, linkDocumentId => $linkDocumentId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->getMassProperties: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.DefaultApi()
did = did_example # String | Document ID. (default to null)
wvm = wvm_example # String | One of w or v or m corresponding to whether a workspace or version or microversion was entered. (default to null)
wvmid = wvmid_example # String | Workspace (w), Version (v) or Microversion (m) ID. (default to null)
eid = eid_example # String | Element ID. (default to null)
partId =  # array[String] | IDs of the parts to retrieve. Repeat query param to add more than one, i.e. partId=JHK&partId=JHD). May not be combined with other ID filters (optional) (default to null)
massAsGroup = true # Boolean | If true, specified parts will be evaluated as a single object instead of individually (optional) (default to true)
configuration = configuration_example # String | Configuration string. (optional) (default to null)
linkDocumentId = linkDocumentId_example # String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter. (optional) (default to null)

try: 
    # Mass properties of parts or a PartStudio.
    api_response = api_instance.get_mass_properties(did, wvm, wvmid, eid, partId=partId, massAsGroup=massAsGroup, configuration=configuration, linkDocumentId=linkDocumentId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->getMassProperties: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let did = did_example; // String
    let wvm = wvm_example; // String
    let wvmid = wvmid_example; // String
    let eid = eid_example; // String
    let partId = ; // array[String]
    let massAsGroup = true; // Boolean
    let configuration = configuration_example; // String
    let linkDocumentId = linkDocumentId_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.getMassProperties(did, wvm, wvmid, eid, partId, massAsGroup, configuration, linkDocumentId, &context).wait();
    println!("{:?}", result);

}

Scopes

OAuth2Internal Application is Onshape Internal
OAuth2ReadPII Application can read your profile information
OAuth2Read Application can read your documents
OAuth2Write Application can write to your documents
OAuth2Delete Application can delete your documents and workspaces
OAuth2Purchase Application can request purchases on your behalf
OAuth2Share Application can share and unshare documents on your behalf

Parameters

Path parameters
Name Description
did*
String
Document ID.
Required
wvm*
String
One of w or v or m corresponding to whether a workspace or version or microversion was entered.
Required
wvmid*
String
Workspace (w), Version (v) or Microversion (m) ID.
Required
eid*
String
Element ID.
Required
Query parameters
Name Description
partId
array[String]
IDs of the parts to retrieve. Repeat query param to add more than one, i.e. partId=JHK&partId=JHD). May not be combined with other ID filters
massAsGroup
Boolean
If true, specified parts will be evaluated as a single object instead of individually
configuration
String
Configuration string.
linkDocumentId
String
Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.

Responses


getNamedViews2

Get Named Views


/api/partstudios/d/{did}/e/{eid}/namedViews

Usage and SDK Samples

curl -X GET "http://localhost/api/partstudios/d/{did}/e/{eid}/namedViews?skipPerspective="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        DefaultApi apiInstance = new DefaultApi();
        String did = did_example; // String | Document ID.
        String eid = eid_example; // String | Element ID.
        Boolean skipPerspective = true; // Boolean | Whether views with a perspective projection should be omitted.
        try {
            BTNamedViewsInfo result = apiInstance.getNamedViews2(did, eid, skipPerspective);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getNamedViews2");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String did = did_example; // String | Document ID.
        String eid = eid_example; // String | Element ID.
        Boolean skipPerspective = true; // Boolean | Whether views with a perspective projection should be omitted.
        try {
            BTNamedViewsInfo result = apiInstance.getNamedViews2(did, eid, skipPerspective);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getNamedViews2");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *did = did_example; // Document ID. (default to null)
String *eid = eid_example; // Element ID. (default to null)
Boolean *skipPerspective = true; // Whether views with a perspective projection should be omitted. (optional) (default to true)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Get Named Views
[apiInstance getNamedViews2With:did
    eid:eid
    skipPerspective:skipPerspective
              completionHandler: ^(BTNamedViewsInfo output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OnshapeRestApi = require('onshape_rest_api');
var defaultClient = OnshapeRestApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new OnshapeRestApi.DefaultApi()
var did = did_example; // {String} Document ID.
var eid = eid_example; // {String} Element ID.
var opts = {
  'skipPerspective': true // {Boolean} Whether views with a perspective projection should be omitted.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getNamedViews2(did, eid, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getNamedViews2Example
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new DefaultApi();
            var did = did_example;  // String | Document ID. (default to null)
            var eid = eid_example;  // String | Element ID. (default to null)
            var skipPerspective = true;  // Boolean | Whether views with a perspective projection should be omitted. (optional)  (default to true)

            try
            {
                // Get Named Views
                BTNamedViewsInfo result = apiInstance.getNamedViews2(did, eid, skipPerspective);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.getNamedViews2: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$did = did_example; // String | Document ID.
$eid = eid_example; // String | Element ID.
$skipPerspective = true; // Boolean | Whether views with a perspective projection should be omitted.

try {
    $result = $api_instance->getNamedViews2($did, $eid, $skipPerspective);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->getNamedViews2: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $did = did_example; # String | Document ID.
my $eid = eid_example; # String | Element ID.
my $skipPerspective = true; # Boolean | Whether views with a perspective projection should be omitted.

eval { 
    my $result = $api_instance->getNamedViews2(did => $did, eid => $eid, skipPerspective => $skipPerspective);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->getNamedViews2: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.DefaultApi()
did = did_example # String | Document ID. (default to null)
eid = eid_example # String | Element ID. (default to null)
skipPerspective = true # Boolean | Whether views with a perspective projection should be omitted. (optional) (default to true)

try: 
    # Get Named Views
    api_response = api_instance.get_named_views2(did, eid, skipPerspective=skipPerspective)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->getNamedViews2: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let did = did_example; // String
    let eid = eid_example; // String
    let skipPerspective = true; // Boolean

    let mut context = DefaultApi::Context::default();
    let result = client.getNamedViews2(did, eid, skipPerspective, &context).wait();
    println!("{:?}", result);

}

Scopes

OAuth2Internal Application is Onshape Internal
OAuth2ReadPII Application can read your profile information
OAuth2Read Application can read your documents
OAuth2Write Application can write to your documents
OAuth2Delete Application can delete your documents and workspaces
OAuth2Purchase Application can request purchases on your behalf
OAuth2Share Application can share and unshare documents on your behalf

Parameters

Path parameters
Name Description
did*
String
Document ID.
Required
eid*
String
Element ID.
Required
Query parameters
Name Description
skipPerspective
Boolean
Whether views with a perspective projection should be omitted.

Responses


getOpenApi

OpenAPI spec documentation for the Onshape REST API.


/api/openapi

Usage and SDK Samples

curl -X GET "http://localhost/api/openapi?fileType=&excludedTags=&includedTags=&documentationStatus="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        String fileType = fileType_example; // String | The type of file to return. Defaults to JSON.
        String excludedTags = excludedTags_example; // String | If an operation contains an excluded tag, it is not returned from this endpoint.
        String includedTags = includedTags_example; // String | Return at most all the operations with tags included in includedTags. If not given, this will default to all tags.
        array[String] documentationStatus = ; // array[String] | Only return endpoints that have the specified document status. Default is to return all the keys the user should have access to.
        try {
            OpenAPI result = apiInstance.getOpenApi(fileType, excludedTags, includedTags, documentationStatus);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getOpenApi");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String fileType = fileType_example; // String | The type of file to return. Defaults to JSON.
        String excludedTags = excludedTags_example; // String | If an operation contains an excluded tag, it is not returned from this endpoint.
        String includedTags = includedTags_example; // String | Return at most all the operations with tags included in includedTags. If not given, this will default to all tags.
        array[String] documentationStatus = ; // array[String] | Only return endpoints that have the specified document status. Default is to return all the keys the user should have access to.
        try {
            OpenAPI result = apiInstance.getOpenApi(fileType, excludedTags, includedTags, documentationStatus);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getOpenApi");
            e.printStackTrace();
        }
    }
}
String *fileType = fileType_example; // The type of file to return. Defaults to JSON. (optional) (default to json)
String *excludedTags = excludedTags_example; // If an operation contains an excluded tag, it is not returned from this endpoint. (optional) (default to null)
String *includedTags = includedTags_example; // Return at most all the operations with tags included in includedTags. If not given, this will default to all tags. (optional) (default to null)
array[String] *documentationStatus = ; // Only return endpoints that have the specified document status. Default is to return all the keys the user should have access to. (optional) (default to null)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// OpenAPI spec documentation for the Onshape REST API.
[apiInstance getOpenApiWith:fileType
    excludedTags:excludedTags
    includedTags:includedTags
    documentationStatus:documentationStatus
              completionHandler: ^(OpenAPI output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OnshapeRestApi = require('onshape_rest_api');

var api = new OnshapeRestApi.DefaultApi()
var opts = {
  'fileType': fileType_example, // {String} The type of file to return. Defaults to JSON.
  'excludedTags': excludedTags_example, // {String} If an operation contains an excluded tag, it is not returned from this endpoint.
  'includedTags': includedTags_example, // {String} Return at most all the operations with tags included in includedTags. If not given, this will default to all tags.
  'documentationStatus':  // {array[String]} Only return endpoints that have the specified document status. Default is to return all the keys the user should have access to.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getOpenApi(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getOpenApiExample
    {
        public void main()
        {
            
            var apiInstance = new DefaultApi();
            var fileType = fileType_example;  // String | The type of file to return. Defaults to JSON. (optional)  (default to json)
            var excludedTags = excludedTags_example;  // String | If an operation contains an excluded tag, it is not returned from this endpoint. (optional)  (default to null)
            var includedTags = includedTags_example;  // String | Return at most all the operations with tags included in includedTags. If not given, this will default to all tags. (optional)  (default to null)
            var documentationStatus = new array[String](); // array[String] | Only return endpoints that have the specified document status. Default is to return all the keys the user should have access to. (optional)  (default to null)

            try
            {
                // OpenAPI spec documentation for the Onshape REST API.
                OpenAPI result = apiInstance.getOpenApi(fileType, excludedTags, includedTags, documentationStatus);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.getOpenApi: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$fileType = fileType_example; // String | The type of file to return. Defaults to JSON.
$excludedTags = excludedTags_example; // String | If an operation contains an excluded tag, it is not returned from this endpoint.
$includedTags = includedTags_example; // String | Return at most all the operations with tags included in includedTags. If not given, this will default to all tags.
$documentationStatus = ; // array[String] | Only return endpoints that have the specified document status. Default is to return all the keys the user should have access to.

try {
    $result = $api_instance->getOpenApi($fileType, $excludedTags, $includedTags, $documentationStatus);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->getOpenApi: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $fileType = fileType_example; # String | The type of file to return. Defaults to JSON.
my $excludedTags = excludedTags_example; # String | If an operation contains an excluded tag, it is not returned from this endpoint.
my $includedTags = includedTags_example; # String | Return at most all the operations with tags included in includedTags. If not given, this will default to all tags.
my $documentationStatus = []; # array[String] | Only return endpoints that have the specified document status. Default is to return all the keys the user should have access to.

eval { 
    my $result = $api_instance->getOpenApi(fileType => $fileType, excludedTags => $excludedTags, includedTags => $includedTags, documentationStatus => $documentationStatus);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->getOpenApi: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = openapi_client.DefaultApi()
fileType = fileType_example # String | The type of file to return. Defaults to JSON. (optional) (default to json)
excludedTags = excludedTags_example # String | If an operation contains an excluded tag, it is not returned from this endpoint. (optional) (default to null)
includedTags = includedTags_example # String | Return at most all the operations with tags included in includedTags. If not given, this will default to all tags. (optional) (default to null)
documentationStatus =  # array[String] | Only return endpoints that have the specified document status. Default is to return all the keys the user should have access to. (optional) (default to null)

try: 
    # OpenAPI spec documentation for the Onshape REST API.
    api_response = api_instance.get_open_api(fileType=fileType, excludedTags=excludedTags, includedTags=includedTags, documentationStatus=documentationStatus)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->getOpenApi: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let fileType = fileType_example; // String
    let excludedTags = excludedTags_example; // String
    let includedTags = includedTags_example; // String
    let documentationStatus = ; // array[String]

    let mut context = DefaultApi::Context::default();
    let result = client.getOpenApi(fileType, excludedTags, includedTags, documentationStatus, &context).wait();
    println!("{:?}", result);

}

Scopes

Parameters

Query parameters
Name Description
fileType
String
The type of file to return. Defaults to JSON.
excludedTags
String
If an operation contains an excluded tag, it is not returned from this endpoint.
includedTags
String
Return at most all the operations with tags included in includedTags. If not given, this will default to all tags.
documentationStatus
array[String]
Only return endpoints that have the specified document status. Default is to return all the keys the user should have access to.

Responses


getShadedViews1

Get Shaded Views


/api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/shadedviews

Usage and SDK Samples

curl -X GET "http://localhost/api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/shadedviews?viewMatrix=&outputHeight=&outputWidth=&pixelSize=&edges=&showAllParts=&includeSurfaces=&useAntiAliasing=&configuration=&linkDocumentId="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        DefaultApi apiInstance = new DefaultApi();
        String did = did_example; // String | Document ID.
        String wvm = wvm_example; // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
        String wvmid = wvmid_example; // String | Workspace (w), Version (v) or Microversion (m) ID.
        String eid = eid_example; // String | Element ID.
        String viewMatrix = viewMatrix_example; // String | 12-number view matrix (comma-separated), or one of the following named views:
top, bottom, front, back, left, right
The 12 entries in the view matrix form three rows and four columns, which is a linear transformation applied to the model itself.
The matrix's first three columns maps the coordinate axes of the model to the coordinate axes of the view, and the fourth column translates the origin (in meters).
The view coordinates have x pointing right, y pointing up, and z pointing towards the viewer, while a front view of the model has x pointing right, y pointing away from the viewer, and z pointing up.
For example, the identity matrix viewMatrix=1,0,0,0,0,1,0,0,0,0,1,0 corresponds to the top view, and viewMatrix=0.612,0.612,0,0,-0.354,0.354,0.707,0,0.707,-0.707,0.707,0 corresponds (approximately) to the isometric view.
The first three columns of the view matrix should be orthonormal and have a positive determinant.  If this is not the case, view behavior may be undefined.
        Integer outputHeight = 56; // Integer | Output image height (in pixels)
        Integer outputWidth = 56; // Integer | Output image width (in pixels)
        Double pixelSize = 1.2; // Double | Height and width represented by each pixel (in meters). If the value is 0, the display will be sized to fit the output image dimensions.
        String edges = edges_example; // String | The treatment to be applied to edges in the display. Options are show: show visible edges, hide: hide visible edges.
        Boolean showAllParts = true; // Boolean | Whether or not all parts should be shown in the element,
regardless of user setting. If false, the visibility setting made by the user will be reflected in the
image. If true, all parts will be shown.
        Boolean includeSurfaces = true; // Boolean | Whether or not surfaces should be shown in the element.
It is applicable only when showAllParts is true. If false, surfaces will be excluded.
If true, all surfaces will be shown.
        Boolean useAntiAliasing = true; // Boolean | If true, an anti-aliasing factor will be used to smooth
model boundaries in the final image result. If false, the image will be rasterized at the given
resolution. Setting to true can have negative performance implications with respect to rendering time
and memory usage. If a high-resolution image is requested and anti-aliasing is turned on, the server
may not be able to fulfill the request.
        String configuration = configuration_example; // String | Configuration string.
        String linkDocumentId = linkDocumentId_example; // String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.
        try {
            BTShadedRenderDocumentResponse result = apiInstance.getShadedViews1(did, wvm, wvmid, eid, viewMatrix, outputHeight, outputWidth, pixelSize, edges, showAllParts, includeSurfaces, useAntiAliasing, configuration, linkDocumentId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getShadedViews1");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String did = did_example; // String | Document ID.
        String wvm = wvm_example; // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
        String wvmid = wvmid_example; // String | Workspace (w), Version (v) or Microversion (m) ID.
        String eid = eid_example; // String | Element ID.
        String viewMatrix = viewMatrix_example; // String | 12-number view matrix (comma-separated), or one of the following named views:
top, bottom, front, back, left, right
The 12 entries in the view matrix form three rows and four columns, which is a linear transformation applied to the model itself.
The matrix's first three columns maps the coordinate axes of the model to the coordinate axes of the view, and the fourth column translates the origin (in meters).
The view coordinates have x pointing right, y pointing up, and z pointing towards the viewer, while a front view of the model has x pointing right, y pointing away from the viewer, and z pointing up.
For example, the identity matrix viewMatrix=1,0,0,0,0,1,0,0,0,0,1,0 corresponds to the top view, and viewMatrix=0.612,0.612,0,0,-0.354,0.354,0.707,0,0.707,-0.707,0.707,0 corresponds (approximately) to the isometric view.
The first three columns of the view matrix should be orthonormal and have a positive determinant.  If this is not the case, view behavior may be undefined.
        Integer outputHeight = 56; // Integer | Output image height (in pixels)
        Integer outputWidth = 56; // Integer | Output image width (in pixels)
        Double pixelSize = 1.2; // Double | Height and width represented by each pixel (in meters). If the value is 0, the display will be sized to fit the output image dimensions.
        String edges = edges_example; // String | The treatment to be applied to edges in the display. Options are show: show visible edges, hide: hide visible edges.
        Boolean showAllParts = true; // Boolean | Whether or not all parts should be shown in the element,
regardless of user setting. If false, the visibility setting made by the user will be reflected in the
image. If true, all parts will be shown.
        Boolean includeSurfaces = true; // Boolean | Whether or not surfaces should be shown in the element.
It is applicable only when showAllParts is true. If false, surfaces will be excluded.
If true, all surfaces will be shown.
        Boolean useAntiAliasing = true; // Boolean | If true, an anti-aliasing factor will be used to smooth
model boundaries in the final image result. If false, the image will be rasterized at the given
resolution. Setting to true can have negative performance implications with respect to rendering time
and memory usage. If a high-resolution image is requested and anti-aliasing is turned on, the server
may not be able to fulfill the request.
        String configuration = configuration_example; // String | Configuration string.
        String linkDocumentId = linkDocumentId_example; // String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.
        try {
            BTShadedRenderDocumentResponse result = apiInstance.getShadedViews1(did, wvm, wvmid, eid, viewMatrix, outputHeight, outputWidth, pixelSize, edges, showAllParts, includeSurfaces, useAntiAliasing, configuration, linkDocumentId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getShadedViews1");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *did = did_example; // Document ID. (default to null)
String *wvm = wvm_example; // One of w or v or m corresponding to whether a workspace or version or microversion was entered. (default to null)
String *wvmid = wvmid_example; // Workspace (w), Version (v) or Microversion (m) ID. (default to null)
String *eid = eid_example; // Element ID. (default to null)
String *viewMatrix = viewMatrix_example; // 12-number view matrix (comma-separated), or one of the following named views:
top, bottom, front, back, left, right
The 12 entries in the view matrix form three rows and four columns, which is a linear transformation applied to the model itself.
The matrix's first three columns maps the coordinate axes of the model to the coordinate axes of the view, and the fourth column translates the origin (in meters).
The view coordinates have x pointing right, y pointing up, and z pointing towards the viewer, while a front view of the model has x pointing right, y pointing away from the viewer, and z pointing up.
For example, the identity matrix viewMatrix=1,0,0,0,0,1,0,0,0,0,1,0 corresponds to the top view, and viewMatrix=0.612,0.612,0,0,-0.354,0.354,0.707,0,0.707,-0.707,0.707,0 corresponds (approximately) to the isometric view.
The first three columns of the view matrix should be orthonormal and have a positive determinant.  If this is not the case, view behavior may be undefined. (optional) (default to front)
Integer *outputHeight = 56; // Output image height (in pixels) (optional) (default to 500)
Integer *outputWidth = 56; // Output image width (in pixels) (optional) (default to 500)
Double *pixelSize = 1.2; // Height and width represented by each pixel (in meters). If the value is 0, the display will be sized to fit the output image dimensions. (optional) (default to 0.003)
String *edges = edges_example; // The treatment to be applied to edges in the display. Options are show: show visible edges, hide: hide visible edges. (optional) (default to show)
Boolean *showAllParts = true; // Whether or not all parts should be shown in the element,
regardless of user setting. If false, the visibility setting made by the user will be reflected in the
image. If true, all parts will be shown. (optional) (default to false)
Boolean *includeSurfaces = true; // Whether or not surfaces should be shown in the element.
It is applicable only when showAllParts is true. If false, surfaces will be excluded.
If true, all surfaces will be shown. (optional) (default to false)
Boolean *useAntiAliasing = true; // If true, an anti-aliasing factor will be used to smooth
model boundaries in the final image result. If false, the image will be rasterized at the given
resolution. Setting to true can have negative performance implications with respect to rendering time
and memory usage. If a high-resolution image is requested and anti-aliasing is turned on, the server
may not be able to fulfill the request. (optional) (default to false)
String *configuration = configuration_example; // Configuration string. (optional) (default to null)
String *linkDocumentId = linkDocumentId_example; // Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter. (optional) (default to null)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Get Shaded Views
[apiInstance getShadedViews1With:did
    wvm:wvm
    wvmid:wvmid
    eid:eid
    viewMatrix:viewMatrix
    outputHeight:outputHeight
    outputWidth:outputWidth
    pixelSize:pixelSize
    edges:edges
    showAllParts:showAllParts
    includeSurfaces:includeSurfaces
    useAntiAliasing:useAntiAliasing
    configuration:configuration
    linkDocumentId:linkDocumentId
              completionHandler: ^(BTShadedRenderDocumentResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OnshapeRestApi = require('onshape_rest_api');
var defaultClient = OnshapeRestApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new OnshapeRestApi.DefaultApi()
var did = did_example; // {String} Document ID.
var wvm = wvm_example; // {String} One of w or v or m corresponding to whether a workspace or version or microversion was entered.
var wvmid = wvmid_example; // {String} Workspace (w), Version (v) or Microversion (m) ID.
var eid = eid_example; // {String} Element ID.
var opts = {
  'viewMatrix': viewMatrix_example, // {String} 12-number view matrix (comma-separated), or one of the following named views:
top, bottom, front, back, left, right
The 12 entries in the view matrix form three rows and four columns, which is a linear transformation applied to the model itself.
The matrix's first three columns maps the coordinate axes of the model to the coordinate axes of the view, and the fourth column translates the origin (in meters).
The view coordinates have x pointing right, y pointing up, and z pointing towards the viewer, while a front view of the model has x pointing right, y pointing away from the viewer, and z pointing up.
For example, the identity matrix viewMatrix=1,0,0,0,0,1,0,0,0,0,1,0 corresponds to the top view, and viewMatrix=0.612,0.612,0,0,-0.354,0.354,0.707,0,0.707,-0.707,0.707,0 corresponds (approximately) to the isometric view.
The first three columns of the view matrix should be orthonormal and have a positive determinant.  If this is not the case, view behavior may be undefined.
  'outputHeight': 56, // {Integer} Output image height (in pixels)
  'outputWidth': 56, // {Integer} Output image width (in pixels)
  'pixelSize': 1.2, // {Double} Height and width represented by each pixel (in meters). If the value is 0, the display will be sized to fit the output image dimensions.
  'edges': edges_example, // {String} The treatment to be applied to edges in the display. Options are show: show visible edges, hide: hide visible edges.
  'showAllParts': true, // {Boolean} Whether or not all parts should be shown in the element,
regardless of user setting. If false, the visibility setting made by the user will be reflected in the
image. If true, all parts will be shown.
  'includeSurfaces': true, // {Boolean} Whether or not surfaces should be shown in the element.
It is applicable only when showAllParts is true. If false, surfaces will be excluded.
If true, all surfaces will be shown.
  'useAntiAliasing': true, // {Boolean} If true, an anti-aliasing factor will be used to smooth
model boundaries in the final image result. If false, the image will be rasterized at the given
resolution. Setting to true can have negative performance implications with respect to rendering time
and memory usage. If a high-resolution image is requested and anti-aliasing is turned on, the server
may not be able to fulfill the request.
  'configuration': configuration_example, // {String} Configuration string.
  'linkDocumentId': linkDocumentId_example // {String} Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getShadedViews1(did, wvm, wvmid, eid, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getShadedViews1Example
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new DefaultApi();
            var did = did_example;  // String | Document ID. (default to null)
            var wvm = wvm_example;  // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered. (default to null)
            var wvmid = wvmid_example;  // String | Workspace (w), Version (v) or Microversion (m) ID. (default to null)
            var eid = eid_example;  // String | Element ID. (default to null)
            var viewMatrix = viewMatrix_example;  // String | 12-number view matrix (comma-separated), or one of the following named views:
top, bottom, front, back, left, right
The 12 entries in the view matrix form three rows and four columns, which is a linear transformation applied to the model itself.
The matrix's first three columns maps the coordinate axes of the model to the coordinate axes of the view, and the fourth column translates the origin (in meters).
The view coordinates have x pointing right, y pointing up, and z pointing towards the viewer, while a front view of the model has x pointing right, y pointing away from the viewer, and z pointing up.
For example, the identity matrix viewMatrix=1,0,0,0,0,1,0,0,0,0,1,0 corresponds to the top view, and viewMatrix=0.612,0.612,0,0,-0.354,0.354,0.707,0,0.707,-0.707,0.707,0 corresponds (approximately) to the isometric view.
The first three columns of the view matrix should be orthonormal and have a positive determinant.  If this is not the case, view behavior may be undefined. (optional)  (default to front)
            var outputHeight = 56;  // Integer | Output image height (in pixels) (optional)  (default to 500)
            var outputWidth = 56;  // Integer | Output image width (in pixels) (optional)  (default to 500)
            var pixelSize = 1.2;  // Double | Height and width represented by each pixel (in meters). If the value is 0, the display will be sized to fit the output image dimensions. (optional)  (default to 0.003)
            var edges = edges_example;  // String | The treatment to be applied to edges in the display. Options are show: show visible edges, hide: hide visible edges. (optional)  (default to show)
            var showAllParts = true;  // Boolean | Whether or not all parts should be shown in the element,
regardless of user setting. If false, the visibility setting made by the user will be reflected in the
image. If true, all parts will be shown. (optional)  (default to false)
            var includeSurfaces = true;  // Boolean | Whether or not surfaces should be shown in the element.
It is applicable only when showAllParts is true. If false, surfaces will be excluded.
If true, all surfaces will be shown. (optional)  (default to false)
            var useAntiAliasing = true;  // Boolean | If true, an anti-aliasing factor will be used to smooth
model boundaries in the final image result. If false, the image will be rasterized at the given
resolution. Setting to true can have negative performance implications with respect to rendering time
and memory usage. If a high-resolution image is requested and anti-aliasing is turned on, the server
may not be able to fulfill the request. (optional)  (default to false)
            var configuration = configuration_example;  // String | Configuration string. (optional)  (default to null)
            var linkDocumentId = linkDocumentId_example;  // String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter. (optional)  (default to null)

            try
            {
                // Get Shaded Views
                BTShadedRenderDocumentResponse result = apiInstance.getShadedViews1(did, wvm, wvmid, eid, viewMatrix, outputHeight, outputWidth, pixelSize, edges, showAllParts, includeSurfaces, useAntiAliasing, configuration, linkDocumentId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.getShadedViews1: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$did = did_example; // String | Document ID.
$wvm = wvm_example; // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
$wvmid = wvmid_example; // String | Workspace (w), Version (v) or Microversion (m) ID.
$eid = eid_example; // String | Element ID.
$viewMatrix = viewMatrix_example; // String | 12-number view matrix (comma-separated), or one of the following named views:
top, bottom, front, back, left, right
The 12 entries in the view matrix form three rows and four columns, which is a linear transformation applied to the model itself.
The matrix's first three columns maps the coordinate axes of the model to the coordinate axes of the view, and the fourth column translates the origin (in meters).
The view coordinates have x pointing right, y pointing up, and z pointing towards the viewer, while a front view of the model has x pointing right, y pointing away from the viewer, and z pointing up.
For example, the identity matrix viewMatrix=1,0,0,0,0,1,0,0,0,0,1,0 corresponds to the top view, and viewMatrix=0.612,0.612,0,0,-0.354,0.354,0.707,0,0.707,-0.707,0.707,0 corresponds (approximately) to the isometric view.
The first three columns of the view matrix should be orthonormal and have a positive determinant.  If this is not the case, view behavior may be undefined.
$outputHeight = 56; // Integer | Output image height (in pixels)
$outputWidth = 56; // Integer | Output image width (in pixels)
$pixelSize = 1.2; // Double | Height and width represented by each pixel (in meters). If the value is 0, the display will be sized to fit the output image dimensions.
$edges = edges_example; // String | The treatment to be applied to edges in the display. Options are show: show visible edges, hide: hide visible edges.
$showAllParts = true; // Boolean | Whether or not all parts should be shown in the element,
regardless of user setting. If false, the visibility setting made by the user will be reflected in the
image. If true, all parts will be shown.
$includeSurfaces = true; // Boolean | Whether or not surfaces should be shown in the element.
It is applicable only when showAllParts is true. If false, surfaces will be excluded.
If true, all surfaces will be shown.
$useAntiAliasing = true; // Boolean | If true, an anti-aliasing factor will be used to smooth
model boundaries in the final image result. If false, the image will be rasterized at the given
resolution. Setting to true can have negative performance implications with respect to rendering time
and memory usage. If a high-resolution image is requested and anti-aliasing is turned on, the server
may not be able to fulfill the request.
$configuration = configuration_example; // String | Configuration string.
$linkDocumentId = linkDocumentId_example; // String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.

try {
    $result = $api_instance->getShadedViews1($did, $wvm, $wvmid, $eid, $viewMatrix, $outputHeight, $outputWidth, $pixelSize, $edges, $showAllParts, $includeSurfaces, $useAntiAliasing, $configuration, $linkDocumentId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->getShadedViews1: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $did = did_example; # String | Document ID.
my $wvm = wvm_example; # String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
my $wvmid = wvmid_example; # String | Workspace (w), Version (v) or Microversion (m) ID.
my $eid = eid_example; # String | Element ID.
my $viewMatrix = viewMatrix_example; # String | 12-number view matrix (comma-separated), or one of the following named views:
top, bottom, front, back, left, right
The 12 entries in the view matrix form three rows and four columns, which is a linear transformation applied to the model itself.
The matrix's first three columns maps the coordinate axes of the model to the coordinate axes of the view, and the fourth column translates the origin (in meters).
The view coordinates have x pointing right, y pointing up, and z pointing towards the viewer, while a front view of the model has x pointing right, y pointing away from the viewer, and z pointing up.
For example, the identity matrix viewMatrix=1,0,0,0,0,1,0,0,0,0,1,0 corresponds to the top view, and viewMatrix=0.612,0.612,0,0,-0.354,0.354,0.707,0,0.707,-0.707,0.707,0 corresponds (approximately) to the isometric view.
The first three columns of the view matrix should be orthonormal and have a positive determinant.  If this is not the case, view behavior may be undefined.
my $outputHeight = 56; # Integer | Output image height (in pixels)
my $outputWidth = 56; # Integer | Output image width (in pixels)
my $pixelSize = 1.2; # Double | Height and width represented by each pixel (in meters). If the value is 0, the display will be sized to fit the output image dimensions.
my $edges = edges_example; # String | The treatment to be applied to edges in the display. Options are show: show visible edges, hide: hide visible edges.
my $showAllParts = true; # Boolean | Whether or not all parts should be shown in the element,
regardless of user setting. If false, the visibility setting made by the user will be reflected in the
image. If true, all parts will be shown.
my $includeSurfaces = true; # Boolean | Whether or not surfaces should be shown in the element.
It is applicable only when showAllParts is true. If false, surfaces will be excluded.
If true, all surfaces will be shown.
my $useAntiAliasing = true; # Boolean | If true, an anti-aliasing factor will be used to smooth
model boundaries in the final image result. If false, the image will be rasterized at the given
resolution. Setting to true can have negative performance implications with respect to rendering time
and memory usage. If a high-resolution image is requested and anti-aliasing is turned on, the server
may not be able to fulfill the request.
my $configuration = configuration_example; # String | Configuration string.
my $linkDocumentId = linkDocumentId_example; # String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.

eval { 
    my $result = $api_instance->getShadedViews1(did => $did, wvm => $wvm, wvmid => $wvmid, eid => $eid, viewMatrix => $viewMatrix, outputHeight => $outputHeight, outputWidth => $outputWidth, pixelSize => $pixelSize, edges => $edges, showAllParts => $showAllParts, includeSurfaces => $includeSurfaces, useAntiAliasing => $useAntiAliasing, configuration => $configuration, linkDocumentId => $linkDocumentId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->getShadedViews1: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.DefaultApi()
did = did_example # String | Document ID. (default to null)
wvm = wvm_example # String | One of w or v or m corresponding to whether a workspace or version or microversion was entered. (default to null)
wvmid = wvmid_example # String | Workspace (w), Version (v) or Microversion (m) ID. (default to null)
eid = eid_example # String | Element ID. (default to null)
viewMatrix = viewMatrix_example # String | 12-number view matrix (comma-separated), or one of the following named views:
top, bottom, front, back, left, right
The 12 entries in the view matrix form three rows and four columns, which is a linear transformation applied to the model itself.
The matrix's first three columns maps the coordinate axes of the model to the coordinate axes of the view, and the fourth column translates the origin (in meters).
The view coordinates have x pointing right, y pointing up, and z pointing towards the viewer, while a front view of the model has x pointing right, y pointing away from the viewer, and z pointing up.
For example, the identity matrix viewMatrix=1,0,0,0,0,1,0,0,0,0,1,0 corresponds to the top view, and viewMatrix=0.612,0.612,0,0,-0.354,0.354,0.707,0,0.707,-0.707,0.707,0 corresponds (approximately) to the isometric view.
The first three columns of the view matrix should be orthonormal and have a positive determinant.  If this is not the case, view behavior may be undefined. (optional) (default to front)
outputHeight = 56 # Integer | Output image height (in pixels) (optional) (default to 500)
outputWidth = 56 # Integer | Output image width (in pixels) (optional) (default to 500)
pixelSize = 1.2 # Double | Height and width represented by each pixel (in meters). If the value is 0, the display will be sized to fit the output image dimensions. (optional) (default to 0.003)
edges = edges_example # String | The treatment to be applied to edges in the display. Options are show: show visible edges, hide: hide visible edges. (optional) (default to show)
showAllParts = true # Boolean | Whether or not all parts should be shown in the element,
regardless of user setting. If false, the visibility setting made by the user will be reflected in the
image. If true, all parts will be shown. (optional) (default to false)
includeSurfaces = true # Boolean | Whether or not surfaces should be shown in the element.
It is applicable only when showAllParts is true. If false, surfaces will be excluded.
If true, all surfaces will be shown. (optional) (default to false)
useAntiAliasing = true # Boolean | If true, an anti-aliasing factor will be used to smooth
model boundaries in the final image result. If false, the image will be rasterized at the given
resolution. Setting to true can have negative performance implications with respect to rendering time
and memory usage. If a high-resolution image is requested and anti-aliasing is turned on, the server
may not be able to fulfill the request. (optional) (default to false)
configuration = configuration_example # String | Configuration string. (optional) (default to null)
linkDocumentId = linkDocumentId_example # String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter. (optional) (default to null)

try: 
    # Get Shaded Views
    api_response = api_instance.get_shaded_views1(did, wvm, wvmid, eid, viewMatrix=viewMatrix, outputHeight=outputHeight, outputWidth=outputWidth, pixelSize=pixelSize, edges=edges, showAllParts=showAllParts, includeSurfaces=includeSurfaces, useAntiAliasing=useAntiAliasing, configuration=configuration, linkDocumentId=linkDocumentId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->getShadedViews1: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let did = did_example; // String
    let wvm = wvm_example; // String
    let wvmid = wvmid_example; // String
    let eid = eid_example; // String
    let viewMatrix = viewMatrix_example; // String
    let outputHeight = 56; // Integer
    let outputWidth = 56; // Integer
    let pixelSize = 1.2; // Double
    let edges = edges_example; // String
    let showAllParts = true; // Boolean
    let includeSurfaces = true; // Boolean
    let useAntiAliasing = true; // Boolean
    let configuration = configuration_example; // String
    let linkDocumentId = linkDocumentId_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.getShadedViews1(did, wvm, wvmid, eid, viewMatrix, outputHeight, outputWidth, pixelSize, edges, showAllParts, includeSurfaces, useAntiAliasing, configuration, linkDocumentId, &context).wait();
    println!("{:?}", result);

}

Scopes

OAuth2Internal Application is Onshape Internal
OAuth2ReadPII Application can read your profile information
OAuth2Read Application can read your documents
OAuth2Write Application can write to your documents
OAuth2Delete Application can delete your documents and workspaces
OAuth2Purchase Application can request purchases on your behalf
OAuth2Share Application can share and unshare documents on your behalf

Parameters

Path parameters
Name Description
did*
String
Document ID.
Required
wvm*
String
One of w or v or m corresponding to whether a workspace or version or microversion was entered.
Required
wvmid*
String
Workspace (w), Version (v) or Microversion (m) ID.
Required
eid*
String
Element ID.
Required
Query parameters
Name Description
viewMatrix
String
12-number view matrix (comma-separated), or one of the following named views: top, bottom, front, back, left, right The 12 entries in the view matrix form three rows and four columns, which is a linear transformation applied to the model itself. The matrix's first three columns maps the coordinate axes of the model to the coordinate axes of the view, and the fourth column translates the origin (in meters). The view coordinates have x pointing right, y pointing up, and z pointing towards the viewer, while a front view of the model has x pointing right, y pointing away from the viewer, and z pointing up. For example, the identity matrix viewMatrix=1,0,0,0,0,1,0,0,0,0,1,0 corresponds to the top view, and viewMatrix=0.612,0.612,0,0,-0.354,0.354,0.707,0,0.707,-0.707,0.707,0 corresponds (approximately) to the isometric view. The first three columns of the view matrix should be orthonormal and have a positive determinant. If this is not the case, view behavior may be undefined.
outputHeight
Integer (int32)
Output image height (in pixels)
outputWidth
Integer (int32)
Output image width (in pixels)
pixelSize
Double (double)
Height and width represented by each pixel (in meters). If the value is 0, the display will be sized to fit the output image dimensions.
edges
String
The treatment to be applied to edges in the display. Options are show: show visible edges, hide: hide visible edges.
showAllParts
Boolean
Whether or not all parts should be shown in the element, regardless of user setting. If false, the visibility setting made by the user will be reflected in the image. If true, all parts will be shown.
includeSurfaces
Boolean
Whether or not surfaces should be shown in the element. It is applicable only when showAllParts is true. If false, surfaces will be excluded. If true, all surfaces will be shown.
useAntiAliasing
Boolean
If true, an anti-aliasing factor will be used to smooth model boundaries in the final image result. If false, the image will be rasterized at the given resolution. Setting to true can have negative performance implications with respect to rendering time and memory usage. If a high-resolution image is requested and anti-aliasing is turned on, the server may not be able to fulfill the request.
configuration
String
Configuration string.
linkDocumentId
String
Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.

Responses


getTranslatorFormats4

Get Translation Formats


/api/partstudios/d/{did}/w/{wid}/e/{eid}/translationformats

Usage and SDK Samples

curl -X GET "http://localhost/api/partstudios/d/{did}/w/{wid}/e/{eid}/translationformats?checkContent="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        String did = did_example; // String | Document ID.
        String wid = wid_example; // String | Workspace ID.
        String eid = eid_example; // String | Element ID.
        Boolean checkContent = true; // Boolean |     Whether the current content or lack thereof should be considered when determining the available formats. Empty part studios cannot be translated into any format.
        try {
            array[BTModelFormatInfo] result = apiInstance.getTranslatorFormats4(did, wid, eid, checkContent);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getTranslatorFormats4");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String did = did_example; // String | Document ID.
        String wid = wid_example; // String | Workspace ID.
        String eid = eid_example; // String | Element ID.
        Boolean checkContent = true; // Boolean |     Whether the current content or lack thereof should be considered when determining the available formats. Empty part studios cannot be translated into any format.
        try {
            array[BTModelFormatInfo] result = apiInstance.getTranslatorFormats4(did, wid, eid, checkContent);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getTranslatorFormats4");
            e.printStackTrace();
        }
    }
}
String *did = did_example; // Document ID. (default to null)
String *wid = wid_example; // Workspace ID. (default to null)
String *eid = eid_example; // Element ID. (default to null)
Boolean *checkContent = true; //     Whether the current content or lack thereof should be considered when determining the available formats. Empty part studios cannot be translated into any format. (optional) (default to true)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Get Translation Formats
[apiInstance getTranslatorFormats4With:did
    wid:wid
    eid:eid
    checkContent:checkContent
              completionHandler: ^(array[BTModelFormatInfo] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OnshapeRestApi = require('onshape_rest_api');

var api = new OnshapeRestApi.DefaultApi()
var did = did_example; // {String} Document ID.
var wid = wid_example; // {String} Workspace ID.
var eid = eid_example; // {String} Element ID.
var opts = {
  'checkContent': true // {Boolean}     Whether the current content or lack thereof should be considered when determining the available formats. Empty part studios cannot be translated into any format.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getTranslatorFormats4(did, wid, eid, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getTranslatorFormats4Example
    {
        public void main()
        {
            
            var apiInstance = new DefaultApi();
            var did = did_example;  // String | Document ID. (default to null)
            var wid = wid_example;  // String | Workspace ID. (default to null)
            var eid = eid_example;  // String | Element ID. (default to null)
            var checkContent = true;  // Boolean |     Whether the current content or lack thereof should be considered when determining the available formats. Empty part studios cannot be translated into any format. (optional)  (default to true)

            try
            {
                // Get Translation Formats
                array[BTModelFormatInfo] result = apiInstance.getTranslatorFormats4(did, wid, eid, checkContent);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.getTranslatorFormats4: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$did = did_example; // String | Document ID.
$wid = wid_example; // String | Workspace ID.
$eid = eid_example; // String | Element ID.
$checkContent = true; // Boolean |     Whether the current content or lack thereof should be considered when determining the available formats. Empty part studios cannot be translated into any format.

try {
    $result = $api_instance->getTranslatorFormats4($did, $wid, $eid, $checkContent);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->getTranslatorFormats4: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $did = did_example; # String | Document ID.
my $wid = wid_example; # String | Workspace ID.
my $eid = eid_example; # String | Element ID.
my $checkContent = true; # Boolean |     Whether the current content or lack thereof should be considered when determining the available formats. Empty part studios cannot be translated into any format.

eval { 
    my $result = $api_instance->getTranslatorFormats4(did => $did, wid => $wid, eid => $eid, checkContent => $checkContent);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->getTranslatorFormats4: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = openapi_client.DefaultApi()
did = did_example # String | Document ID. (default to null)
wid = wid_example # String | Workspace ID. (default to null)
eid = eid_example # String | Element ID. (default to null)
checkContent = true # Boolean |     Whether the current content or lack thereof should be considered when determining the available formats. Empty part studios cannot be translated into any format. (optional) (default to true)

try: 
    # Get Translation Formats
    api_response = api_instance.get_translator_formats4(did, wid, eid, checkContent=checkContent)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->getTranslatorFormats4: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let did = did_example; // String
    let wid = wid_example; // String
    let eid = eid_example; // String
    let checkContent = true; // Boolean

    let mut context = DefaultApi::Context::default();
    let result = client.getTranslatorFormats4(did, wid, eid, checkContent, &context).wait();
    println!("{:?}", result);

}

Scopes

Parameters

Path parameters
Name Description
did*
String
Document ID.
Required
wid*
String
Workspace ID.
Required
eid*
String
Element ID.
Required
Query parameters
Name Description
checkContent
Boolean
Whether the current content or lack thereof should be considered when determining the available formats. Empty part studios cannot be translated into any format.

Responses


translateFormat5

Create Part Studio translation


/api/partstudios/d/{did}/{wv}/{wvid}/e/{eid}/translations

Usage and SDK Samples

curl -X POST "http://localhost/api/partstudios/d/{did}/{wv}/{wvid}/e/{eid}/translations"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        DefaultApi apiInstance = new DefaultApi();
        String did = did_example; // String | Document ID.
        String wv = wv_example; // String | One of w or v corresponding to whether a workspace or version was entered.
        String wvid = wvid_example; // String | Workspace (w) or Version (v).
        String eid = eid_example; // String | Element ID.
        BTTranslateFormatParams bTTranslateFormatParams = ; // BTTranslateFormatParams | 
        try {
            BTTranslationRequestInfo result = apiInstance.translateFormat5(did, wv, wvid, eid, bTTranslateFormatParams);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#translateFormat5");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String did = did_example; // String | Document ID.
        String wv = wv_example; // String | One of w or v corresponding to whether a workspace or version was entered.
        String wvid = wvid_example; // String | Workspace (w) or Version (v).
        String eid = eid_example; // String | Element ID.
        BTTranslateFormatParams bTTranslateFormatParams = ; // BTTranslateFormatParams | 
        try {
            BTTranslationRequestInfo result = apiInstance.translateFormat5(did, wv, wvid, eid, bTTranslateFormatParams);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#translateFormat5");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *did = did_example; // Document ID. (default to null)
String *wv = wv_example; // One of w or v corresponding to whether a workspace or version was entered. (default to null)
String *wvid = wvid_example; // Workspace (w) or Version (v). (default to null)
String *eid = eid_example; // Element ID. (default to null)
BTTranslateFormatParams *bTTranslateFormatParams = ; // 

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Create Part Studio translation
[apiInstance translateFormat5With:did
    wv:wv
    wvid:wvid
    eid:eid
    bTTranslateFormatParams:bTTranslateFormatParams
              completionHandler: ^(BTTranslationRequestInfo output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OnshapeRestApi = require('onshape_rest_api');
var defaultClient = OnshapeRestApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new OnshapeRestApi.DefaultApi()
var did = did_example; // {String} Document ID.
var wv = wv_example; // {String} One of w or v corresponding to whether a workspace or version was entered.
var wvid = wvid_example; // {String} Workspace (w) or Version (v).
var eid = eid_example; // {String} Element ID.
var bTTranslateFormatParams = ; // {BTTranslateFormatParams} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.translateFormat5(did, wv, wvid, eid, bTTranslateFormatParams, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class translateFormat5Example
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new DefaultApi();
            var did = did_example;  // String | Document ID. (default to null)
            var wv = wv_example;  // String | One of w or v corresponding to whether a workspace or version was entered. (default to null)
            var wvid = wvid_example;  // String | Workspace (w) or Version (v). (default to null)
            var eid = eid_example;  // String | Element ID. (default to null)
            var bTTranslateFormatParams = new BTTranslateFormatParams(); // BTTranslateFormatParams | 

            try
            {
                // Create Part Studio translation
                BTTranslationRequestInfo result = apiInstance.translateFormat5(did, wv, wvid, eid, bTTranslateFormatParams);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.translateFormat5: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$did = did_example; // String | Document ID.
$wv = wv_example; // String | One of w or v corresponding to whether a workspace or version was entered.
$wvid = wvid_example; // String | Workspace (w) or Version (v).
$eid = eid_example; // String | Element ID.
$bTTranslateFormatParams = ; // BTTranslateFormatParams | 

try {
    $result = $api_instance->translateFormat5($did, $wv, $wvid, $eid, $bTTranslateFormatParams);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->translateFormat5: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $did = did_example; # String | Document ID.
my $wv = wv_example; # String | One of w or v corresponding to whether a workspace or version was entered.
my $wvid = wvid_example; # String | Workspace (w) or Version (v).
my $eid = eid_example; # String | Element ID.
my $bTTranslateFormatParams = WWW::OPenAPIClient::Object::BTTranslateFormatParams->new(); # BTTranslateFormatParams | 

eval { 
    my $result = $api_instance->translateFormat5(did => $did, wv => $wv, wvid => $wvid, eid => $eid, bTTranslateFormatParams => $bTTranslateFormatParams);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->translateFormat5: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.DefaultApi()
did = did_example # String | Document ID. (default to null)
wv = wv_example # String | One of w or v corresponding to whether a workspace or version was entered. (default to null)
wvid = wvid_example # String | Workspace (w) or Version (v). (default to null)
eid = eid_example # String | Element ID. (default to null)
bTTranslateFormatParams =  # BTTranslateFormatParams | 

try: 
    # Create Part Studio translation
    api_response = api_instance.translate_format5(did, wv, wvid, eid, bTTranslateFormatParams)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->translateFormat5: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let did = did_example; // String
    let wv = wv_example; // String
    let wvid = wvid_example; // String
    let eid = eid_example; // String
    let bTTranslateFormatParams = ; // BTTranslateFormatParams

    let mut context = DefaultApi::Context::default();
    let result = client.translateFormat5(did, wv, wvid, eid, bTTranslateFormatParams, &context).wait();
    println!("{:?}", result);

}

Scopes

OAuth2Internal Application is Onshape Internal
OAuth2ReadPII Application can read your profile information
OAuth2Read Application can read your documents
OAuth2Write Application can write to your documents
OAuth2Delete Application can delete your documents and workspaces
OAuth2Purchase Application can request purchases on your behalf
OAuth2Share Application can share and unshare documents on your behalf

Parameters

Path parameters
Name Description
did*
String
Document ID.
Required
wv*
String
One of w or v corresponding to whether a workspace or version was entered.
Required
wvid*
String
Workspace (w) or Version (v).
Required
eid*
String
Element ID.
Required
Body parameters
Name Description
bTTranslateFormatParams *

Responses


translateIds1

Id Translations


/api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/idtranslations

Usage and SDK Samples

curl -X POST "http://localhost/api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/idtranslations"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        DefaultApi apiInstance = new DefaultApi();
        String did = did_example; // String | Document ID.
        String wvm = wvm_example; // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
        String wvmid = wvmid_example; // String | Workspace (w), Version (v) or Microversion (m) ID.
        String eid = eid_example; // String | Element ID.
        BTIdTranslationParams bTIdTranslationParams = ; // BTIdTranslationParams | 
        try {
            BTIdTranslationInfo result = apiInstance.translateIds1(did, wvm, wvmid, eid, bTIdTranslationParams);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#translateIds1");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String did = did_example; // String | Document ID.
        String wvm = wvm_example; // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
        String wvmid = wvmid_example; // String | Workspace (w), Version (v) or Microversion (m) ID.
        String eid = eid_example; // String | Element ID.
        BTIdTranslationParams bTIdTranslationParams = ; // BTIdTranslationParams | 
        try {
            BTIdTranslationInfo result = apiInstance.translateIds1(did, wvm, wvmid, eid, bTIdTranslationParams);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#translateIds1");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *did = did_example; // Document ID. (default to null)
String *wvm = wvm_example; // One of w or v or m corresponding to whether a workspace or version or microversion was entered. (default to null)
String *wvmid = wvmid_example; // Workspace (w), Version (v) or Microversion (m) ID. (default to null)
String *eid = eid_example; // Element ID. (default to null)
BTIdTranslationParams *bTIdTranslationParams = ; // 

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Id Translations
[apiInstance translateIds1With:did
    wvm:wvm
    wvmid:wvmid
    eid:eid
    bTIdTranslationParams:bTIdTranslationParams
              completionHandler: ^(BTIdTranslationInfo output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OnshapeRestApi = require('onshape_rest_api');
var defaultClient = OnshapeRestApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new OnshapeRestApi.DefaultApi()
var did = did_example; // {String} Document ID.
var wvm = wvm_example; // {String} One of w or v or m corresponding to whether a workspace or version or microversion was entered.
var wvmid = wvmid_example; // {String} Workspace (w), Version (v) or Microversion (m) ID.
var eid = eid_example; // {String} Element ID.
var bTIdTranslationParams = ; // {BTIdTranslationParams} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.translateIds1(did, wvm, wvmid, eid, bTIdTranslationParams, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class translateIds1Example
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new DefaultApi();
            var did = did_example;  // String | Document ID. (default to null)
            var wvm = wvm_example;  // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered. (default to null)
            var wvmid = wvmid_example;  // String | Workspace (w), Version (v) or Microversion (m) ID. (default to null)
            var eid = eid_example;  // String | Element ID. (default to null)
            var bTIdTranslationParams = new BTIdTranslationParams(); // BTIdTranslationParams | 

            try
            {
                // Id Translations
                BTIdTranslationInfo result = apiInstance.translateIds1(did, wvm, wvmid, eid, bTIdTranslationParams);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.translateIds1: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$did = did_example; // String | Document ID.
$wvm = wvm_example; // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
$wvmid = wvmid_example; // String | Workspace (w), Version (v) or Microversion (m) ID.
$eid = eid_example; // String | Element ID.
$bTIdTranslationParams = ; // BTIdTranslationParams | 

try {
    $result = $api_instance->translateIds1($did, $wvm, $wvmid, $eid, $bTIdTranslationParams);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->translateIds1: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $did = did_example; # String | Document ID.
my $wvm = wvm_example; # String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
my $wvmid = wvmid_example; # String | Workspace (w), Version (v) or Microversion (m) ID.
my $eid = eid_example; # String | Element ID.
my $bTIdTranslationParams = WWW::OPenAPIClient::Object::BTIdTranslationParams->new(); # BTIdTranslationParams | 

eval { 
    my $result = $api_instance->translateIds1(did => $did, wvm => $wvm, wvmid => $wvmid, eid => $eid, bTIdTranslationParams => $bTIdTranslationParams);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->translateIds1: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.DefaultApi()
did = did_example # String | Document ID. (default to null)
wvm = wvm_example # String | One of w or v or m corresponding to whether a workspace or version or microversion was entered. (default to null)
wvmid = wvmid_example # String | Workspace (w), Version (v) or Microversion (m) ID. (default to null)
eid = eid_example # String | Element ID. (default to null)
bTIdTranslationParams =  # BTIdTranslationParams | 

try: 
    # Id Translations
    api_response = api_instance.translate_ids1(did, wvm, wvmid, eid, bTIdTranslationParams)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->translateIds1: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let did = did_example; // String
    let wvm = wvm_example; // String
    let wvmid = wvmid_example; // String
    let eid = eid_example; // String
    let bTIdTranslationParams = ; // BTIdTranslationParams

    let mut context = DefaultApi::Context::default();
    let result = client.translateIds1(did, wvm, wvmid, eid, bTIdTranslationParams, &context).wait();
    println!("{:?}", result);

}

Scopes

OAuth2Internal Application is Onshape Internal
OAuth2ReadPII Application can read your profile information
OAuth2Read Application can read your documents
OAuth2Write Application can write to your documents
OAuth2Delete Application can delete your documents and workspaces
OAuth2Purchase Application can request purchases on your behalf
OAuth2Share Application can share and unshare documents on your behalf

Parameters

Path parameters
Name Description
did*
String
Document ID.
Required
wvm*
String
One of w or v or m corresponding to whether a workspace or version or microversion was entered.
Required
wvmid*
String
Workspace (w), Version (v) or Microversion (m) ID.
Required
eid*
String
Element ID.
Required
Body parameters
Name Description
bTIdTranslationParams *

Responses


Documents

getDocuments

Get Documents


/api/documents

Usage and SDK Samples

curl -X GET "http://localhost/api/documents?q=&filter=&owner=&ownerType=&sortColumn=&sortOrder=&offset=&limit=&label=&project=&parentId="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DocumentsApi;

import java.io.File;
import java.util.*;

public class DocumentsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        DocumentsApi apiInstance = new DocumentsApi();
        String q = q_example; // String | 
        Integer filter = 56; // Integer | 
        String owner = owner_example; // String | 
        Integer ownerType = 56; // Integer | 
        String sortColumn = sortColumn_example; // String | 
        String sortOrder = sortOrder_example; // String | 
        Integer offset = 56; // Integer | 
        Integer limit = 56; // Integer | 
        String label = label_example; // String | 
        String project = project_example; // String | 
        String parentId = parentId_example; // String | 
        try {
            BTGlobalTreeNodeListResponse result = apiInstance.getDocuments(q, filter, owner, ownerType, sortColumn, sortOrder, offset, limit, label, project, parentId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DocumentsApi#getDocuments");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DocumentsApi;

public class DocumentsApiExample {

    public static void main(String[] args) {
        DocumentsApi apiInstance = new DocumentsApi();
        String q = q_example; // String | 
        Integer filter = 56; // Integer | 
        String owner = owner_example; // String | 
        Integer ownerType = 56; // Integer | 
        String sortColumn = sortColumn_example; // String | 
        String sortOrder = sortOrder_example; // String | 
        Integer offset = 56; // Integer | 
        Integer limit = 56; // Integer | 
        String label = label_example; // String | 
        String project = project_example; // String | 
        String parentId = parentId_example; // String | 
        try {
            BTGlobalTreeNodeListResponse result = apiInstance.getDocuments(q, filter, owner, ownerType, sortColumn, sortOrder, offset, limit, label, project, parentId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DocumentsApi#getDocuments");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *q = q_example; //  (optional) (default to null)
Integer *filter = 56; //  (optional) (default to null)
String *owner = owner_example; //  (optional) (default to null)
Integer *ownerType = 56; //  (optional) (default to 1)
String *sortColumn = sortColumn_example; //  (optional) (default to createdAt)
String *sortOrder = sortOrder_example; //  (optional) (default to desc)
Integer *offset = 56; //  (optional) (default to 0)
Integer *limit = 56; //  (optional) (default to 20)
String *label = label_example; //  (optional) (default to null)
String *project = project_example; //  (optional) (default to null)
String *parentId = parentId_example; //  (optional) (default to null)

DocumentsApi *apiInstance = [[DocumentsApi alloc] init];

// Get Documents
[apiInstance getDocumentsWith:q
    filter:filter
    owner:owner
    ownerType:ownerType
    sortColumn:sortColumn
    sortOrder:sortOrder
    offset:offset
    limit:limit
    label:label
    project:project
    parentId:parentId
              completionHandler: ^(BTGlobalTreeNodeListResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OnshapeRestApi = require('onshape_rest_api');
var defaultClient = OnshapeRestApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new OnshapeRestApi.DocumentsApi()
var opts = {
  'q': q_example, // {String} 
  'filter': 56, // {Integer} 
  'owner': owner_example, // {String} 
  'ownerType': 56, // {Integer} 
  'sortColumn': sortColumn_example, // {String} 
  'sortOrder': sortOrder_example, // {String} 
  'offset': 56, // {Integer} 
  'limit': 56, // {Integer} 
  'label': label_example, // {String} 
  'project': project_example, // {String} 
  'parentId': parentId_example // {String} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getDocuments(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getDocumentsExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new DocumentsApi();
            var q = q_example;  // String |  (optional)  (default to null)
            var filter = 56;  // Integer |  (optional)  (default to null)
            var owner = owner_example;  // String |  (optional)  (default to null)
            var ownerType = 56;  // Integer |  (optional)  (default to 1)
            var sortColumn = sortColumn_example;  // String |  (optional)  (default to createdAt)
            var sortOrder = sortOrder_example;  // String |  (optional)  (default to desc)
            var offset = 56;  // Integer |  (optional)  (default to 0)
            var limit = 56;  // Integer |  (optional)  (default to 20)
            var label = label_example;  // String |  (optional)  (default to null)
            var project = project_example;  // String |  (optional)  (default to null)
            var parentId = parentId_example;  // String |  (optional)  (default to null)

            try
            {
                // Get Documents
                BTGlobalTreeNodeListResponse result = apiInstance.getDocuments(q, filter, owner, ownerType, sortColumn, sortOrder, offset, limit, label, project, parentId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DocumentsApi.getDocuments: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new OpenAPITools\Client\Api\DocumentsApi();
$q = q_example; // String | 
$filter = 56; // Integer | 
$owner = owner_example; // String | 
$ownerType = 56; // Integer | 
$sortColumn = sortColumn_example; // String | 
$sortOrder = sortOrder_example; // String | 
$offset = 56; // Integer | 
$limit = 56; // Integer | 
$label = label_example; // String | 
$project = project_example; // String | 
$parentId = parentId_example; // String | 

try {
    $result = $api_instance->getDocuments($q, $filter, $owner, $ownerType, $sortColumn, $sortOrder, $offset, $limit, $label, $project, $parentId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DocumentsApi->getDocuments: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DocumentsApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::OPenAPIClient::DocumentsApi->new();
my $q = q_example; # String | 
my $filter = 56; # Integer | 
my $owner = owner_example; # String | 
my $ownerType = 56; # Integer | 
my $sortColumn = sortColumn_example; # String | 
my $sortOrder = sortOrder_example; # String | 
my $offset = 56; # Integer | 
my $limit = 56; # Integer | 
my $label = label_example; # String | 
my $project = project_example; # String | 
my $parentId = parentId_example; # String | 

eval { 
    my $result = $api_instance->getDocuments(q => $q, filter => $filter, owner => $owner, ownerType => $ownerType, sortColumn => $sortColumn, sortOrder => $sortOrder, offset => $offset, limit => $limit, label => $label, project => $project, parentId => $parentId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DocumentsApi->getDocuments: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.DocumentsApi()
q = q_example # String |  (optional) (default to null)
filter = 56 # Integer |  (optional) (default to null)
owner = owner_example # String |  (optional) (default to null)
ownerType = 56 # Integer |  (optional) (default to 1)
sortColumn = sortColumn_example # String |  (optional) (default to createdAt)
sortOrder = sortOrder_example # String |  (optional) (default to desc)
offset = 56 # Integer |  (optional) (default to 0)
limit = 56 # Integer |  (optional) (default to 20)
label = label_example # String |  (optional) (default to null)
project = project_example # String |  (optional) (default to null)
parentId = parentId_example # String |  (optional) (default to null)

try: 
    # Get Documents
    api_response = api_instance.get_documents(q=q, filter=filter, owner=owner, ownerType=ownerType, sortColumn=sortColumn, sortOrder=sortOrder, offset=offset, limit=limit, label=label, project=project, parentId=parentId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DocumentsApi->getDocuments: %s\n" % e)
extern crate DocumentsApi;

pub fn main() {
    let q = q_example; // String
    let filter = 56; // Integer
    let owner = owner_example; // String
    let ownerType = 56; // Integer
    let sortColumn = sortColumn_example; // String
    let sortOrder = sortOrder_example; // String
    let offset = 56; // Integer
    let limit = 56; // Integer
    let label = label_example; // String
    let project = project_example; // String
    let parentId = parentId_example; // String

    let mut context = DocumentsApi::Context::default();
    let result = client.getDocuments(q, filter, owner, ownerType, sortColumn, sortOrder, offset, limit, label, project, parentId, &context).wait();
    println!("{:?}", result);

}

Scopes

OAuth2Internal Application is Onshape Internal
OAuth2ReadPII Application can read your profile information
OAuth2Read Application can read your documents
OAuth2Write Application can write to your documents
OAuth2Delete Application can delete your documents and workspaces
OAuth2Purchase Application can request purchases on your behalf
OAuth2Share Application can share and unshare documents on your behalf

Parameters

Query parameters
Name Description
q
String
filter
Integer (int32)
owner
String
ownerType
Integer (int32)
sortColumn
String
sortOrder
String
offset
Integer (int32)
limit
Integer (int32)
label
String
project
String
parentId
String

Responses


Endpoints

getEndpoints


/api/endpoints

Usage and SDK Samples

curl -X GET "http://localhost/api/endpoints"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.EndpointsApi;

import java.io.File;
import java.util.*;

public class EndpointsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        EndpointsApi apiInstance = new EndpointsApi();
        try {
            apiInstance.getEndpoints();
        } catch (ApiException e) {
            System.err.println("Exception when calling EndpointsApi#getEndpoints");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.EndpointsApi;

public class EndpointsApiExample {

    public static void main(String[] args) {
        EndpointsApi apiInstance = new EndpointsApi();
        try {
            apiInstance.getEndpoints();
        } catch (ApiException e) {
            System.err.println("Exception when calling EndpointsApi#getEndpoints");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


EndpointsApi *apiInstance = [[EndpointsApi alloc] init];

[apiInstance getEndpointsWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OnshapeRestApi = require('onshape_rest_api');
var defaultClient = OnshapeRestApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new OnshapeRestApi.EndpointsApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.getEndpoints(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getEndpointsExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new EndpointsApi();

            try
            {
                apiInstance.getEndpoints();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling EndpointsApi.getEndpoints: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new OpenAPITools\Client\Api\EndpointsApi();

try {
    $api_instance->getEndpoints();
} catch (Exception $e) {
    echo 'Exception when calling EndpointsApi->getEndpoints: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::EndpointsApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::OPenAPIClient::EndpointsApi->new();

eval { 
    $api_instance->getEndpoints();
};
if ($@) {
    warn "Exception when calling EndpointsApi->getEndpoints: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.EndpointsApi()

try: 
    api_instance.get_endpoints()
except ApiException as e:
    print("Exception when calling EndpointsApi->getEndpoints: %s\n" % e)
extern crate EndpointsApi;

pub fn main() {

    let mut context = EndpointsApi::Context::default();
    let result = client.getEndpoints(&context).wait();
    println!("{:?}", result);

}

Scopes

OAuth2Internal Application is Onshape Internal
OAuth2ReadPII Application can read your profile information
OAuth2Read Application can read your documents
OAuth2Write Application can write to your documents
OAuth2Delete Application can delete your documents and workspaces
OAuth2Purchase Application can request purchases on your behalf
OAuth2Share Application can share and unshare documents on your behalf

Parameters

Responses


Parts

getPartsWMV

Get list of parts


/api/parts/d/{did}/{wvm}/{wvmid}

Usage and SDK Samples

curl -X GET "http://localhost/api/parts/d/{did}/{wvm}/{wvmid}?elementId=&withThumbnails=&includePropertyDefaults=&linkDocumentId=&configuration="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.PartsApi;

import java.io.File;
import java.util.*;

public class PartsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        PartsApi apiInstance = new PartsApi();
        String did = did_example; // String | Document ID.
        String wvm = wvm_example; // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
        String wvmid = wvmid_example; // String | Workspace (w), Version (v) or Microversion (m) ID.
        String elementId = elementId_example; // String | Element ID
        Boolean withThumbnails = true; // Boolean | Whether or not to include thumbnails (not supported for microversion)
        Boolean includePropertyDefaults = true; // Boolean | If true, include metadata schema property defaults in response
        String linkDocumentId = linkDocumentId_example; // String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.
        String configuration = configuration_example; // String | Configuration string.
        try {
            array[BTPartMetadataInfo] result = apiInstance.getPartsWMV(did, wvm, wvmid, elementId, withThumbnails, includePropertyDefaults, linkDocumentId, configuration);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PartsApi#getPartsWMV");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.PartsApi;

public class PartsApiExample {

    public static void main(String[] args) {
        PartsApi apiInstance = new PartsApi();
        String did = did_example; // String | Document ID.
        String wvm = wvm_example; // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
        String wvmid = wvmid_example; // String | Workspace (w), Version (v) or Microversion (m) ID.
        String elementId = elementId_example; // String | Element ID
        Boolean withThumbnails = true; // Boolean | Whether or not to include thumbnails (not supported for microversion)
        Boolean includePropertyDefaults = true; // Boolean | If true, include metadata schema property defaults in response
        String linkDocumentId = linkDocumentId_example; // String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.
        String configuration = configuration_example; // String | Configuration string.
        try {
            array[BTPartMetadataInfo] result = apiInstance.getPartsWMV(did, wvm, wvmid, elementId, withThumbnails, includePropertyDefaults, linkDocumentId, configuration);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PartsApi#getPartsWMV");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *did = did_example; // Document ID. (default to null)
String *wvm = wvm_example; // One of w or v or m corresponding to whether a workspace or version or microversion was entered. (default to null)
String *wvmid = wvmid_example; // Workspace (w), Version (v) or Microversion (m) ID. (default to null)
String *elementId = elementId_example; // Element ID (optional) (default to null)
Boolean *withThumbnails = true; // Whether or not to include thumbnails (not supported for microversion) (optional) (default to false)
Boolean *includePropertyDefaults = true; // If true, include metadata schema property defaults in response (optional) (default to false)
String *linkDocumentId = linkDocumentId_example; // Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter. (optional) (default to null)
String *configuration = configuration_example; // Configuration string. (optional) (default to null)

PartsApi *apiInstance = [[PartsApi alloc] init];

// Get list of parts
[apiInstance getPartsWMVWith:did
    wvm:wvm
    wvmid:wvmid
    elementId:elementId
    withThumbnails:withThumbnails
    includePropertyDefaults:includePropertyDefaults
    linkDocumentId:linkDocumentId
    configuration:configuration
              completionHandler: ^(array[BTPartMetadataInfo] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OnshapeRestApi = require('onshape_rest_api');
var defaultClient = OnshapeRestApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new OnshapeRestApi.PartsApi()
var did = did_example; // {String} Document ID.
var wvm = wvm_example; // {String} One of w or v or m corresponding to whether a workspace or version or microversion was entered.
var wvmid = wvmid_example; // {String} Workspace (w), Version (v) or Microversion (m) ID.
var opts = {
  'elementId': elementId_example, // {String} Element ID
  'withThumbnails': true, // {Boolean} Whether or not to include thumbnails (not supported for microversion)
  'includePropertyDefaults': true, // {Boolean} If true, include metadata schema property defaults in response
  'linkDocumentId': linkDocumentId_example, // {String} Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.
  'configuration': configuration_example // {String} Configuration string.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getPartsWMV(did, wvm, wvmid, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getPartsWMVExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new PartsApi();
            var did = did_example;  // String | Document ID. (default to null)
            var wvm = wvm_example;  // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered. (default to null)
            var wvmid = wvmid_example;  // String | Workspace (w), Version (v) or Microversion (m) ID. (default to null)
            var elementId = elementId_example;  // String | Element ID (optional)  (default to null)
            var withThumbnails = true;  // Boolean | Whether or not to include thumbnails (not supported for microversion) (optional)  (default to false)
            var includePropertyDefaults = true;  // Boolean | If true, include metadata schema property defaults in response (optional)  (default to false)
            var linkDocumentId = linkDocumentId_example;  // String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter. (optional)  (default to null)
            var configuration = configuration_example;  // String | Configuration string. (optional)  (default to null)

            try
            {
                // Get list of parts
                array[BTPartMetadataInfo] result = apiInstance.getPartsWMV(did, wvm, wvmid, elementId, withThumbnails, includePropertyDefaults, linkDocumentId, configuration);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PartsApi.getPartsWMV: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new OpenAPITools\Client\Api\PartsApi();
$did = did_example; // String | Document ID.
$wvm = wvm_example; // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
$wvmid = wvmid_example; // String | Workspace (w), Version (v) or Microversion (m) ID.
$elementId = elementId_example; // String | Element ID
$withThumbnails = true; // Boolean | Whether or not to include thumbnails (not supported for microversion)
$includePropertyDefaults = true; // Boolean | If true, include metadata schema property defaults in response
$linkDocumentId = linkDocumentId_example; // String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.
$configuration = configuration_example; // String | Configuration string.

try {
    $result = $api_instance->getPartsWMV($did, $wvm, $wvmid, $elementId, $withThumbnails, $includePropertyDefaults, $linkDocumentId, $configuration);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PartsApi->getPartsWMV: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::PartsApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::OPenAPIClient::PartsApi->new();
my $did = did_example; # String | Document ID.
my $wvm = wvm_example; # String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
my $wvmid = wvmid_example; # String | Workspace (w), Version (v) or Microversion (m) ID.
my $elementId = elementId_example; # String | Element ID
my $withThumbnails = true; # Boolean | Whether or not to include thumbnails (not supported for microversion)
my $includePropertyDefaults = true; # Boolean | If true, include metadata schema property defaults in response
my $linkDocumentId = linkDocumentId_example; # String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.
my $configuration = configuration_example; # String | Configuration string.

eval { 
    my $result = $api_instance->getPartsWMV(did => $did, wvm => $wvm, wvmid => $wvmid, elementId => $elementId, withThumbnails => $withThumbnails, includePropertyDefaults => $includePropertyDefaults, linkDocumentId => $linkDocumentId, configuration => $configuration);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PartsApi->getPartsWMV: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.PartsApi()
did = did_example # String | Document ID. (default to null)
wvm = wvm_example # String | One of w or v or m corresponding to whether a workspace or version or microversion was entered. (default to null)
wvmid = wvmid_example # String | Workspace (w), Version (v) or Microversion (m) ID. (default to null)
elementId = elementId_example # String | Element ID (optional) (default to null)
withThumbnails = true # Boolean | Whether or not to include thumbnails (not supported for microversion) (optional) (default to false)
includePropertyDefaults = true # Boolean | If true, include metadata schema property defaults in response (optional) (default to false)
linkDocumentId = linkDocumentId_example # String | Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter. (optional) (default to null)
configuration = configuration_example # String | Configuration string. (optional) (default to null)

try: 
    # Get list of parts
    api_response = api_instance.get_parts_wmv(did, wvm, wvmid, elementId=elementId, withThumbnails=withThumbnails, includePropertyDefaults=includePropertyDefaults, linkDocumentId=linkDocumentId, configuration=configuration)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PartsApi->getPartsWMV: %s\n" % e)
extern crate PartsApi;

pub fn main() {
    let did = did_example; // String
    let wvm = wvm_example; // String
    let wvmid = wvmid_example; // String
    let elementId = elementId_example; // String
    let withThumbnails = true; // Boolean
    let includePropertyDefaults = true; // Boolean
    let linkDocumentId = linkDocumentId_example; // String
    let configuration = configuration_example; // String

    let mut context = PartsApi::Context::default();
    let result = client.getPartsWMV(did, wvm, wvmid, elementId, withThumbnails, includePropertyDefaults, linkDocumentId, configuration, &context).wait();
    println!("{:?}", result);

}

Scopes

OAuth2Internal Application is Onshape Internal
OAuth2ReadPII Application can read your profile information
OAuth2Read Application can read your documents
OAuth2Write Application can write to your documents
OAuth2Delete Application can delete your documents and workspaces
OAuth2Purchase Application can request purchases on your behalf
OAuth2Share Application can share and unshare documents on your behalf

Parameters

Path parameters
Name Description
did*
String
Document ID.
Required
wvm*
String
One of w or v or m corresponding to whether a workspace or version or microversion was entered.
Required
wvmid*
String
Workspace (w), Version (v) or Microversion (m) ID.
Required
Query parameters
Name Description
elementId
String
Element ID
withThumbnails
Boolean
Whether or not to include thumbnails (not supported for microversion)
includePropertyDefaults
Boolean
If true, include metadata schema property defaults in response
linkDocumentId
String
Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.
configuration
String
Configuration string.

Responses


updatePartsWMV

Part metadata batch update.


/api/parts/d/{did}/{wvm}/{wvmid}

Usage and SDK Samples

curl -X POST "http://localhost/api/parts/d/{did}/{wvm}/{wvmid}?editDescription="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.PartsApi;

import java.io.File;
import java.util.*;

public class PartsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        PartsApi apiInstance = new PartsApi();
        String did = did_example; // String | Document ID.
        String wvm = wvm_example; // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
        String wvmid = wvmid_example; // String | Workspace (w), Version (v) or Microversion (m) ID.
        String editDescription = editDescription_example; // String | Description of the update (as appear in document history)
        String body = body_example; // String | 
        try {
            apiInstance.updatePartsWMV(did, wvm, wvmid, editDescription, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling PartsApi#updatePartsWMV");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.PartsApi;

public class PartsApiExample {

    public static void main(String[] args) {
        PartsApi apiInstance = new PartsApi();
        String did = did_example; // String | Document ID.
        String wvm = wvm_example; // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
        String wvmid = wvmid_example; // String | Workspace (w), Version (v) or Microversion (m) ID.
        String editDescription = editDescription_example; // String | Description of the update (as appear in document history)
        String body = body_example; // String | 
        try {
            apiInstance.updatePartsWMV(did, wvm, wvmid, editDescription, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling PartsApi#updatePartsWMV");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *did = did_example; // Document ID. (default to null)
String *wvm = wvm_example; // One of w or v or m corresponding to whether a workspace or version or microversion was entered. (default to null)
String *wvmid = wvmid_example; // Workspace (w), Version (v) or Microversion (m) ID. (default to null)
String *editDescription = editDescription_example; // Description of the update (as appear in document history) (optional) (default to null)
String *body = body_example; //  (optional)

PartsApi *apiInstance = [[PartsApi alloc] init];

// Part metadata batch update.
[apiInstance updatePartsWMVWith:did
    wvm:wvm
    wvmid:wvmid
    editDescription:editDescription
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OnshapeRestApi = require('onshape_rest_api');
var defaultClient = OnshapeRestApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new OnshapeRestApi.PartsApi()
var did = did_example; // {String} Document ID.
var wvm = wvm_example; // {String} One of w or v or m corresponding to whether a workspace or version or microversion was entered.
var wvmid = wvmid_example; // {String} Workspace (w), Version (v) or Microversion (m) ID.
var opts = {
  'editDescription': editDescription_example, // {String} Description of the update (as appear in document history)
  'body': body_example // {String} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.updatePartsWMV(did, wvm, wvmid, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class updatePartsWMVExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new PartsApi();
            var did = did_example;  // String | Document ID. (default to null)
            var wvm = wvm_example;  // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered. (default to null)
            var wvmid = wvmid_example;  // String | Workspace (w), Version (v) or Microversion (m) ID. (default to null)
            var editDescription = editDescription_example;  // String | Description of the update (as appear in document history) (optional)  (default to null)
            var body = body_example;  // String |  (optional) 

            try
            {
                // Part metadata batch update.
                apiInstance.updatePartsWMV(did, wvm, wvmid, editDescription, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PartsApi.updatePartsWMV: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new OpenAPITools\Client\Api\PartsApi();
$did = did_example; // String | Document ID.
$wvm = wvm_example; // String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
$wvmid = wvmid_example; // String | Workspace (w), Version (v) or Microversion (m) ID.
$editDescription = editDescription_example; // String | Description of the update (as appear in document history)
$body = body_example; // String | 

try {
    $api_instance->updatePartsWMV($did, $wvm, $wvmid, $editDescription, $body);
} catch (Exception $e) {
    echo 'Exception when calling PartsApi->updatePartsWMV: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::PartsApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::OPenAPIClient::PartsApi->new();
my $did = did_example; # String | Document ID.
my $wvm = wvm_example; # String | One of w or v or m corresponding to whether a workspace or version or microversion was entered.
my $wvmid = wvmid_example; # String | Workspace (w), Version (v) or Microversion (m) ID.
my $editDescription = editDescription_example; # String | Description of the update (as appear in document history)
my $body = WWW::OPenAPIClient::Object::String->new(); # String | 

eval { 
    $api_instance->updatePartsWMV(did => $did, wvm => $wvm, wvmid => $wvmid, editDescription => $editDescription, body => $body);
};
if ($@) {
    warn "Exception when calling PartsApi->updatePartsWMV: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.PartsApi()
did = did_example # String | Document ID. (default to null)
wvm = wvm_example # String | One of w or v or m corresponding to whether a workspace or version or microversion was entered. (default to null)
wvmid = wvmid_example # String | Workspace (w), Version (v) or Microversion (m) ID. (default to null)
editDescription = editDescription_example # String | Description of the update (as appear in document history) (optional) (default to null)
body = body_example # String |  (optional)

try: 
    # Part metadata batch update.
    api_instance.update_parts_wmv(did, wvm, wvmid, editDescription=editDescription, body=body)
except ApiException as e:
    print("Exception when calling PartsApi->updatePartsWMV: %s\n" % e)
extern crate PartsApi;

pub fn main() {
    let did = did_example; // String
    let wvm = wvm_example; // String
    let wvmid = wvmid_example; // String
    let editDescription = editDescription_example; // String
    let body = body_example; // String

    let mut context = PartsApi::Context::default();
    let result = client.updatePartsWMV(did, wvm, wvmid, editDescription, body, &context).wait();
    println!("{:?}", result);

}

Scopes

OAuth2Internal Application is Onshape Internal
OAuth2ReadPII Application can read your profile information
OAuth2Read Application can read your documents
OAuth2Write Application can write to your documents
OAuth2Delete Application can delete your documents and workspaces
OAuth2Purchase Application can request purchases on your behalf
OAuth2Share Application can share and unshare documents on your behalf

Parameters

Path parameters
Name Description
did*
String
Document ID.
Required
wvm*
String
One of w or v or m corresponding to whether a workspace or version or microversion was entered.
Required
wvmid*
String
Workspace (w), Version (v) or Microversion (m) ID.
Required
Body parameters
Name Description
body

Query parameters
Name Description
editDescription
String
Description of the update (as appear in document history)

Responses