What is the limit on how many tags can be uploaded via the API?

AOndrusek
AOndrusek Expensify Customer Posts: 2

Encountering issues uploading Multi-line tags via the API using the following: (login information redacted). Using C#

requestJobDescription={"type": "update", "credentials": {"partnerUserID": "XXXXXXXXXXX@XXXXXXX","partnerUserSecret": "XXXXXXXXXXXXX"}, "inputSettings": { "type": "policy","policyID": "9A1BA71006E444F4"},"tags": {"action": "replace", "source":"file", "config": {"dependency":true, "glCodes":true, "header":true, "setRequired":true, "fileType":"csv" }} }

Issue 1: If CSV file is > 500 lines, the command failes due to "File Size too large". However, when < 500 lines, work well

Issue2: The when action = MERGE, it still over-writes the existing data, not what is described in the documentation. The expected behavior is that it would add the data/tags to the existing ones.

Of note, the normal import process using the .csv file (1485 lines) works well

Here is the C# code being used:


 public async Task updatePolicyTags()

    {      Status("Sending TAGS Information");

      using (var httpClient = new HttpClient())      {

        clearScreen();    

using (var request = new HttpRequestMessage(new HttpMethod("POST"), "https://integrations.expensify.com/Integration-Server/ExpensifyIntegrations"))

        {   var contentList = new List<string>();

          string fileName = "c:\\ExpensifyIntegration\\SandBoxTest.csv";

    

          string requestString = "requestJobDescription={\n\"type\": \"update\",\n\"credentials\": {\n\"partnerUserID\": \"" + GLOBAL.EIpartnerUserID + "\",\n\"partnerUserSecret\": \"" + GLOBAL.EIpartnerUserSecret + "\"\n},\n\"inputSettings\": {\n\"type\": \"policy\",\n\"policyID\": \"9A1BA71006E444F4\"\n},\n\"tags\": {\n\"action\": \"merge\",\n\"source\":\"file\",\n\"config\": {\n\"dependency\":true,\n\"glCodes\":true,\n\"header\":true,\n\"setRequired\":true,\n\"fileType\":\"csv\"\n}}\n}";

          txtInput.Text = requestString; txtInput.Refresh();

          string alism = null;           

  try

          {

            contentList.Add(requestString);

            alism = File.ReadAllText(fileName);             

            contentList.Add(alism);  

            contentList.Add($"file={Uri.EscapeDataString(alism)}");

            request.Content = new StringContent(string.Join("&", contentList));

            request.Content.Headers.ContentType = MediaTypeHeaderValue.Parse("application/x-www-form-urlencoded");

            var response = await httpClient.SendAsync(request);

            txtResponse.Text = response.ToString(); txtResponse.Refresh();

          }

          catch (Exception ex)

          {

            debugOutput("We had a problem: " + ex.Message.ToString());

          }        

}      

}

    }

Please advise. Datafile is attached.


Answers