All URIs are relative to https://coda.io/apis/v1
Method | HTTP request | Description |
---|---|---|
addPackPermission | POST /packs/{packId}/permissions | Add a permission for Pack |
createPack | POST /packs | Create Pack |
deletePackPermission | DELETE /packs/{packId}/permissions/{permissionId} | Delete a permission for Pack |
getPack | GET /packs/{packId} | Get a single Pack |
getPackPermissions | GET /packs/{packId}/permissions | List permissions for a Pack |
listPacks | GET /packs | List Packs |
packAssetUploadComplete | POST /packs/{packId}/assets/{packAssetId}/assetType/{packAssetType}/uploadComplete | Pack asset upload complete |
packVersionUploadComplete | POST /packs/{packId}/versions/{packVersion}/uploadComplete | Pack version upload complete |
registerPackVersion | POST /packs/{packId}/versions/{packVersion}/register | Register Pack version |
setPackLiveVersion | PUT /packs/{packId}/liveVersion | Set live version for Pack |
updatePack | PATCH /packs/{packId} | Update Pack |
uploadPackAsset | POST /packs/{packId}/uploadAsset | Upload a Pack asset. |
AddPackPermissionResponse addPackPermission(bodypackId)
Add a permission for Pack
Create or modify user, workspace, or global permissions for a given Pack.
import CodaJsClient from 'coda-js-client';
let defaultClient = CodaJsClient.ApiClient.instance;
let apiInstance = new CodaJsClient.PacksApi();
let body = new CodaJsClient.AddPackPermissionRequest(); // AddPackPermissionRequest | Parameters for creating/updating Pack permissions.
let packId = 56; // Number | ID of a Pack
apiInstance.addPackPermission(bodypackId).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
body | AddPackPermissionRequest | Parameters for creating/updating Pack permissions. | |
packId | Number | ID of a Pack |
- Content-Type: application/json
- Accept: application/json
CreatePackResponse createPack(body)
Create Pack
Creates a new Pack, essentially registering a new Pack id. The contents of the Pack will be uploaded separately.
import CodaJsClient from 'coda-js-client';
let defaultClient = CodaJsClient.ApiClient.instance;
let apiInstance = new CodaJsClient.PacksApi();
let body = new CodaJsClient.CreatePackRequest(); // CreatePackRequest | Parameters for creating the Pack.
apiInstance.createPack(body).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
body | CreatePackRequest | Parameters for creating the Pack. |
- Content-Type: application/json
- Accept: application/json
DeletePackPermissionResponse deletePackPermission(packId, permissionId)
Delete a permission for Pack
Delete user, workspace, or global permissions for a given Pack.
import CodaJsClient from 'coda-js-client';
let defaultClient = CodaJsClient.ApiClient.instance;
let apiInstance = new CodaJsClient.PacksApi();
let packId = 56; // Number | ID of a Pack
let permissionId = "permissionId_example"; // String | ID of a permission on a doc.
apiInstance.deletePackPermission(packId, permissionId).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
packId | Number | ID of a Pack | |
permissionId | String | ID of a permission on a doc. |
- Content-Type: Not defined
- Accept: application/json
Pack getPack(packId)
Get a single Pack
Returns a single Pack.
import CodaJsClient from 'coda-js-client';
let defaultClient = CodaJsClient.ApiClient.instance;
let apiInstance = new CodaJsClient.PacksApi();
let packId = 56; // Number | ID of a Pack
apiInstance.getPack(packId).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
packId | Number | ID of a Pack |
- Content-Type: Not defined
- Accept: application/json
PackPermissionList getPackPermissions(packId)
List permissions for a Pack
Get user, workspace, and/or global permissions for a given Pack.
import CodaJsClient from 'coda-js-client';
let defaultClient = CodaJsClient.ApiClient.instance;
let apiInstance = new CodaJsClient.PacksApi();
let packId = 56; // Number | ID of a Pack
apiInstance.getPackPermissions(packId).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
packId | Number | ID of a Pack |
- Content-Type: Not defined
- Accept: application/json
PackSummaryList listPacks(opts)
List Packs
Get the list of accessible Packs.
import CodaJsClient from 'coda-js-client';
let defaultClient = CodaJsClient.ApiClient.instance;
let apiInstance = new CodaJsClient.PacksApi();
let opts = {
'accessType': new CodaJsClient.PackAccessType(), // PackAccessType | Filter to only return the Packs for which the current user has this access type
'sortBy': new CodaJsClient.PacksSortBy(), // PacksSortBy | The sort order of the Packs returned.
'limit': 56, // Number | Maximum number of results to return in this query.
'pageToken': "pageToken_example" // String | An opaque token used to fetch the next page of results.
};
apiInstance.listPacks(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
accessType | PackAccessType | Filter to only return the Packs for which the current user has this access type | [optional] |
sortBy | PacksSortBy | The sort order of the Packs returned. | [optional] |
limit | Number | Maximum number of results to return in this query. | [optional] |
pageToken | String | An opaque token used to fetch the next page of results. | [optional] |
- Content-Type: Not defined
- Accept: application/json
PackAssetUploadCompleteResponse packAssetUploadComplete(packId, packAssetId, packAssetType)
Pack asset upload complete
Note the completion of the upload of a Pack asset.
import CodaJsClient from 'coda-js-client';
let defaultClient = CodaJsClient.ApiClient.instance;
let apiInstance = new CodaJsClient.PacksApi();
let packId = 56; // Number | ID of a Pack
let packAssetId = "packAssetId_example"; // String | Unique identifier for a Pack asset
let packAssetType = new CodaJsClient.PackAssetType(); // PackAssetType | Pack asset type.
apiInstance.packAssetUploadComplete(packId, packAssetId, packAssetType).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
packId | Number | ID of a Pack | |
packAssetId | String | Unique identifier for a Pack asset | |
packAssetType | PackAssetType | Pack asset type. |
PackAssetUploadCompleteResponse
- Content-Type: Not defined
- Accept: application/json
CreatePackVersionResponse packVersionUploadComplete(packId, packVersion)
Pack version upload complete
Note the completion of the upload of a Pack version bundle in order to create that Pack version.
import CodaJsClient from 'coda-js-client';
let defaultClient = CodaJsClient.ApiClient.instance;
let apiInstance = new CodaJsClient.PacksApi();
let packId = 56; // Number | ID of a Pack
let packVersion = "packVersion_example"; // String | Semantic version of a Pack
apiInstance.packVersionUploadComplete(packId, packVersion).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
packId | Number | ID of a Pack | |
packVersion | String | Semantic version of a Pack |
- Content-Type: Not defined
- Accept: application/json
PackVersionUploadInfo registerPackVersion(packId, packVersion)
Register Pack version
Registers a new Pack version. This simply returns a signed url to use for uploading the Pack version definition. Following the completion of the upload, POST to /apis/v1/packs/{packId}/versions/{packVersion} trigger the rest of the creation process.
import CodaJsClient from 'coda-js-client';
let defaultClient = CodaJsClient.ApiClient.instance;
let apiInstance = new CodaJsClient.PacksApi();
let packId = 56; // Number | ID of a Pack
let packVersion = "packVersion_example"; // String | Semantic version of a Pack
apiInstance.registerPackVersion(packId, packVersion).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
packId | Number | ID of a Pack | |
packVersion | String | Semantic version of a Pack |
- Content-Type: Not defined
- Accept: application/json
SetPackLiveVersionResponse setPackLiveVersion(bodypackId)
Set live version for Pack
Set the Pack version that is installable for users.
import CodaJsClient from 'coda-js-client';
let defaultClient = CodaJsClient.ApiClient.instance;
let apiInstance = new CodaJsClient.PacksApi();
let body = new CodaJsClient.SetPackLiveVersionRequest(); // SetPackLiveVersionRequest | The Pack version to set live.
let packId = 56; // Number | ID of a Pack
apiInstance.setPackLiveVersion(bodypackId).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
body | SetPackLiveVersionRequest | The Pack version to set live. | |
packId | Number | ID of a Pack |
- Content-Type: application/json
- Accept: application/json
Pack updatePack(bodypackId)
Update Pack
Update an existing Pack for non-versioned fields.
import CodaJsClient from 'coda-js-client';
let defaultClient = CodaJsClient.ApiClient.instance;
let apiInstance = new CodaJsClient.PacksApi();
let body = new CodaJsClient.UpdatePackRequest(); // UpdatePackRequest | Parameters for updating the Pack.
let packId = 56; // Number | ID of a Pack
apiInstance.updatePack(bodypackId).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
body | UpdatePackRequest | Parameters for updating the Pack. | |
packId | Number | ID of a Pack |
- Content-Type: application/json
- Accept: application/json
PackAssetUploadInfo uploadPackAsset(bodypackId)
Upload a Pack asset.
Request a signed s3 URL to upload your Pack asset.
import CodaJsClient from 'coda-js-client';
let defaultClient = CodaJsClient.ApiClient.instance;
let apiInstance = new CodaJsClient.PacksApi();
let body = new CodaJsClient.UploadPackAssetRequest(); // UploadPackAssetRequest | Parameters to specify the asset being uploaded.
let packId = 56; // Number | ID of a Pack
apiInstance.uploadPackAsset(bodypackId).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
body | UploadPackAssetRequest | Parameters to specify the asset being uploaded. | |
packId | Number | ID of a Pack |
- Content-Type: application/json
- Accept: application/json