code: function getOperationForUpdatingLog(operationId, tableName, action, item) {
          return api.getMetadata(tableName, action, item).then(function(metadata) {
              return {
                  tableName: operationTableName,
                  action: 'upsert',
                  data: {
                      id: operationId,
                      action: action,
                      metadata: metadata
                  }
              };
          });
      }
docs: Gets the operation that will update an existing record in the operation table.