Skip to content

Latest commit

 

History

History
273 lines (197 loc) · 8.34 KB

File metadata and controls

273 lines (197 loc) · 8.34 KB

Autodesk.Forge.BucketsApi

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

Method HTTP request Description
CreateBucket POST /oss/v2/buckets
DeleteBucket DELETE /oss/v2/buckets/{bucketKey}
GetBucketDetails GET /oss/v2/buckets/{bucketKey}/details
GetBuckets GET /oss/v2/buckets

CreateBucket

Bucket CreateBucket (PostBucketsPayload postBuckets, string xAdsRegion = null)

Use this endpoint to create a bucket. Buckets are arbitrary spaces created and owned by applications. Bucket keys are globally unique across all regions, regardless of where they were created, and they cannot be changed. The application creating the bucket is the owner of the bucket.

Example

using System;
using System.Diagnostics;
using Autodesk.Forge;
using Autodesk.Forge.Client;
using Autodesk.Forge.Model;

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

            var apiInstance = new BucketsApi();
            var postBuckets = new PostBucketsPayload(); // PostBucketsPayload | Body Structure
            var xAdsRegion = xAdsRegion_example;  // string | The region where the bucket resides Acceptable values: `US`, `EMEA` Default is `US`  (optional)  (default to US)

            try
            {
                Bucket result = apiInstance.CreateBucket(postBuckets, xAdsRegion);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling BucketsApi.CreateBucket: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
postBuckets PostBucketsPayload Body Structure
xAdsRegion string The region where the bucket resides Acceptable values: `US`, `EMEA` Default is `US` [optional] [default to US]

Return type

Bucket

Authorization

oauth2_application

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.api+json, application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeleteBucket

void DeleteBucket (string bucketKey)

This endpoint will delete a bucket.

Example

using System;
using System.Diagnostics;
using Autodesk.Forge;
using Autodesk.Forge.Client;
using Autodesk.Forge.Model;

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

            var apiInstance = new BucketsApi();
            var bucketKey = bucketKey_example;  // string | URL-encoded bucket key

            try
            {
                apiInstance.DeleteBucket(bucketKey);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling BucketsApi.DeleteBucket: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
bucketKey string URL-encoded bucket key

Return type

void (empty response body)

Authorization

oauth2_application

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.api+json, application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetBucketDetails

Bucket GetBucketDetails (string bucketKey)

This endpoint will return the buckets owned by the application. This endpoint supports pagination.

Example

using System;
using System.Diagnostics;
using Autodesk.Forge;
using Autodesk.Forge.Client;
using Autodesk.Forge.Model;

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

            var apiInstance = new BucketsApi();
            var bucketKey = bucketKey_example;  // string | URL-encoded bucket key

            try
            {
                Bucket result = apiInstance.GetBucketDetails(bucketKey);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling BucketsApi.GetBucketDetails: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
bucketKey string URL-encoded bucket key

Return type

Bucket

Authorization

oauth2_application

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.api+json, application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetBuckets

Buckets GetBuckets (string region = null, int? limit = null, string startAt = null)

This endpoint will return the buckets owned by the application. This endpoint supports pagination.

Example

using System;
using System.Diagnostics;
using Autodesk.Forge;
using Autodesk.Forge.Client;
using Autodesk.Forge.Model;

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

            var apiInstance = new BucketsApi();
            var region = region_example;  // string | The region where the bucket resides Acceptable values: `US`, `EMEA` Default is `US`  (optional)  (default to US)
            var limit = 56;  // int? | Limit to the response size, Acceptable values: 1-100 Default = 10  (optional)  (default to 10)
            var startAt = startAt_example;  // string | Key to use as an offset to continue pagination This is typically the last bucket key found in a preceding GET buckets response  (optional) 

            try
            {
                Buckets result = apiInstance.GetBuckets(region, limit, startAt);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling BucketsApi.GetBuckets: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
region string The region where the bucket resides Acceptable values: `US`, `EMEA` Default is `US` [optional] [default to US]
limit int? Limit to the response size, Acceptable values: 1-100 Default = 10 [optional] [default to 10]
startAt string Key to use as an offset to continue pagination This is typically the last bucket key found in a preceding GET buckets response [optional]

Return type

Buckets

Authorization

oauth2_application

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.api+json, application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]