# Upsert Usage Collectors Upsert Usage Collectors Endpoint: PATCH /rest/2.0/ACTIVITY_COLLECTOR Version: 1.0 Security: JWT ## Header parameters: - `sessionId` (string, required) ## Request fields (application/json; charset=utf-8): - `brmObjects` (object) - `brmObjects.AccountId` (any) AccountId - `brmObjects.ActivityCollectorName` (any, required) Collector Name - `brmObjects.AfterProcessAction` (any) AfterProcessAction - `brmObjects.AfterProcessDirectory` (any) After Process Directory: This is the directory where processed files are moved to on the FTP/SFTP server. - `brmObjects.AfterProcessFilePattern` (any) After Process File Pattern: The processed files are renamed based on the specified file pattern. For example, You specified this pattern: *.processed The original file name: sample_2020.txt The new file name: sample_2020.txt.processed - `brmObjects.BillableActivityFlag` (any, required) Invoice Collected Activity - `brmObjects.ConsolidationMode` (any, required) Usage Consolidation Mode: Collector can operate in 3 modes: In Consolidation Mode, usage can be summarized. For example, sum the attribute across all usage records with the same uniqueness signature or by selecting a record from incoming usage feed to override existing record (rating based on high watermark). In Deduplication Mode, the collector discards records with the same uniqueness signature. In Disable Mode, usage records are always inserted. - `brmObjects.CreateAfterProcessDirectoryFlag` (any) Create After Process Directory if It Does Not Exist - `brmObjects.Created` (any) System controlled field: Date and time the record was created - `brmObjects.CreatedUserId` (any) System controlled field: Id of the user that created the record - `brmObjects.DataSourceFolder` (any) Data Source Folder - `brmObjects.DataSourceId` (any, required) Data Source - `brmObjects.DeleteSourceFile` (any) Delete Source File After Upload: When enabled, the system will permanently delete the source file on the FTP directory after the file has been uploaded successfully into the collector. - `brmObjects.Delimiter` (any) Delimiter - `brmObjects.EntityMethod` (any) EntityMethod - `brmObjects.Entity_Id` (any) Entity_Id: Entity Id - `brmObjects.ExternalEntityFieldId` (any) ExternalEntityFieldId - `brmObjects.FieldIncludedChar` (any) Text Qualifier: Text Qualifier works like the text qualifiers used when importing .CSV files in MS Excel. For example, if the text qualifier character ' (double quote) is used, the system assumes that string of text enclosed in-between these characters is part of a single value. Assuming that the delimiter character configured is a , (comma) the load file below will be treated as having three columns because the text enclosed with ' is treated as one value even if it has a comma in the text. SomeText, 'Easy to understand, I am', AnotherText Without the text qualifier ' (double quote) the text above will be treated as having four columns. - `brmObjects.FtpDataSource` (any, required) FTP Data Source - `brmObjects.FtpDirectory` (any, required) FTP Directory: The directory where files will be located. - `brmObjects.FtpFilePattern` (any, required) FTP File Pattern: Only the files that matched the specified pattern will be processed. For example, if the value my_file.*.txt is configured, the collector will look for and process files that use the said pattern on the FTP/remote server. These are some files that could be picked up by the collector with the file pattern from our example: 123my_file.20200807001.txt my_file.1234551.txt - `brmObjects.FtpLocationType` (any) FTP Location Type - `brmObjects.HostPort` (any, required) FTP Host Port - `brmObjects.Hostname` (any, required) FTP Host Name - `brmObjects.Id` (any, required) Id: Activity Collector id - `brmObjects.LastRowId` (any) LastRowId - `brmObjects.LastRowIdChar` (any) LastRowIdChar - `brmObjects.LastRuntime` (any) LastRuntime - `brmObjects.LoadOrder` (any) LoadOrder - `brmObjects.LookbackTimePeriodEnd` (any) Lookback Time Period End: Defines when the uniqueness search time period ends. This can be a date or formula - `brmObjects.LookbackTimePeriodStart` (any) Lookback Time Period Start: Defines when the uniqueness search time period begins. This can be a date or formula - `brmObjects.OmitEnd` (any) OmitEnd: Omit End Import Records - `brmObjects.PrecollectorValidation` (any) Custom Data Management - `brmObjects.RateActivityFlag` (any, required) Rate Collected Activity - `brmObjects.RecordFormat` (any, required) File Format - `brmObjects.RejectClosedFlag` (any) Reject Records Matched to Closed Invoice Periods Events: Consolidation can not happen when an incoming usage record matches a record from a closed invoice. Under such scenario, the incoming usage record can either be marked rejected or added to the next open invoice. When checked the usage records will be rejected and require manual intervention, in the unchecked state the record will be added to the next open invoice. - `brmObjects.RetrieveSql` (any) RetrieveSql - `brmObjects.RunIntervalMin` (any) RunIntervalMin - `brmObjects.ServicePointTypeId` (any) ServicePointTypeId - `brmObjects.SkipRows` (any) Rows to Skip: System will skip the number of rows from the beginning of the usage file indicated here. This is often necessary to bypass file headers. - `brmObjects.Sproc` (any) Sproc - `brmObjects.StartDate` (any) StartDate - `brmObjects.Status` (any, required) Status: The selected status controls the collector behavior related to the FTP/SFTP setting. In Production Mode, the collector retrieves the files from FTP/SFTP locations. In Test Mode, it does not. - `brmObjects.TimeZoneId` (any, required) Time Zone: The date in the usage file uses the time zone selected here. - `brmObjects.Type` (any, required) Collector Type - `brmObjects.Updated` (any) System controlled field: Date and time the record was last updated - `brmObjects.UpdatedUserId` (any) System controlled field: Id of the last user that updated the record - `brmObjects.Username` (any, required) Username - `externalIDFieldName` (string) Enum: "ActivityCollectorName" ## Response 200 fields (application/json): - `upsertResponse` (array) - `upsertResponse.Id` (any) - `upsertResponse.success` (boolean) - `upsertResponse.ErrorText` (string) - `upsertResponse.ErrorElementField` (string) - `upsertResponse.created` (boolean)