createFileAssociation
Creates a new file association
By passing in the appropriate options, you can create a new folder
/Files/{FileId}/Associations
Usage and SDK Samples
using System;
using System.Diagnostics;
using Xero.NetStandard.OAuth2.Api;
using Xero.NetStandard.OAuth2.Client;
using Xero.NetStandard.OAuth2.Model;
namespace Example
{
public class CreateFileAssociationExample
{
public async Task Main()
{
var accessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new FilesApi();
var xeroTenantId = "YOUR_XERO_TENANT_ID";
var fileId = Guid.Parse("4ff1e5cc-9835-40d5-bb18-09fdb118db9c");
var idempotencyKey = "KEY_VALUE";
try {
var result = await apiInstance.CreateFileAssociationAsync(accessToken, xeroTenantId, fileId, association, idempotencyKey);
Console.WriteLine(result);
}
catch (Exception e)
{
Console.WriteLine("Exception when calling apiInstance.CreateFileAssociation: " + e.Message );
}
}
}
}
Scopes
files | Grant read-write access to files and folders |
Parameters
Name | Description |
---|---|
FileId* |
UUID
(uuid)
File id for single object
Required
|
Name | Description |
---|---|
xero-tenant-id* |
String
Xero identifier for Tenant
Required
|
Idempotency-Key |
String
This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
Name | Description |
---|---|
association * |
Association
Required
|