Skip to content
This repository was archived by the owner on Jun 26, 2023. It is now read-only.

Latest commit

 

History

History
139 lines (106 loc) · 4.21 KB

File metadata and controls

139 lines (106 loc) · 4.21 KB

IO.Swagger.Api.ControlsApi

All URIs are relative to https://coda.io/apis/v1

Method HTTP request Description
GetControl GET /docs/{docId}/controls/{controlIdOrName} Get a control
ListControls GET /docs/{docId}/controls List controls

GetControl

Control GetControl (string docId, string controlIdOrName)

Get a control

Returns info on a control.

Example

using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class GetControlExample
    {
        public void main()
        {

            var apiInstance = new ControlsApi();
            var docId = docId_example;  // string | ID of the doc.
            var controlIdOrName = controlIdOrName_example;  // string | ID or name of the control. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it.

            try
            {
                // Get a control
                Control result = apiInstance.GetControl(docId, controlIdOrName);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ControlsApi.GetControl: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
docId string ID of the doc.
controlIdOrName string ID or name of the control. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it.

Return type

Control

Authorization

Bearer

HTTP request headers

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

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

ListControls

ControlList ListControls (string docId, int? limit = null, string pageToken = null, SortBy sortBy = null)

List controls

Returns a list of controls in a Coda doc.

Example

using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class ListControlsExample
    {
        public void main()
        {

            var apiInstance = new ControlsApi();
            var docId = docId_example;  // string | ID of the doc.
            var limit = 56;  // int? | Maximum number of results to return in this query. (optional) 
            var pageToken = pageToken_example;  // string | An opaque token used to fetch the next page of results. (optional) 
            var sortBy = new SortBy(); // SortBy | Determines how to sort the given objects. (optional) 

            try
            {
                // List controls
                ControlList result = apiInstance.ListControls(docId, limit, pageToken, sortBy);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ControlsApi.ListControls: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
docId string ID of the doc.
limit int? Maximum number of results to return in this query. [optional]
pageToken string An opaque token used to fetch the next page of results. [optional]
sortBy SortBy Determines how to sort the given objects. [optional]

Return type

ControlList

Authorization

Bearer

HTTP request headers

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

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